Skip to main content

Get Order Book

Description​

Query order book depth

HTTP Request​

  • POST /api/v3/market/depth
  • Supported Products: spot / linear
  • Rate Limit: 10 requests per second per IP

Request Parameters​

ParameterTypeRequiredDescription
categorystringYesProduct type: spot / linear
symbolstringYesTrading pair
depthintNoNumber of order book levels. Default 5, maximum 200.

Response Parameters​

FieldTypeRequiredDescription
symbolstringYesTrading pair
snapshotTimestring(long)YesSnapshot time (ms)
bidsarrayYesBid levels in [{price, quantity}, ...] format, sorted by descending price.
asksarrayYesAsk levels in [{price, quantity}, ...] format, sorted by ascending price.
lastPricestringNoLast price

Request Example​

POST /api/v3/market/depth HTTP/1.1
Host: openapi.lbank.com
Content-Type: application/json
ex-timestamp: <current_unix_timestamp_ns>

{
"category": "spot",
"symbol": "btc_usdt",
"depth": 2
}

Response Example​

{
"code": 200,
"message": "Success",
"data": {
"symbol": "btc_usdt",
"snapshotTime": "1793193415243",
"bids": [
{
"price": "88888.006",
"quantity": "12.087"
},
{
"price": "88887.753",
"quantity": "43"
}
],
"asks": [
{
"price": "88888.007",
"quantity": "92.251"
},
{
"price": "88888.039",
"quantity": "26.804"
}
],
"lastPrice": "88888.006"
},
"extras": null
}