Skip to main content

Incremental depth

Request format

depth_update@{symbol},{interval}
  • Interval options: 100, 250, 500, 1000 (default: 100ms)
  • Example: depth_update@btc_usdt,100ms

Request example

Subscribe — After establishing the WebSocket connection, send the following JSON string.

SUBSCRIBE
{
"method": "SUBSCRIBE",
"params": ["depth_update@btc_usdt,100ms"],
"id": "test" // this param could call whatever you want
}

Response example

{
"topic": "depth_update",
"event": "depth_update@btc_usdt",
"data": {
"s": "btc_usdt", // symbol
"pu": 120, // previousUpdateId = previous lastUpdateId
"fu": 121, // firstUpdateId = previous lastUpdateId + 1
"u": 123, // lastUpdateId
"a": [
// asks
["34000", "1.2"],
["34001", "2.3"]
],
"b": [
// bids
["32000", "0.2"],
["31000", "0.5"]
],
"t": 123456789 // timestamp
}
}