oid and user_address, plus the diffs to roll the book forward and reconstruct it at any point in time, not the aggregated levels of L2.
L4 is the deepest order-book grain 0xArchive serves and carries the fields needed for deterministic order-level reconstruction. It is a Hyperliquid-family surface: Hyperliquid core, Spot, HIP-3, and HIP-4 all expose L4. Lighter exposes individual orders through L3 instead, so do not reach for an L4 route on Lighter. Use L4 when you need microstructure, queue position, per-order user attribution, or a book you can reconstruct the same way twice; use L2 when aggregated levels are enough.
Get an L4 snapshot
Pick your venue. The path and symbol format change per family.- Hyperliquid
- Spot
- HIP-3
- HIP-4
/v1/hyperliquid/orderbook/{symbol}/l4, /l4/diffs, /l4/history. Plain perp symbols such as BTC and ETH.Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
symbol | path | string | Yes | Trading pair symbol, e.g. BTC |
timestamp | query | integer (ms) | No | Snapshot route only; Unix milliseconds; omit for the latest checkpoint |
start, end | query | integer (ms) | No | History and diff routes; Unix-millisecond window bounds |
limit | query | integer | No | Max rows or checkpoints on history and diff routes |
cursor | query | string/integer | No | Continuation token from meta.next_cursor |
/l4/history with start and end for a past window; timestamp is for the snapshot-at-time route. L4 is a Pro-and-above tier surface.
Example response
bids and asks are truncated above. That snapshot carried 24,501 bids and 18,101 asks: the entire resting book, each order with its own oid and user_address.
Response fields
Responses use the{ success, data, meta } envelope; the fields below are data.
| Field | Type | Description |
|---|---|---|
coin | string | Symbol (the L4 payload uses coin) |
timestamp | string | When the book was in this state (UTC) |
checkpoint_timestamp | string | Instant the reconstruction is current to |
diffs_applied | integer | Diffs rolled onto the checkpoint; 0 is a clean checkpoint |
last_block_number | integer | Chain block the reconstruction is current to |
bids, asks | array | Resting orders, each with oid, user_address, side, price, size |
bid_count, ask_count | integer | Full-book order counts, even when only the top orders are shown |
total_bid_size, total_ask_size | number | Full-book aggregate sizes |
price and size are numbers in L4 payloads, while L2 and L3 return px/sz as decimal strings, so check types per route. The Endpoint Reference carries the exact types, and full field meanings live in the field dictionary.
Reconstruct from diffs
A snapshot is a checkpoint. To follow the book over time, take anl4 checkpoint, then apply l4/diffs in order, or pull l4/history for a window. diffs_applied: 0 means a clean checkpoint; a higher number means it was rolled forward from the last one. When sequence and gap handling matter, move to WebSocket L4 Order Book and WebSocket Replay, or let SDK Reconstruction hold local book state for you.
A current L2 snapshot is fine for inspecting the book or a spread. It is not the same dataset as a replayable L4 history window: what depth, which venue family, what timestamp semantics, and whether the historical book can be reconstructed the same way twice.
Stream it live
Order-level updates stream onl4_diffs and l4_orders for Hyperliquid core; Spot, HIP-3, and HIP-4 use prefixed variants (spot_l4_diffs, hip3_l4_diffs, hip4_l4_orders, and so on). For sequence and gap handling, see WebSocket L4 Order Book and WebSocket Replay.
Export in bulk
L4 books export as thel4_orderbook schema ($8/GB, $25 minimum), and order-level events export as l4_orders ($8/GB, $25 minimum), delivered as Parquet with ZSTD compression. Keep L2, L3, and L4 in separate tables. Build a selection in the Data Catalog; columns and coverage keys are on Export Schemas.
Other depths
L2 order book
Aggregated price levels (
px, sz, n) across every venue family.L3 order book
Individual orders on Lighter, order-level detail without full lifecycle.