Skip to main content

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

DepthWhat it usually meansUse
L2Aggregated price levels with bids and asksSnapshots, spreads, depth charts, simple monitors
L3Individual order-level book where supportedQueue and individual-order analysis
L4Order lifecycle and full-depth reconstruction surfaceReconstruction, order changes, user-attributed order events where supported
DiffsIncremental book changesStateful local books and replay
HistoryTime-windowed snapshots or eventsBacktests, audits, model inputs, export jobs
Order eventsStatus, side, price, size, order ID, order type, and lifecycle fields where presentTP/SL, flow, order lifecycle research

Route Selection

NeedStart
Current L2 snapshotOrder Book Routes
Historical order-book windowHistorical Market Data
Lighter individual-order bookLighter REST
L4 reconstructionOrders And L4 Lifecycle Routes
Stateful streaming bookWebSocket L4 Order Book
SDK reconstructionSDK Reconstruction
File export schemaExport 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.
FieldCapture
Required depthL2, L3, L4, diffs, history, order events, or reconstruction
ReasonSpread chart, queue analysis, local book, replay, backtest, or export
Venue familyCore, Spot, HIP-3, HIP-4, or Lighter
State modelSnapshot, historical page, diff stream, replay, or reconstructed book
Recovery pathFresh 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.
Last modified on May 18, 2026