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

# Order book depth

> Choose between L2, L3, L4, order-event, diff, history, and reconstruction workflows across 0xArchive venue families.

Name the depth and record type your job needs before you choose an order-book route: L2 price levels, Lighter L3 individual orders, Hyperliquid L4 per-order book state, book diffs, history, reconstruction, or separate order-lifecycle records. Each answers a different question, so keep them separate in your schemas, exports, and code.

## Depth model

| Depth | What it is, and when to use it |
| - | - |
| L2 | Aggregated price levels with bids and asks. Use it for snapshots, spreads, depth charts, and simple monitors |
| L3 | Lighter individual-order book. Use it for queue and individual-order analysis |
| L4 | Hyperliquid per-order resting-book state. Use it for queue analysis and exact book reconstruction; lifecycle events come from the separate order-history and order-flow routes |
| Diffs | Incremental book changes. Use them for stateful local books and replay |
| History | Time-windowed snapshots or events. Use it for backtests, audits, model inputs, and export jobs |
| Order events | Status, side, price, size, order ID, order type, and lifecycle fields where present. Use them for TP/SL, flow, and order lifecycle research |

## Where to start

| Need | Start |
| - | - |
| Current L2 snapshot | [Order book routes](/rest-api/order-books) |
| Historical order-book window | [Plan a historical pull](/core-concepts/historical-market-data) |
| Lighter individual-order book | [L3 order book](/rest-api/order-books-l3) |
| L4 reconstruction | [L4 order book](/rest-api/order-books-l4) |
| Stateful streaming book | [WebSocket L4 order book](/websocket/l4-orderbook) |
| SDK reconstruction | [SDK reconstruction](/sdks/reconstruction) |
| File export schema | [Export schemas](/export-schemas) |

## Common mistakes

Not every order-book dataset is an L2 book. Order-event records are not L2 snapshots and not L4 resting-book state, so do not merge them into either. Individual-order depth is L4 on Hyperliquid markets and L3 on Lighter; neither contract carries over to the other venue. L4 is not the right default when a top-of-book or aggregated book answers the question.

Label downstream tables with the venue and market type, symbol, schema key, time window, route or channel, and request ID. That keeps later analysis from mixing aggregated books with lifecycle events.

## Start with the smallest depth

Start with the smallest depth that answers the question. Move to L3 or L4 when individual resting orders matter, to diffs or replay when sequence matters, and to order-history or order-flow routes when lifecycle state matters.

Before you choose, decide how the job keeps state (a snapshot, a historical page, a diff stream, a replay, or a reconstructed book) and how it recovers from a gap (a fresh snapshot, a checkpoint, a replay rerun, or stopping).

## Next step

Compare the L2, L3, and L4 routes and their parameters on [Order books](/rest-api/order-books).


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