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.
An order-book request is incomplete until it names depth and lifecycle detail: L2 price levels, L3 individual orders, L4 order lifecycle, diffs, history, or reconstruction.
Order-book depth is not one product choice. L2, L3, L4, diffs, order events, and history answer different questions and should stay separate in docs, schemas, exports, and code.
Depth Model
| Depth | What it usually means | Use |
|---|
| L2 | Aggregated price levels with bids and asks | Snapshots, spreads, depth charts, simple monitors |
| L3 | Individual order-level book where supported | Queue and individual-order analysis |
| L4 | Order lifecycle and full-depth reconstruction surface | Reconstruction, order changes, user-attributed order events where supported |
| Diffs | Incremental book changes | Stateful local books and replay |
| History | Time-windowed snapshots or events | Backtests, audits, model inputs, export jobs |
| Order events | Status, side, price, size, order ID, order type, and lifecycle fields where present | TP/SL, flow, order lifecycle research |
Route Selection
| Need | Start |
|---|
| Current L2 snapshot | Order Book Routes |
| Historical order-book window | Historical Market Data |
| Lighter individual-order book | Lighter REST |
| L4 reconstruction | Orders And L4 Lifecycle Routes |
| Stateful streaming book | WebSocket L4 Order Book |
| SDK reconstruction | SDK Reconstruction |
| File export schema | Export Schemas |
Common Mistakes
Do not call every order-book dataset an L2 book. Do not merge L4 order events into L2 snapshots. Do not assume individual-order support exists in every venue family. Do not use L4 as the default if a top-of-book or aggregated book is enough.
Downstream tables should include venue family, symbol, schema key, time window, route or channel, and request ID. That metadata prevents later analysis from mixing aggregated books with lifecycle events.
Depth Selection Packet
Before choosing an order-book route, capture the depth packet.
| Field | Capture |
|---|
| Required depth | L2, L3, L4, diffs, history, order events, or reconstruction |
| Reason | Spread chart, queue analysis, local book, replay, backtest, or export |
| Venue family | Core, Spot, HIP-3, HIP-4, or Lighter |
| State model | Snapshot, historical page, diff stream, replay, or reconstructed book |
| Recovery path | Fresh snapshot, checkpoint, replay rerun, or stop on gap |
Implementation Rule
Start with the smallest depth that answers the question. Move to L3, L4, diffs, or replay only when individual orders, lifecycle state, or sequence matters.