Digital Assets Channel

This WebSocket channel provides you updates related to your digital asset orders and trades. Please see our WebSocket guide for information on Authentication with WebSockets and common messages.

When you subscribe to this channel, the server first replays the current state of your orders and recent trades, then sends a Replay Complete message, and then continues with live updates.

Every message the server sends on this channel carries a channel field set to digital-assets, 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

You send the following message when you want to subscribe to this channel for a particular account.

{
  "authorization": "<access-token>",
  "payload": {
    "type": "subscribe-digital-assets",
    "account_id": "<account-id>"
  }
}
FieldTypeRequiredDescription
authorizationstringYesYour access token.
payload.typestringYesAlways subscribe-digital-assets.
payload.account_idstringYesAccount you want to subscribe to.

Subscribe Digital Assets 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",
  "payload": {
    "type": "subscribe-digital-assets-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.
payload.typestringYesAlways subscribe-digital-assets-ack.
payload.account_idstringYesThe account you sent in your request echoed back.
payload.successbooleanYesTrue if successful, false otherwise.
payload.detailsstringYesAdditional details.

Replay Complete

You receive this message after the current state of your orders and trades has been replayed. This message lets you know that the replay is complete and that subsequent messages are live updates.

{
  "timestamp": 1711076847030,
  "channel": "digital-assets",
  "payload": {
    "type": "replay-complete"
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
channelstringYesAlways digital-assets.
payload.typestringYesAlways replay-complete.

Digital Asset Order Update

You receive this message anytime a digital asset order is created or changes state.

{
  "timestamp": 1711076847030,
  "channel": "digital-assets",
  "payload": {
    "type": "digital-asset-order-update",
    "data": {...}
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
channelstringYesAlways digital-assets.
payload.typestringYesAlways digital-asset-order-update.
payload.dataobjectYesDigital asset order object in the same shape as the response to Get digital asset order.

Digital Asset Trade Notice

You receive this message anytime a digital asset order is executed against.

{
  "timestamp": 1711076847030,
  "channel": "digital-assets",
  "payload": {
    "type": "digital-asset-trade-notice",
    "data": {...}
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
channelstringYesAlways digital-assets.
payload.typestringYesAlways digital-asset-trade-notice.
payload.dataobjectYesDigital asset trade object in the same shape as the response to Get digital asset trade.