Rate Limit: 1 requests per 1 seconds per IP
{
"action":"SUBSCRIBE",
"args":[
{
"channel":"ORDER_BOOK",
"instId":"BINANCE_SPOT_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKX_SPOT_BTC_USDT"
},{
"channel":"ORDER_BOOK",
"instId":"BINANCE_PERP_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKX_PERP_BTC_USDT"
}
]
}
Field name | Type | Necessary | Remarks |
---|
action | String | Y | Action |
args | Array | Y | Subscribe param,there can be no more than 20 instId parameters per subscribe |
> channel | String | Y | Channel name |
> instId | String | Y | Unique identifier |
{
"event": "SUBSCRIBE",
"args": [
{
"channel":"ORDER_BOOK",
"instId":"BINANCE_SPOT_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKEX_SPOT_BTC_USDT"
},{
"channel":"ORDER_BOOK",
"instId":"BINANCE_PERP_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKX_PERP_BTC_USDT"
}
],
"code": 0
}
Field | Type | Remarks |
---|
event | String | Event |
code | String | Code |
args | Array | Data |
> channel | String | Channel |
> instId | String | Unique identifier |
{
"instId": "BINANCE_SPOT_BNB_USDT",
"publicChannelTypeEnum": "ORDER_BOOK",
"exchangeTs": 1701048908942000000,
"localTs": 1701048908944715333,
"seqNum": 685893995,
"ltp": 231.7,
"ttv": 5.77130203645613E9,
"ttq": 2.3642697332062364E7,
"symbol": "BNBUSDT",
"bookId": 0,
"exchange": "BINANCE_SPOT",
"tradingState": "NORMAL",
"levelsBids": [
{
"price": 231.6,
"qty": 282.5720000000001
},
{
"price": 231.5,
"qty": 701.415
},
{
"price": 231.4,
"qty": 688.059
}
],
"levelsAsks": [
{
"price": 231.7,
"qty": 407.454
},
{
"price": 231.8,
"qty": 479.671
},
{
"price": 231.9,
"qty": 554.856
},
{
"price": 232.0,
"qty": 464.976
}
],
"updates": [
{
"price": 231.7,
"qty": 0.258,
"side": "SELL",
"type": "TRADE",
"level": 0
}
]
}
Field | Type | Remarks |
---|
instId | String | Unique identifier |
publicChannelTypeEnum | String | PublicChannelType, example: ORDER_BOOK |
exchangeTs | Long | Exchange timestamp |
localTs | Long | Local timestamp |
seqNum | Long | Message sequence number |
ltp | Double | Last traded price |
ttv | Double | Latest traded volume |
ttq | Double | Latest traded quote |
symbol | String | Trading symbol , example: BTCUSDT |
bookId | Integer | Book ID |
exchange | String | Exchange |
tradingState | String | Trading state(NORMAL,CLOSE) |
levelsBids | Array | Bid levels, up to 50 levels |
> price | Double | Price |
> qty | Double | Quantity |
levelsAsks | Array | Ask levels, up to 50 levels |
> price | Double | Price |
> qty | Double | Quantity |
updates | Array | Updates, up to 50 items |
> price | Double | Price |
> qty | Double | Quantity |
> side | String | Side(BUY,SELL) |
> type | String | Update type(ADD,DELETE,MODIFY) |
> level | Integer | Level of the order book |
Rate Limit: 1 requests per 1 seconds per IP
{
"action":"UNSUBSCRIBE",
"args":[
{
"channel":"ORDER_BOOK",
"instId":"BINANCE_SPOT_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKX_SPOT_BTC_USDT"
},{
"channel":"ORDER_BOOK",
"instId":"BINANCE_PERP_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKX_PERP_BTC_USDT"
}
]
}
Field name | Type | Necessary | Remarks |
---|
action | String | Y | Action |
args | Array | Y | Data |
> channel | String | Y | Channel name |
> instId | String | Y | Unique identifier |
{
"event": "UNSUBSCRIBE",
"args": [
{
"channel":"ORDER_BOOK",
"instId":"BINANCE_SPOT_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKX_SPOT_BTC_USDT"
},{
"channel":"ORDER_BOOK",
"instId":"BINANCE_PERP_BTC_USDT"
},
{
"channel":"ORDER_BOOK",
"instId":"OKX_PERP_BTC_USDT"
}
],
"code": 0
}
Field | Type | Remarks |
---|
event | String | Event |
code | String | Code |
args | Array | Data |
> channel | String | Channel name |
> instId | String | Unique identifier |