查詢深度數據
描述
查詢盤口深度
HTTP 請求
- POST
/api/v3/market/depth - 適用產品:
spot/linear - 限頻規則:10次 / S / IP
請求參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
category | string | 是 | 產品類型:spot / linear |
symbol | string | 是 | 交易對 |
depth | int | 否 | 深度檔位數,默認5,最大200 |
回應參數
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
symbol | string | 是 | 交易對 |
snapshotTime | string(long) | 是 | 快照時間(ms) |
bids | array | 是 | [{price, quantity}, ...] 買盤,價高到低 |
asks | array | 是 | [{price, quantity}, ...] 賣盤,價低到高 |
lastPrice | string | 否 | 最新價 |
請求示例
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
}