Get Part Order Book - Level 2

This interface can obtain the order data of the specified contract.

The buy and sell orders on the order book are aggregated according to the price, and only one pending order volume aggregated according to the price is returned under each price.

This interface will only return part of the order data, level2_20 means to return 20 pieces of data for each buy and sell, and level_100 means to return 100 pieces of data for each buy and sell. It is recommended that you use this interface, because the response speed is faster and the traffic consumption is small.

HTTP REQUEST

GET /api/v1/level2/depth20
GET /api/v1/level2/depth100

Example

GET /api/v1/level2/depth100?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:depth20 5, depth100 10

PARAMETERS
Param Type Mandatory Description
symbol String Yes symbol
RESPONSES
Param Description
symbol Symbol
sequence Ticker sequence number
asks asks. [Price, quantity]
bids bids. [Price, quantity]
ts timestamp