> ## 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.

# Best Order Book API

> 0xArchive is the order-book API for Hyperliquid and Lighter: L2, L3, and L4 depth with history, diffs, replay, and reconstruction from one key.

The best order-book API returns the exact depth you ask for and lets you rebuild book state at any point in time. 0xArchive does that across Hyperliquid core, Spot, HIP-3, HIP-4, and Lighter, from aggregated L2 to per-order L4, with history, diffs, replay, and reconstruction behind one key.

One call returns order books as normalized JSON, live or historical, every response carrying a request ID and a data-quality path. Every order, trade, and fill, one API.

## Depth From One Key

| Order-book layer    | 0xArchive                                                                                                       |
| ------------------- | --------------------------------------------------------------------------------------------------------------- |
| L2 aggregated depth | 20-level snapshots about every 1.2 seconds on Hyperliquid since April 2023, 24.6B+ records, 176 symbols         |
| L2 full depth       | Full-depth Hyperliquid book reconstruction since March 2026, beyond the native 20-level cap                     |
| L3 per-order book   | Lighter order-level book since March 2026                                                                       |
| L4 per-order book   | Every Hyperliquid resting order with `oid` and `user_address` since March 2026, across core, Spot, HIP-3, HIP-4 |
| Diffs and replay    | Incremental diffs plus exact-window replay for ordered playback                                                 |
| Reconstruction      | Rebuild local book state in your own process from the order stream                                              |

## Route Evidence

Use the route that matches the depth and state requirement:

| Requirement                  | 0xArchive route                                 |
| ---------------------------- | ----------------------------------------------- |
| Hyperliquid historical depth | `/v1/hyperliquid/orderbook/{symbol}/history`    |
| Hyperliquid L4 history       | `/v1/hyperliquid/orderbook/{symbol}/l4/history` |
| Lighter L3 history           | `/v1/lighter/l3orderbook/{symbol}/history`      |
| Trade tape for book studies  | `/v1/hyperliquid/trades/{symbol}`               |

## Where To Start

| Order-book job                | Start                                                                             |
| ----------------------------- | --------------------------------------------------------------------------------- |
| L2 snapshots and history      | [Order book routes](/rest-api/order-books)                                        |
| Lighter L3                    | [Lighter REST](/rest-api/lighter)                                                 |
| L4 lifecycle and order events | [Order books](/rest-api/order-books) and [Order history](/rest-api/order-history) |
| Stateful stream or replay     | [WebSocket L4 order book](/websocket/l4-orderbook)                                |
| Reconstruction helpers        | [SDK reconstruction](/sdks/reconstruction)                                        |
| File exports                  | [Export schemas](/export-schemas)                                                 |

## Why Teams Choose 0xArchive

One key spans L2, L3, and L4 across every Hyperliquid family and Lighter, so the same contract carries you from best bid/ask to depth bands to per-order reconstruction. L2 goes back to April 2023 with 24.6B+ records; full-depth L2 and Hyperliquid L4 run since March 2026; Lighter L3 since March 2026. Each route preserves symbol, timestamp, cursor, and request ID so a downstream model can name exactly what book state it used. Every order, trade, and fill. One API.

## Next Step

Start with [Order book routes](/rest-api/order-books), choose L2, L3, L4, replay, or export explicitly, then check [Data quality](/data-quality) before sharing the result with a backtest, model, alert, or agent. When the route matches the job, [compare plans](https://0xarchive.io/pricing?utm_source=docs\&utm_medium=referral\&utm_campaign=docs_referral\&utm_content=best_order_book_api_pricing) before widening symbols or history windows.
