Skip to main content

Hyperliquid Order Book Data: L2 Levels and Full L4 Reconstruction

8 min read

Query Hyperliquid native L2, all-level L2 derived from L4, and resting-order L4 history with route-specific depth and symbol coverage.

Hyperliquid order-book data has three useful grains: aggregated price levels, resting order-level depth, and order-event lifecycle records. Pick the grain that matches the question. A spread study needs L2. A queue or reconstruction study needs a resting L4 book. A placement, cancel, or trigger study needs l4_orders history.

Comparison of native top-of-book levels with 0xArchive all-level order-book records.

Short answer: native l2Book returns aggregated price-level snapshots at its documented depth. 0xArchive adds historical L2, all-level aggregation derived from L4, resting-order L4, ordered diffs, lifecycle history, and export paths. Those are related data products, not interchangeable names.

Run one bounded snapshot

curl "https://api.0xarchive.io/v1/hyperliquid/orderbook/BTC?timestamp=1767225600000&depth=20" \
  -H "X-API-Key: $OXARCHIVE_API_KEY"

The timestamp is Unix milliseconds. Keep the symbol, timestamp, depth, response envelope, and meta.request_id with the snapshot.

What native l2Book means

Hyperliquid's native l2Book info response is an aggregated snapshot. Each side contains price levels with price, size, and order count. It is not only the best bid and ask, and it is not a per-order event stream. The native response is the venue's own response. 0xArchive's L2 routes retain aggregated levels for historical queries and deeper bounded reads.

Read the official info endpoint reference for native request semantics. Use the 0xArchive order-book routes for the archive contract.

Depth matrix

Every level from the best bid to the wallet, shown on one order book, is in level 1 vs level 2 vs level 3 market data.

SurfaceGrainUse it for
Native l2BookAggregated price levels in a venue responseCurrent or bounded native depth inspection
0xArchive L2Aggregated levels with size and order countHistorical spread, depth, and slippage studies
0xArchive L4 order bookResting orders with oid and user_addressQueue detail, wallet attribution, and reconstruction
l4_orders and /tpslOrder-event lifecycle rowsPlaced, canceled, triggered, and status changes
/trigger-levelsPending trigger-order size bucketed around priceTP/SL concentration before a trigger fires
TradesResulting executionsConfirm what actually filled after a trigger or resting order

Resting L4 depth describes the book state. l4_orders and /tpsl describe lifecycle events. /trigger-levels describes pending concentration. A resulting trade is the execution record.

Comparison of aggregated L2 levels, per-order L3 records, and inter-level L4 reconstruction.

Download the fixed Parquet sample and verify its published size and SHA-256 in the sample manifest.

Choose the route

  • Current or timestamped depth: /v1/hyperliquid/orderbook/{symbol}.
  • Historical L2 snapshots: /v1/hyperliquid/orderbook/{symbol}/history.
  • Resting L4 history: /v1/hyperliquid/orderbook/{symbol}/l4/history.
  • Order lifecycle: /v1/hyperliquid/orders/{symbol}/history and /v1/hyperliquid/orders/{symbol}/tpsl.
  • Pending trigger concentrations: /v1/hyperliquid/orders/{symbol}/trigger-levels.
  • Resulting fills: /v1/hyperliquid/trades/{symbol}.

An empty result applies only to the selected venue family, symbol, route, and window. Check the catalog and status before concluding that data is unavailable more broadly.

Order-book timeline contrasting snapshot sampling with reconstruction of every L4 order event.

Workflows

QuestionStart withKeep beside the result
How much liquidity was displayed?L2 snapshot or historyTimestamp, depth, spread, and request ID
Which resting orders formed the level?L4 snapshot or diffsOrder ID, wallet, side, price, and size
Which orders changed state?l4_orders historyStatus, event timestamp, order type, and cursor
Where are pending triggers concentrated?/trigger-levelsAs-of time, bucket price, and side totals
Did a trigger produce a fill?Join lifecycle rows to tradesTrigger time, trade time, price, and size
Routing map showing Hyperliquid core, Spot, HIP-3, and HIP-4 scopes alongside the separate Lighter venue.

Related routes

Use the HIP-3 L4 and TP/SL release for HIP-3 order-level data. Use the backtesting guide when depth becomes an execution-model input.

The exact contracts are in the Hyperliquid Order Book Data API, L4 order-book reference, Order history, TP/SL, and Order flow pages. Compare the Hyperliquid data API, pricing, and status for current delivery details.