Legacy

Get order book history (Deprecated)

Deprecated: Use /v1/hyperliquid/orderbook/{symbol}/history for native 20-level Hyperliquid history or /v1/hyperliquid/orderbook/{symbol}/l2/history for full-depth L2 checkpoint history. Use /v1/lighter/orderbook/{symbol}/history for Lighter.

Get historical deprecated compatibility order book snapshots within a time range. Historical windows use start and end Unix-millisecond query parameters. This Hyperliquid compatibility route is capped at 20 levels per side.

get/v1/orderbook/{symbol}/history

Request

  • Base URL: https://api.0xarchive.io
  • URL: https://api.0xarchive.io/v1/orderbook/{symbol}/history
  • Auth: API key in header X-API-Key

Path parameters

symbolstring required
Example:BTC

Trading pair symbol (e.g., BTC, ETH, SOL)

Query parameters

startinteger

Start timestamp in Unix milliseconds. Defaults to 24h ago.

endinteger

End timestamp in Unix milliseconds. Defaults to now.

cursorinteger

Cursor for pagination (timestamp from previous response's next_cursor). If not provided, starts from the beginning of the range.

limitinteger

Maximum number of results (default: 100, max: 1000)

depthinteger

Requested price levels per side for this deprecated Hyperliquid compatibility route. Native Hyperliquid L2 data is capped at 20 levels per side; values above 20 do not return full depth here. Use /v1/hyperliquid/orderbook/{symbol}/l2 for full-depth aggregated L2.

Response

List of order book snapshots

successboolean

Example response

{
  "success": true,
  "data": [
    {
      "symbol": "BTC",
      "coin": "BTC",
      "timestamp": "2025-01-21T10:30:45.123Z",
      "bids": [
        {
          "px": "42150.00",
          "sz": "1.5",
          "n": 15
        }
      ],
      "asks": [
        {
          "px": "42150.00",
          "sz": "1.5",
          "n": 15
        }
      ],
      "mid_price": "42150.50",
      "spread": "1.00",
      "spread_bps": "2.37"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.