Market Data
{ "method": "subscribe", "subscription": { "type": "orderBook", "symbol": "BTCUSDC", "depth": 50 } }Param
Type
Required
Description
Responses
200
Push data
application/json
channelstringOptionalExample:
orderBookpost/ws/subscribe/orderBook
ws.send(JSON.stringify({
method: "subscribe",
subscription: { type: "orderBook", symbol: "BTCUSDC", depth: 50 },
}));
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.channel === "orderBook") {
console.log("bids:", msg.data.book.bids);
console.log("asks:", msg.data.book.asks);
}
};
200
Push data
{
"channel": "orderBook",
"data": {
"type": "snapshot",
"symbolCode": 1,
"symbol": "BTCUSDC",
"block": 16105909,
"sequence": 3846532,
"depth": 5,
"timestamp": 1776920283896,
"book": {
"bids": [
[
"77907",
"0.159"
],
[
"77906.5",
"0.093"
]
],
"asks": [
[
"77908",
"0.120"
],
[
"77908.5",
"0.085"
]
]
}
}
}{ "method": "subscribe", "subscription": { "type": "candle", "symbol": "BTCUSDC", "interval": "60" } }Param
Type
Required
Description
Responses
200
Push data
application/json
channelstringOptionalExample:
candlepost/ws/subscribe/candle
ws.send(JSON.stringify({
method: "subscribe",
subscription: { type: "candle", symbol: "BTCUSDC", interval: "60" },
}));
200
Push data
{
"channel": "candle",
"data": {
"symbolName": "BTCUSDC",
"timestamp": 1776920280,
"intrvl": 60,
"open": "77900.5",
"high": "77950.0",
"low": "77880.0",
"close": "77920.3",
"volume": "12.530",
"turnover": "976234.5",
"tradeCount": 48
}
}{ "method": "subscribe", "subscription": { "type": "trades", "symbol": "BTCUSDC" } }Param
Type
Required
Responses
200
Push data
application/json
channelstringOptionalExample:
tradespost/ws/subscribe/trades
ws.send(JSON.stringify({
method: "subscribe",
subscription: { type: "trades", symbol: "BTCUSDC" },
}));
200
Push data
{
"channel": "trades",
"data": {
"type": "snapshot",
"sequence": 123456,
"symbol": "BTCUSDC",
"trades": [
{
"symbol": "BTCUSDC",
"ordSide": "BUY",
"filledPx": "77920.3",
"filledQty": "0.050",
"transactionTime": 1776920283000,
"txHash": "ABC123..."
}
]
}
}{ "method": "subscribe", "subscription": { "type": "ticker", "symbol": "BTCUSDC" } }Param
Type
Required
Responses
200
Push data
application/json
channelstringOptionalExample:
tickerpost/ws/subscribe/ticker
ws.send(JSON.stringify({
method: "subscribe",
subscription: { type: "ticker", symbol: "BTCUSDC" },
}));
200
Push data
{
"channel": "ticker",
"data": {
"type": "snapshot",
"sequence": 123456,
"timestamp": 1776920283000,
"symbol": "BTCUSDC",
"ticker": {
"s": "BTCUSDC",
"p": "77920.3",
"op": "77900.0",
"mp": "77915.5",
"mid": "77910.0",
"oi": "1500.250",
"fr": "0.0001",
"lfr": "0.0001",
"o": "77500.0",
"h": "78200.0",
"l": "77100.0",
"v": "2350.500",
"tv": "183250000",
"P": "0.0054"
}
}
}{ "method": "subscribe", "subscription": { "type": "allTickers" } }Responses
200
Push data — same as ticker but with tickers array
application/json
post/ws/subscribe/allTickers
ws.send(JSON.stringify({
method: "subscribe", subscription: { type: "allTickers" },
}));
200
Push data — same as ticker but with tickers array
{
"channel": "allTickers",
"data": {
"type": "snapshot",
"sequence": 123456,
"timestamp": 1776920283000,
"tickers": [
{
"s": "BTCUSDC",
"p": "77920.3",
"mp": "77915.5",
"v": "2350.500"
},
{
"s": "ETHUSDC",
"p": "2450.8",
"mp": "2449.5",
"v": "18000.00"
}
]
}
}Last updated

