跳至主要內容

查詢深度數據

描述​

查詢盤口深度

HTTP 請求​

  • POST /api/v3/market/depth
  • 適用產品:spot / linear
  • 限頻規則:10次 / S / IP

請求參數​

參數類型必填說明
categorystring是產品類型:spot / linear
symbolstring是交易對
depthint否深度檔位數,默認5,最大200

回應參數​

欄位類型必填說明
symbolstring是交易對
snapshotTimestring(long)是快照時間(ms)
bidsarray是[{price, quantity}, ...] 買盤,價高到低
asksarray是[{price, quantity}, ...] 賣盤,價低到高
lastPricestring否最新價

請求示例​

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
}

回應示例​

{
"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
}