Skip to main content

Market Trades

Real-time anonymous trade tape for one instrument. Public channel — no authentication required. The wire format mirrors the REST PublicTrade schema returned by GET /market-trades, so the same parser can be used for both.

Subscribe

{"op": "subscribe", "args": ["market-trades:BTCUSDC_PERP"]}

Topic format: market-trades:{symbol}, e.g. market-trades:BTCUSDC_PERP.

{"op": "subscribed", "channel": "market-trades:BTCUSDC_PERP"}

No initial snapshot is sent — clients that need recent history should call GET /market-trades once on subscribe and then merge live events as they arrive.

Trade Message

{
"channel": "market-trades:BTCUSDC_PERP",
"type": "trade",
"symbol": "BTCUSDC_PERP",
"side": "buy",
"price": "67542.50",
"quantity": "150",
"timestamp": "2025-06-15T07:29:45Z"
}
  • side: aggressor side (buy or sell).
  • price, quantity, timestamp: identical semantics to the REST /market-trades response.

Errors

Upstream failures raise a channel-scoped error envelope:

{"op": "error", "code": "MARKET_TRADES_UPSTREAM_ERROR", "message": "upstream disconnected", "args": ["market-trades:BTCUSDC_PERP"]}

Clients should re-issue subscribe to recover.