Connect to Real-Time SSE Order Stream

Continuous text/event-stream pushing real-time Polymarket order executions (LiveTransaction)
GET/streams/{id}

请求参数

该接口所需的请求头与参数规范。

请求头
请求头类型必填说明
X-PolyEdge-Keystring必填PolyEdge API Key for client authentication and rate-limiting
路径参数
参数类型必填说明
idstring必填Stream ID

事件流响应与 Payload 结构

实时流传输协议规范与事件消息体定义。

text/event-stream
Server-Sent Events (SSE) 长连接报文协议

该接口建立标准持久化 HTTP 连接(Content-Type: text/event-stream),不返回静态 JSON。服务器通过此单条连接持续推送流式消息帧:

event: tx
新链上成交匹配事件。data 行包含一个序列化为 JSON 字符串的 LiveTransaction 对象。
: heartbeat
心跳注释帧,每 30 秒推送一次以保持防火墙和 TCP 连接存活。
已解析 "data" JSON Payload (LiveTransaction)
json
{
  "makers": [
    {
      "fee": "0",
      "order": {
        "order_hash": "0x0e284d1644417ca703d76d66239e181f1154ef5693a7e2a8f19ac4902356fdf3",
        "shares": "25000000",
        "signature_type": 2,
        "timestamp": "2026-09-29T09:01:40.163Z",
        "usdc": "11250000"
      },
      "outcome": "Down",
      "shares": "24260000",
      "side": "BUY",
      "token_ids_index": 1,
      "usdc": "10917000",
      "user": {
        "address": "0x86b14772a4da70f3e6d5eee06933ebef143efc87",
        "name": "machinelearned"
      }
    }
  ],
  "market": {
    "condition_id": "0xc19011578b6ae029837f9e204d35634b2455962116f7308e8d93754817d638e8",
    "event_slug": "btc-updown-5m-1790672400",
    "group_item_title": "",
    "id": 5069271,
    "neg_risk": false,
    "outcomes": [
      "Up",
      "Down"
    ],
    "question": "Bitcoin Up or Down - September 29, 5:00AM-5:05AM ET",
    "series_slug": "btc-up-or-down-5m",
    "slug": "btc-updown-5m-1790672400",
    "sports_market_type": "",
    "start_date": "2026-09-28T09:08:54.390Z",
    "tags_slug": [
      "crypto",
      "bitcoin",
      "crypto-prices",
      "recurring",
      "up-or-down",
      "hide-from-new",
      "5M"
    ],
    "token_ids": [
      "107150766630487985443107979139159323607570696803788220613943864756618071267375",
      "22396449324319960626851581704392863918656744742900469141950777307014495040947"
    ]
  },
  "taker": {
    "fee": "420300",
    "order": {
      "order_hash": "0x6a38137f7ef8d5efff7d39fe0d0f06c58dcd0b86b2aad25c25bef4d7f512c419",
      "shares": "24260000",
      "signature_type": 3,
      "timestamp": "2026-09-29T09:01:47.344Z",
      "usdc": "9946600"
    },
    "outcome": "Down",
    "shares": "24260000",
    "side": "SELL",
    "token_ids_index": 1,
    "usdc": "10917000",
    "user": {
      "address": "0x0a950f8ae45de02765e196968d1755f0c9671dab",
      "name": "Kami410"
    }
  },
  "timestamp": "2026-09-29T09:01:47.519Z",
  "tx_hash": "0xa902d5378ec9e6344b7e7788d02d3c7e80724f02c27e833b2a026a1f3ac6a620"
}
事件: "tx" -> data 负载字段 (LiveTransaction)
字段类型说明
makers
array of objectsList of matched maker limit orders filled in this transaction
├─fee
stringExecution and relayer fee paid in micro-USDC
├─order
object-
├─order_hash
stringCryptographic EIP-712 order hash identifying the unique off-chain order
├─shares
stringOriginal clob order shares capacity in 10^6 scale
├─signature_type
integerSignature scheme encoding (0: Direct EOA, 1: Magic / Proxy Wallet, 2: Gnosis Safe, 3: Deposit Wallet (ERC-1271))
├─timestamp
stringUnix epoch seconds when the order was signed
├─usdc
stringOriginal clob order notional value in micro-USDC (10^6 scale)
├─outcome
stringMarket outcome label (e.g. "Yes", "No", "Up", "Down")
├─shares
stringFilled outcome shares amount represented as a 10^6 fixed-point decimal string
├─side
stringOrder execution direction: "BUY" or "SELL"
├─token_ids_index
integer0-based index matching market.token_ids and market.outcomes
├─usdc
stringFilled USDC notional amount in micro-USDC (10^6 scale) decimal string
├─user
object-
├─address
stringCanonical 42-character hexadecimal Ethereum/Polygon wallet address
├─name
stringPolymarket public username
market
object-
├─condition_id
string32-byte hexadecimal condition ID from Gnosis Conditional Tokens
├─event_slug
stringURL slug of the parent event containing this market
├─group_item_title
stringSub-category item title within a grouped multi-market event
├─id
integerPolymarket numeric prediction market identifier (e.g. 3688221)
├─neg_risk
booleanTrue if market operates under multi-outcome negative risk adapter
├─outcomes
string[]Array of market outcome labels: [Outcome 1, Outcome 2] (e.g. ["Yes", "No"])
├─question
stringFull question describing the prediction market condition
├─series_slug
stringURL slug of the recurring sports league or tournament series
├─slug
stringURL-friendly slug identifying the market on Polymarket
├─sports_market_type
stringSports market classification (e.g. moneyline, spread, over/under)
├─start_date
stringISO 8601 UTC timestamp when trading began
├─tags_slug
string[]Canonical categorical tags for content filtering
├─token_ids
string[]ERC-1155 token IDs: [Token 1, Token 2]
taker
object-
├─fee
stringExecution and relayer fee paid in micro-USDC
├─order
object-
├─order_hash
stringCryptographic EIP-712 order hash identifying the unique off-chain order
├─shares
stringOriginal clob order shares capacity in 10^6 scale
├─signature_type
integerSignature scheme encoding (0: Direct EOA, 1: Magic / Proxy Wallet, 2: Gnosis Safe, 3: Deposit Wallet (ERC-1271))
├─timestamp
stringUnix epoch seconds when the order was signed
├─usdc
stringOriginal clob order notional value in micro-USDC (10^6 scale)
├─outcome
stringMarket outcome label (e.g. "Yes", "No", "Up", "Down")
├─shares
stringFilled outcome shares amount represented as a 10^6 fixed-point decimal string
├─side
stringOrder execution direction: "BUY" or "SELL"
├─token_ids_index
integer0-based index matching market.token_ids and market.outcomes
├─usdc
stringFilled USDC notional amount in micro-USDC (10^6 scale) decimal string
├─user
object-
├─address
stringCanonical 42-character hexadecimal Ethereum/Polygon wallet address
├─name
stringPolymarket public username
timestamp
stringISO 8601 UTC timestamp (millisecond precision) indicating when the pending transaction was detected in the mempool
tx_hash
stringCanonical Ethereum/Polygon on-chain transaction hash confirming the match execution

cURL 示例

在终端中直接复制并运行此命令测试该接口。

cURL: GET /streams/{id}
bash
curl -N "https://stream.polyedge.dev/streams/9bae9005-9ef1-4f17-8658-36ea54536836" \
  -H "X-PolyEdge-Key: Your-PolyEdge-ApiKey"