MidnightBooks

List book price levels

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

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

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://api.morpho.org/v0/midnight/books/0x12590ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9f67/asks?depth=100"
{
  "data": [
    {
      "assets": "184608000000000000000000",
      "count": 5,
      "price": "500000000000000000",
      "tick": 495,
      "units": "369216000000000000000000"
    }
  ]
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "details": [
      {
        "field": "limit",
        "issue": "Limit must be greater than 0."
      }
    ],
    "message": "Limit must be greater than 0.",
    "request_id": "req-123"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "details": [
      {
        "field": "limit",
        "issue": "Limit must be greater than 0."
      }
    ],
    "message": "Limit must be greater than 0.",
    "request_id": "req-123"
  }
}