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>"
}
}| Field | Type | Required | Description |
|---|---|---|---|
authorization | string | Yes | Your access token. |
payload.type | string | Yes | Always subscribe-digital-assets. |
payload.account_id | string | Yes | Account 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"
}
}| Field | Type | Required | Description |
|---|---|---|---|
timestamp | number | Yes | Milliseconds since epoch timestamp of when the server sent the message. |
channel | string | Yes | Always digital-assets. |
payload.type | string | Yes | Always subscribe-digital-assets-ack. |
payload.account_id | string | Yes | The account you sent in your request echoed back. |
payload.success | boolean | Yes | True if successful, false otherwise. |
payload.details | string | Yes | Additional 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"
}
}| Field | Type | Required | Description |
|---|---|---|---|
timestamp | number | Yes | Milliseconds since epoch timestamp of when the server sent the message. |
channel | string | Yes | Always digital-assets. |
payload.type | string | Yes | Always 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": {...}
}
}| Field | Type | Required | Description |
|---|---|---|---|
timestamp | number | Yes | Milliseconds since epoch timestamp of when the server sent the message. |
channel | string | Yes | Always digital-assets. |
payload.type | string | Yes | Always digital-asset-order-update. |
payload.data | object | Yes | Digital 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": {...}
}
}| Field | Type | Required | Description |
|---|---|---|---|
timestamp | number | Yes | Milliseconds since epoch timestamp of when the server sent the message. |
channel | string | Yes | Always digital-assets. |
payload.type | string | Yes | Always digital-asset-trade-notice. |
payload.data | object | Yes | Digital asset trade object in the same shape as the response to Get digital asset trade. |