Order Book Information
Provides order book data queries for futures trading pairs, supporting price precision aggregation and depth level limits.
Get Order Book Information
Get order book data for a specified futures trading pair, with support for price precision aggregation and depth level limits.
API Information
- Method:
GET - Path:
/fapi/v1/depth
Request Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| symbol | query | string | Yes | Trading pair, e.g. BTC_USDT |
| precision | query | integer | No | Price precision (decimal places). If omitted, original precision is returned |
| limit | query | integer | No | Depth level limit, default 100, max 5000 |
| with_id | query | boolean | No | Whether to return the sequence ID |
Request Example
GET /fapi/v1/depth?symbol=BTC_USDT&limit=100&with_id=true
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Error code, 0 indicates success |
| message | string | Error message |
| data | object | Order book data |
| data.symbol | string | Trading pair |
| data.asks | array | Ask levels in the format [[price, qty], ...] |
| data.bids | array | Bid levels in the format [[price, qty], ...] |
| data.id | integer | Sequence ID (returned when with_id=true) |
| data.timestamp | integer | Timestamp (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
| HTTP Status | code | Description |
|---|---|---|
| 400 | 4000 | Invalid parameter, such as symbol is required |
| 503 | - | Service unavailable |
{
"code": 4000,
"data": null,
"message": "symbol is required"
}
Get Synchronization Status
Get the order book synchronization status of all futures trading pairs.
API Information
- Method:
GET - Path:
/fapi/v1/depth/status
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Error code, 0 indicates success |
| message | string | Error message |
| data | object | Synchronization status data |
| data.symbols | object | Trading pair synchronization status map (key=trading pair, value=status string) |
Response Example
{
"code": 0,
"message": "success",
"data": {
"symbols": {
"BTC_USDT": "synced",
"ETH_USDT": "syncing"
}
}
}