Server Messages
All server messages have this structure:
{
"channel": "<channel_name>",
"data": {
...
}
}Channels
| Channel | Description |
|---|---|
subscriptionResponse | Confirms subscription/unsubscription |
l1Book | Top of book data |
l2Book | Aggregated book levels |
l3Book | Order-level book (lightweight) |
l4Book | Order-level book (full detail) |
allMids | All mid prices |
trades | Trade stream |
candle | Candlestick data |
impactPrice | Impact price calculations |
orderUpdates | Order status updates |
userFills | User fill notifications |
post | Query response |
pong | Ping response |
error | Error message |
Subscription Response
Confirms subscription or unsubscription.
{
"channel": "subscriptionResponse",
"data": {
"method": "subscribe",
"subscription": {
"type": "l2Book",
"coin": "BTC",
...
}
}
}Pong
Response to ping.
{
"channel": "pong"
}Error
{
"channel": "error",
"data": {
"error": "Invalid subscription based on universe: ..."
}
}Error Types
Invalid websocket requestInvalid spot subscriptionInvalid subscription based on universeAlready subscribedAlready unsubscribedFailed to get order book universeFailed to get order book snapshot
