WebSocket API
Trades Channel
Real-time trade prints per market
Channel name: trade
Subscription
{ "op": "sub", "channel": "trade", "params": { "market": "BTC-PERP" } }params.market is optional. Omit to receive trades for all markets.
Message Types
This channel emits update messages only (no snapshot).
{
"channel": "trade",
"filter": "BTC-PERP",
"type": "update",
"data": {
"id": "0x1234...",
"mkr_sd": "ORDER_SIDE_BUY",
"px": "50000.00",
"sz": "0.5",
"quote_sz": "25000.00"
},
"gsn": 12345,
"ts": "1234567890000000000"
}Fields
| Field | Type | Description |
|---|---|---|
filter | string | Market ID (e.g. "BTC-PERP") |
data.id | string | Unique trade identifier |
data.mkr_sd | string | Maker side — "ORDER_SIDE_BUY" or "ORDER_SIDE_SELL" |
data.px | string | Execution price |
data.sz | string | Executed size in base asset |
data.quote_sz | string | Executed size in quote asset |
ts | string | Trade timestamp in nanoseconds |
gsn | number | Global sequence number |
These fields match the v1MarketTrade schema in the REST API response for GET /markets/{mkt_id}/trades.