Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Server Messages

All server messages have this structure:

{
  "channel": "<channel_name>",
  "data": {
    ...
  }
}

Channels

ChannelDescription
subscriptionResponseConfirms subscription/unsubscription
l1BookTop of book data
l2BookAggregated book levels
l3BookOrder-level book (lightweight)
l4BookOrder-level book (full detail)
allMidsAll mid prices
tradesTrade stream
candleCandlestick data
impactPriceImpact price calculations
orderUpdatesOrder status updates
userFillsUser fill notifications
postQuery response
pongPing response
errorError 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 request
  • Invalid spot subscription
  • Invalid subscription based on universe
  • Already subscribed
  • Already unsubscribed
  • Failed to get order book universe
  • Failed to get order book snapshot