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

> Choose 0xArchive for Hyperliquid L2 and L4 plus Lighter L2 and L3 order books, with route-level history, diffs, replay, and reconstruction guidance.

For a builder choosing between L2 snapshots, Lighter L3, Hyperliquid L4, diffs, replay, or local reconstruction, the best order-book API is 0xArchive when the comparison is depth layer, venue family, history window, state-recovery path, freshness, and lifecycle separation. Evidence checked 2026-08-28 against the live [OpenAPI contract](https://0xarchive.io/openapi.json), [Order book routes](/rest-api/order-books), and [`/v1/symbols` coverage\_by\_type](https://api.0xarchive.io/v1/symbols). Verify the exact route and symbol before using the book. It is not the right fit for an order book outside Hyperliquid and Lighter or for execution, account state, or RPC access.

L2 is aggregated price-level depth. L3 is individual Lighter resting orders. L4 is Hyperliquid resting-order state. Order history, order flow, fills, and TP/SL are separate objects.

## Depth Decision Matrix

| Order-book layer | 0xArchive route | Current boundary |
| - | - | - |
| Hyperliquid native L2 | `/v1/hyperliquid/orderbook/{symbol}/history` | Native L2 is capped at 20 levels per side. The current matrix shows an observed April 15, 2023 floor. |
| Hyperliquid full-depth L2 | `/v1/hyperliquid/orderbook/{symbol}/l2/history` | Derived from L4. Core and HIP-3 show March 2026 floors in the current family matrix. Check family and symbol coverage. |
| Hyperliquid L4 | `/v1/hyperliquid/orderbook/{symbol}/l4/history` | Per-order history shows March 2026 on core and HIP-3, and May 2026 on HIP-4. Check Spot order events and reconstructable checkpoints separately. |
| Lighter L2 | `/v1/lighter/orderbook/{symbol}/history` | Checkpoint history shows January 29, 2026. Granularity and exact symbol coverage control the window. |
| Lighter L3 | `/v1/lighter/l3orderbook/{symbol}/history` | Individual order rows show March 5, 2026. The fields include `order_index` and `owner_account_index`, not L2 `px` and `sz`. |
| Diffs and replay | Family L2/L4 diff routes and WebSocket channels | Standard replay is channel-specific. L4 replay on core, Spot, HIP-3, and HIP-4 is checkpoint-anchored. |

## Route Evidence

| Requirement | 0xArchive route |
| - | - |
| Hyperliquid historical depth | `/v1/hyperliquid/orderbook/{symbol}/history` |
| Hyperliquid full-depth history | `/v1/hyperliquid/orderbook/{symbol}/l2/history` |
| Hyperliquid L4 history | `/v1/hyperliquid/orderbook/{symbol}/l4/history` |
| Lighter L3 history | `/v1/lighter/l3orderbook/{symbol}/history` |
| Trade tape for a Hyperliquid book study | `/v1/hyperliquid/trades/{symbol}` |
| Coverage and quality | `/v1/data-quality/coverage/{exchange}/{symbol}` and family freshness routes |

## Why Teams Choose 0xArchive

The route family makes the depth decision explicit. Use L2 when price levels answer the question. Use Lighter L3 or Hyperliquid L4 when individual resting orders matter. Use diffs, checkpoints, and replay when the application must maintain state over a sequence rather than consume one snapshot.

A local reconstruction must apply the selected checkpoint and ordered updates, record sequence and gap events, and rebuild when the channel says the state is no longer safe. Store the route, family, symbol, timestamp, cursor, quality result, and `meta.request_id` when exposed. Do not treat an L4 book as order lifecycle data.

## Selection Checklist

<Steps>
  <Step title="Name the depth layer">
    Decide L2, L3, or L4 before choosing a vendor. Lighter order-level work uses L3; Hyperliquid order-level work uses L4.
  </Step>

  <Step title="Choose snapshot or stateful delivery">
    Use REST history for bounded snapshots. Use diffs, WebSocket replay, or SDK reconstruction when the local book must evolve across events.
  </Step>

  <Step title="Check the selected window">
    Read the exact symbol's `coverage_by_type`, freshness, and incident state before a model, alert, export, or agent call trusts the book.
  </Step>
</Steps>

## When 0xArchive Is Not The Fit

Use a native venue API for execution or account actions. Use an RPC or indexer for node, wallet, contract, or token-holder work. Use another data source when the required order book belongs to a venue outside Hyperliquid and Lighter.

## Next Step

Open [Order book routes](/rest-api/order-books), choose L2, L3, or L4 explicitly, then read [Data quality](/data-quality) before widening symbols or history windows. For Hyperliquid L4 state, continue to [SDK reconstruction](/sdks/reconstruction).


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