{
"id": 1,
"cmd": "subscribe",
"params": {
"channels": [
"orderbook_delta"
],
"market_ticker": "CPI-22DEC-TN0.1"
}
}
{
"id": 124,
"cmd": "unsubscribe",
"params": {
"sids": [
1,
2
]
}
}
{
"id": 124,
"cmd": "update_subscription",
"params": {
"sids": [
456
],
"market_tickers": [
"NEW-MARKET-1",
"NEW-MARKET-2"
],
"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": 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.
{
"id": 1,
"cmd": "subscribe",
"params": {
"channels": [
"orderbook_delta"
],
"market_ticker": "CPI-22DEC-TN0.1"
}
}
{
"id": 124,
"cmd": "unsubscribe",
"params": {
"sids": [
1,
2
]
}
}
{
"id": 124,
"cmd": "update_subscription",
"params": {
"sids": [
456
],
"market_tickers": [
"NEW-MARKET-1",
"NEW-MARKET-2"
],
"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": 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
Add or remove markets from an existing subscription
Confirmation that subscription was successful
Confirmation that unsubscription was successful
Successful update operation response
Error response for failed operations