Order Book Depth
Get the buy/sell order book depth data for a specified trading pair.
Interface Information
- Method:
GET - Path:
/api/v1/stock/open-api/depth
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair, e.g., XSM |
| limit | int | No | Number of levels to return, default 20, max 400 |
Request Example
GET /api/v1/stock/open-api/depth?symbol=XSM&limit=20
Response Fields
| Field | Type | Description |
|---|---|---|
| code | int | Status code |
| msg | string | Status message |
| data.symbol | string | Trading pair |
| data.bids | array | Bids, [[price, quantity], ...] |
| data.asks | array | Asks, [[price, quantity], ...] |
| data.timestamp | int64 | Timestamp |
Note
bidsare sorted from highest to lowest priceasksare sorted from lowest to highest price
Response Example
{
"code": 0,
"msg": "success",
"data": {
"symbol": "XSM",
"bids": [
["185.50", "1000"],
["185.40", "500"]
],
"asks": [
["185.60", "800"],
["185.70", "1200"]
],
"timestamp": 1705737600000
}
}