hyperliquid.raw.orderbook_snapshots table contains point-in-time snapshots of every resting order on the Hyperliquid order book. New snapshots arrive approximately every 15 minutes; each snapshot is one row per resting order at that moment. The same order will appear in successive snapshots until it is filled or canceled, so you can observe how an individual order’s size, trigger conditions, or status evolve over time.
Table Columns
Notes
Identifying a unique row
Because the same order persists across snapshots and Hyperliquid reuses the oid space across markets, the minimum unique grain is:order_id alone is not unique — the same numeric oid may appear for different orders on different coins.
Snapshot grouping
All rows that share asnapshot_id belong to the same book at one moment. To get the most recent complete book for a coin:
Tracking a single order over time
Because the same order appears in multiple snapshots until it is filled or canceled, you can observe its evolution:Freshness via max_order_timestamp
max_order_timestamp is the latest order placement time represented in a snapshot. The gap between snapshot_timestamp and max_order_timestamp is useful for detecting stale or thinly-populated books:
Reconstructing a fresher book from hyperliquid.raw.orders and hyperliquid.raw.fills
New snapshots arrive approximately every 15 minutes, so the latest one can be up to ~15 minutes behind real time. To bring it forward, combine three sources:
max_order_timestamp is the useful lower bound for the “what’s new” filter: any order placed at or before it is already represented in the snapshot, so the orders lookup only needs to consider placements after that point.
Terminal vs non-terminal statuses
hyperliquid.raw.orders records every status change for every order. To decide whether an order is still resting, take its latest status (by status_change_timestamp) and check whether that status is terminal. Refer to the Hyperliquid order-status reference for the full taxonomy; broadly:
- Terminal (order leaves the book):
Filled,Canceled,MarginCanceled,Liquidated,SelfTradeCanceled,ReduceOnlyCanceled,VaultWithdrawalCanceled,OpenInterestCapCanceled,DelistedCanceled,SiblingFilledCanceled,ScheduledCancel, and the various*Rejectedstatuses. - Non-terminal (order still resting):
Open,Triggered, and trigger-condition modifications.
SQL sketch
The
terminal_statuses list above is illustrative — keep it in lockstep with the Hyperliquid order-status reference. Missing a status will keep terminated orders in the reconstructed book; over-listing one will drop orders that should still rest.Query tips
- For efficient date-range queries, filter on
snapshot_timestamp::date.