{
"id": 1,
"cmd": "subscribe",
"params": {
"channels": [
"orderbook_delta"
],
"market_ticker": "CPI-22DEC-TN0.1"
}
}
{
"id": 124,
"cmd": "unsubscribe",
"params": {
"sids": [
1,
2
]
}
}
{
"id": 3,
"cmd": "list_subscriptions"
}
{
"id": 124,
"cmd": "update_subscription",
"params": {
"sids": [
456
],
"market_tickers": [
"NEW-MARKET-1",
"NEW-MARKET-2"
],
"action": "add_markets"
}
}
{
"id": 125,
"cmd": "update_subscription",
"params": {
"sids": [
456
],
"market_tickers": [
"MARKET-TO-REMOVE-1",
"MARKET-TO-REMOVE-2"
],
"action": "delete_markets"
}
}
{
"id": 126,
"cmd": "update_subscription",
"params": {
"sid": 456,
"market_tickers": [
"NEW-MARKET-3",
"NEW-MARKET-4"
],
"action": "add_markets"
}
}
{
"id": 1,
"type": "subscribed",
"msg": {
"channel": "orderbook_delta",
"sid": 1
}
}
{
"sid": 2,
"type": "unsubscribed"
}
{
"id": 123,
"sid": 456,
"seq": 222,
"type": "ok",
"market_tickers": [
"MARKET-1",
"MARKET-2",
"MARKET-3"
]
}
{
"id": 3,
"type": "ok",
"subscriptions": [
{
"channel": "orderbook_delta",
"sid": 1
},
{
"channel": "ticker",
"sid": 2
},
{
"channel": "fill",
"sid": 3
}
]
}
{
"id": 123,
"type": "error",
"msg": {
"code": 6,
"msg": "Already subscribed"
}
}
Main WebSocket connection endpoint. All communication happens through this single connection. Use the subscribe command to subscribe to specific data channels. For more information, see the Getting Started guide.
{
"id": 1,
"cmd": "subscribe",
"params": {
"channels": [
"orderbook_delta"
],
"market_ticker": "CPI-22DEC-TN0.1"
}
}
{
"id": 124,
"cmd": "unsubscribe",
"params": {
"sids": [
1,
2
]
}
}
{
"id": 3,
"cmd": "list_subscriptions"
}
{
"id": 124,
"cmd": "update_subscription",
"params": {
"sids": [
456
],
"market_tickers": [
"NEW-MARKET-1",
"NEW-MARKET-2"
],
"action": "add_markets"
}
}
{
"id": 125,
"cmd": "update_subscription",
"params": {
"sids": [
456
],
"market_tickers": [
"MARKET-TO-REMOVE-1",
"MARKET-TO-REMOVE-2"
],
"action": "delete_markets"
}
}
{
"id": 126,
"cmd": "update_subscription",
"params": {
"sid": 456,
"market_tickers": [
"NEW-MARKET-3",
"NEW-MARKET-4"
],
"action": "add_markets"
}
}
{
"id": 1,
"type": "subscribed",
"msg": {
"channel": "orderbook_delta",
"sid": 1
}
}
{
"sid": 2,
"type": "unsubscribed"
}
{
"id": 123,
"sid": 456,
"seq": 222,
"type": "ok",
"market_tickers": [
"MARKET-1",
"MARKET-2",
"MARKET-3"
]
}
{
"id": 3,
"type": "ok",
"subscriptions": [
{
"channel": "orderbook_delta",
"sid": 1
},
{
"channel": "ticker",
"sid": 2
},
{
"channel": "fill",
"sid": 3
}
]
}
{
"id": 123,
"type": "error",
"msg": {
"code": 6,
"msg": "Already subscribed"
}
}
API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake.
GET
Subscribe to one or more channels
Cancel one or more subscriptions
List all active subscriptions
Add markets to an existing subscription
Remove markets from an existing subscription
Update subscription using sid parameter instead of sids array
Confirmation that subscription was successful
Confirmation that unsubscription was successful
Successful update operation response
Response containing all active subscriptions
Error response for failed operations