Digital Assets Market Data Channel

This WebSocket channel provides you real-time market data for a set of digital asset symbols. Please see our WebSocket guide for information on Authentication with WebSockets and common messages.

After you subscribe, the server streams market data snapshots for the subscribed symbols as they change.

Every message the server sends on this channel carries a channel field set to digital-assets-market-data, except heartbeats, which carry no channel. Use it to route messages when you are subscribed to more than one channel on the same socket.

Subscribe Digital Assets Market Data

You send the following message when you want to subscribe to market data for a particular account and set of symbols.

{
  "authorization": "<access-token>",
  "payload": {
    "type": "subscribe-digital-assets-market-data",
    "account_id": "<account-id>",
    "symbols": ["CLST.SPOT.BTC-USD"]
  }
}
FieldTypeRequiredDescription
authorizationstringYesYour access token.
payload.typestringYesAlways subscribe-digital-assets-market-data.
payload.account_idstringYesAccount you want to subscribe to.
payload.symbolsstring[]YesThe digital asset symbols to subscribe to.

Subscribe Digital Assets Market Data Ack

You receive this message to indicate success or failure of the subscription request you sent. Note, if your request is malformed or otherwise not parsable, you'll instead get an Error Notice.

{
  "timestamp": 1711076847030,
  "channel": "digital-assets-market-data",
  "payload": {
    "type": "subscribe-digital-assets-market-data-ack",
    "account_id": "<account-id>",
    "success": true,
    "details": "Subscribed successfully"
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
channelstringYesAlways digital-assets-market-data.
payload.typestringYesAlways subscribe-digital-assets-market-data-ack.
payload.account_idstringYesThe account you sent in your request echoed back.
payload.successbooleanYesTrue if successful, false otherwise.
payload.detailsstringYesAdditional details.

Digital Asset Market Data Update

You receive this message anytime the market data for a subscribed symbol changes. Each update is a snapshot for a single symbol.

{
  "timestamp": 1711076847030,
  "channel": "digital-assets-market-data",
  "payload": {
    "type": "digital-asset-market-data-update",
    "data": {
      "symbol": "CLST.SPOT.BTC-USD",
      "account_id": "<account-id>",
      "bid": [{ "price": 64999.5, "quantity": 0.5 }],
      "ask": [{ "price": 65000.5, "quantity": 0.5 }],
      "trade": [{ "price": 65000.0, "quantity": 0.1 }],
      "closing": [{ "price": 64000.0, "quantity": 0.0 }]
    }
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
channelstringYesAlways digital-assets-market-data.
payload.typestringYesAlways digital-asset-market-data-update.
payload.dataobjectYesMarket data snapshot for a single symbol.
payload.data.symbolstringYesThe digital asset symbol this snapshot is for.
payload.data.account_idstringYesThe account this snapshot belongs to.
payload.data.bidarrayNoBid-side price levels.
payload.data.askarrayNoAsk-side price levels.
payload.data.tradearrayNoRecent trade prints.
payload.data.closingarrayNoClosing price levels.

Each entry in the bid, ask, trade, and closing arrays is a price level object:

FieldTypeRequiredDescription
pricestringYesThe price at this level.
quantitynumberYesThe quantity at this level.