Skip to main content

Order Book Depth

Provides order book depth data query for trading pairs, supports price precision aggregation and level limits.


Get Order Book Depth

Get order book depth data for a specified trading pair, supports price precision aggregation and level limits.

API Information

  • Method: GET
  • Path: /api/v1/depth

Request Parameters

ParameterLocationTypeRequiredDescription
symbolquerystringYesTrading pair, e.g. BTC_USDT
precisionqueryintegerNoPrice precision (decimal places), returns original precision if not specified
limitqueryintegerNoNumber of levels, default 100, max 5000
with_idquerybooleanNoWhether to return sequence number

Request Example

GET /api/v1/depth?symbol=BTC_USDT&limit=100&with_id=true

Response Fields

FieldTypeDescription
codeintegerError code, 0 indicates success
messagestringError message
dataobjectDepth data
data.symbolstringTrading pair
data.asksarrayAsk levels, format [[price, qty], ...]
data.bidsarrayBid levels, format [[price, qty], ...]
data.idintegerSequence number (returned when with_id=true)
data.timestampintegerTimestamp (milliseconds)

Response Example

{
"code": 0,
"message": "success",
"data": {
"symbol": "BTC_USDT",
"asks": [
["42166.00", "0.125"],
["42167.00", "0.250"]
],
"bids": [
["42165.00", "0.310"],
["42164.00", "0.500"]
],
"id": 12345,
"timestamp": 1768051394008
}
}

Error Response

Status CodecodeDescription
4004000Parameter error, e.g. symbol is required
503-Service unavailable
{
"code": 4000,
"data": null,
"message": "symbol is required"
}

Get Sync Status

Get depth synchronization status for all trading pairs.

API Information

  • Method: GET
  • Path: /api/v1/depth/status

Request Parameters

None

Request Example

GET /api/v1/depth/status

Response Fields

FieldTypeDescription
codeintegerError code, 0 indicates success
messagestringError message
dataobjectSync status data
data.symbolsobjectTrading pair sync status mapping (key is trading pair, value is status string)

Response Example

{
"code": 0,
"message": "success",
"data": {
"symbols": {
"BTC_USDT": "synced",
"ETH_USDT": "syncing"
}
}
}