WebSocket subscriptions
Single endpoint /ws supports multiple multiplexed subscriptions per connection. Authenticate user-scoped channels by passing { method: “sessionAuth”, sessionId } before subscribing.
Subscribe / unsubscribe message
Section titled “Subscribe / unsubscribe message”// Subscribe{ "method": "subscribe", "subscription": { "type": "trades", "coin": "BTC" } }
// Unsubscribe{ "method": "unsubscribe", "subscription": { "type": "trades", "coin": "BTC" } }
// Server push{ "channel": "subscription", "subscription": { "type": "trades", "coin": "BTC" }, "data": [ ...trade events... ] }| Channel | Description |
|---|---|
allMids | Mid price snapshot for every market |
marketSummary { coin } | Mark price, funding, oracle status for a market |
l2Book { coin } | Incremental L2 order book updates |
trades { coin } | Public trade tape for a market |
candle { coin, interval } | Aggregated candles |
userEvents { user } | Per-user balance / position / margin updates |
orderUpdates { user } | Per-user open-order changes |
executionReports { user } | Per-user fill / reject / cancel reports |