Get Full Order Book - Level 2
Get a snapshot of aggregated open orders for a symbol.
Level 2 order book includes all bids and asks (aggregated by price). This level returns only one aggregated size for each price (as if there was only one single order for that price).
This API will return data with full depth.
It is generally used by professional traders because it uses more server resources and traffic, and we have strict access frequency control.
To maintain up-to-date Order Book, please use Websocket incremental feed after retrieving the Level 2 snapshot.
In the returned data, the sell side is sorted low to high by price and the buy side is sorted high to low by price.
HTTP REQUEST
GET /api/v1/level2/snapshot
Example
GET /api/v1/level2/snapshot?symbol=XBTUSDM
{
"code": "200000",
"data": {
"symbol": "XBTUSDM", //Symbol
"sequence": 100, //Ticker sequence number
"asks": [
["5000.0", 1000], //Price, quantity
["6000.0", 1983] //Price, quantity
],
"bids": [
["3200.0", 800], //Price, quantity
["3100.0", 100] //Price, quantity
],
"ts": 1604643655040584408 // timestamp
}
}
REQUEST URL
This endpoint support Futures URL
REQUEST RATE LIMIT
Public weight
:3
PARAMETERS
Param | Type | Description |
---|---|---|
symbol | String | Symbol of the contract |
RESPONSES
Param | Description |
---|---|
symbol | Symbol |
sequence | Ticker sequence number |
asks | asks. [Price, quantity] |
bids | bids. [Price, quantity] |
ts | timestamp |