Skip to main content

Documentation Index

Fetch the complete documentation index at: https://staging-docs.orderly.network/llms.txt

Use this file to discover all available pages before exploring further.

Snapshot of a symbol’s orderbook with mid price and spread. Weight: 1

Request

{
  "type": "orderbook",
  "symbol": "PERP_BTC_USDC",
  "max_level": 100
}
FieldTypeRequiredDefaultNotes
symbolstringYesMust exist in the symbols table; unknown → INVALID_PARAM
max_levelintNo1001..1000 (silently clamped)

Response

FieldTypeNotes
mid_pricestring | null(best_ask + best_bid) / 2, 8 decimals (HALF_DOWN); null if either side empty
spreadstring | nullbest_ask − best_bid; null if either side empty
asks[], bids[]arrayBest-first; trimmed to max_level
ts (inner)int64Snapshot timestamp from cache (or now on cold cache)

Notes

  • Served from an in-memory snapshot — typically sub-millisecond
  • An empty book returns empty asks / bids arrays (not an error)
{
  "success": true,
  "data": {
    "symbol": "PERP_BTC_USDC",
    "mid_price": "77338.35",
    "spread": "1.70",
    "asks": [{ "price": "77339.20", "quantity": "0.45" }],
    "bids": [{ "price": "77337.50", "quantity": "0.32" }],
    "ts": 1714900000123
  },
  "ts": 1779269143700
}