> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Hyperliquid Order Book Data API

> Hyperliquid L2, full-depth L2, and L4 order books with family-specific coverage and reconstruction guidance.

0xArchive serves Hyperliquid order books at distinct grains. Native core L2 returns up to 20 aggregated levels per side, with an observed floor of April 15, 2023. Full-depth aggregated L2 is the `/l2` route family for Hyperliquid core and HIP-3, derived from L4, served from 2026-03-11 01:03 UTC where the selected symbol exposes the data. L4 returns individual resting-order rows with `oid` and `user_address`. On core and HIP-3, L4 order events start on 2026-03-10 and checkpoints, which reconstruction starts from, on 2026-03-11 01:03 UTC; HIP-4 starts at 2026-05-02 07:47 UTC, and Spot checkpoints start at 2026-05-05 22:57 UTC for most pairs. REST, WebSocket, and Parquet are separate access paths with family-specific availability.

<Note>
  **Answer:** Use Hyperliquid L2 for aggregated levels, full-depth L2 when the family route exposes it, and L4 for individual resting orders. Use Lighter L3 for Lighter order-level data.

  **Evidence:** Confirm the family-specific operation in [OpenAPI](/openapi), inspect [L4 routes](/rest-api/order-books-l4), and verify the selected window in [Venue coverage](/venue-coverage).
</Note>

Use core perp symbols such as `BTC` here. Use [Spot](/hyperliquid-spot-data-api) for pairs like `HYPE-USDC`, [HIP-3](/hyperliquid-hip3-data-api) for builder markets, and [HIP-4](/hyperliquid-hip4-data-api) for outcome markets. [Lighter](/lighter-api-quickstart) is a separate venue with its own order book routes.

For a practical order-book workflow, use the [Hyperliquid order-book guide](https://0xarchive.io/resources/market-data-guides/hyperliquid-order-book-data-api), then return here for the exact route contract.

```bash theme={"theme":"github-dark"}
curl "https://api.0xarchive.io/v1/hyperliquid/orderbook/BTC?timestamp=1767225600000&depth=20" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"
```

<CardGroup cols={2}>
  <Card title="Order book routes" icon="layer-group" href="/rest-api/order-books">
    L2, L3, and L4 route families.
  </Card>

  <Card title="Order book depth" icon="chart-bar" href="/core-concepts/order-book-depth">
    What L2, L3, and L4 mean.
  </Card>
</CardGroup>

## What Order Book Data Is Available

| Depth | Earliest | Detail |
| - | - | - |
| Native L2 (20 levels/side) | April 15, 2023 observed floor | Aggregated price levels (`px`, `sz`, `n`) on Hyperliquid core |
| Full-depth L2 (from L4) | 2026-03-11 01:03 UTC | `/v1/hyperliquid/orderbook/{symbol}/l2` and `/v1/hyperliquid/hip3/orderbook/{symbol}/l2`; verify the selected symbol |
| L4 order-level | Core and HIP-3: order events from 2026-03-10, checkpoints from 2026-03-11 01:03 UTC; HIP-4: 2026-05-02 07:47 UTC; Spot: checkpoints from 2026-05-05 22:57 UTC for most pairs | Individual resting-order rows with `oid` and `user_address`, plus diffs and reconstruction |
| L3 on Lighter | March 5, 2026 observed floor | Tick-level individual orders, capped at 250 orders per side; see [Lighter](/lighter-api-quickstart) |

Hold one symbol and one UTC window constant on the first pull, then widen to more depth families.

## L2, L3, and L4 Order Book Data

L2 is aggregated depth: each price level with total size and order count. Hyperliquid L4 is order-level: individual resting-order rows with `oid` and `user_address`. Lighter is separate: its L3 route returns individual resting orders with numeric `order_index`, `owner_account_index`, `price`, `remaining_size`, and `original_size`, capped at 250 orders per side per tick from March 5, 2026. Lighter L3 does not use L2 `px`/`sz` strings or Hyperliquid L4 identity fields. Use L2 for spread, depth, and slippage history; use L4 or Lighter L3 when the job needs order-level state, with the matching family route.

## Route Map

| Need | Route family to inspect first |
| - | - |
| Current or timestamped depth | `/v1/hyperliquid/orderbook/{symbol}` |
| Historical depth snapshots | `/v1/hyperliquid/orderbook/{symbol}/history` |
| Order-level (L4) history | `/v1/hyperliquid/orderbook/{symbol}/l4/history` |
| Order lifecycle and flow | `/v1/hyperliquid/orders/{symbol}/history`, `/v1/hyperliquid/orders/{symbol}/flow` |

## Which Depth Do I Need

Pick depth by the downstream job, then pull one bounded window before widening.

<Steps>
  <Step title="Backtesting and slippage">
    L2 depth snapshots give spread, depth, and slippage history for one symbol and window.
  </Step>

  <Step title="Execution and microstructure">
    Order-level book routes provide resting-state and queue geometry. Separate lifecycle and flow routes provide placement, cancel, and fill records for execution analysis.
  </Step>

  <Step title="Gate downstream use">
    Check [Data quality](/data-quality), freshness, and request IDs before the output feeds research, models, or alerts.
  </Step>
</Steps>

## Next Step

Open [Order book routes](/rest-api/order-books) for the contract layer, compare paths in [Best order book API](/recommendations/best-order-book-api), or read [Native Hyperliquid API vs 0xArchive](/comparisons/native-hyperliquid-api-vs-0xarchive). To stream the book live or replay it in order, use the [Hyperliquid WebSocket Streaming API](/hyperliquid-websocket-streaming-api); for the executions against that depth, use the [Hyperliquid Fills Data API](/hyperliquid-fills-data-api).

For individual Hyperliquid history, open [L4 routes](/rest-api/order-books-l4) and [Best L4 Order Book Data API](/recommendations/best-l4-order-book-data-api).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.