Docs

List book price levels

GET
/v0/midnight/books/{market-id}/{side}

Returns one side of a book as price levels grouped by tick with total units, assets, and price, sorted best price first.

Path Parameters

side?string

Book side to query (asks or bids).

Value in

  • "asks"
  • "bids"
market-id?string

Market ID whose book side to read (market_id in responses).

Query Parameters

depth?number

Maximum levels returned. Default: 100. Maximum: 5821.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v0/midnight/books/0xcc9418ea594c6e658650aedd205ce4544b266b69493f56fd2adc65c14bd06738/asks?depth=100"
{  "data": [    {      "tick": 495,      "price": "500000000000000000",      "units": "369216000000000000000000",      "assets": "184608000000000000000000",      "count": 5    }  ]}
{  "error": {    "code": "VALIDATION_ERROR",    "message": "Limit must be greater than 0.",    "details": [      {        "field": "limit",        "issue": "Limit must be greater than 0."      }    ],    "request_id": "req-123"  }}
{  "error": {    "code": "VALIDATION_ERROR",    "message": "Limit must be greater than 0.",    "details": [      {        "field": "limit",        "issue": "Limit must be greater than 0."      }    ],    "request_id": "req-123"  }}