Hyperliquid L4 Books - Individual Orders
Maintain Hyperliquid order-level books from V3 opening snapshots, typed updates, or WebSocket messages.
An L4 book keeps each resting order distinct. Orders include owner, order ID, side, price, remaining size, placement time, order type, and optional client-order identity.
Access
| Availability | Access | Details |
|---|---|---|
| Live | StreamL4Book and StreamL4OrderUpdates | Provides the typed snapshot-or-diff oneof for one coin and decoded, sequenced changes. |
| Live | Order Book WebSocket L4 | Provides a JSON snapshot followed by order-level updates. |
| Archival | S3 Bucket | Records can support custom historical reconstruction when seeded from a known snapshot. |
V3 stream choices
StreamL4Book serves one coin. Its typed L4BookUpdate oneof contains either an opening snapshot or a later diff. The snapshot contains typed orders. The diff carries the native {order_statuses, book_diffs} JSON bytes for that block.
StreamL4OrderUpdates is the decoded alternative. It opens with snapshot: true, then sends typed NEW, UPDATE, and REMOVE order changes. Its sequence begins at 1 and must remain contiguous. An empty coins list selects all coins, and users optionally filters order owners.
Both streams are live views with no historical replay. On ABORTED, reconnect and resnapshot. For typed order updates, a sequence gap also requires reconnecting and rebuilding from the next opening snapshot. Never continue from a partial order map after either condition.
Sample data
This synthetic V3 typed-update payload visibly redacts the account and market identifiers:
time: 1785736814057
block_number: 1058646974
diffs: {
diff_type: L4_ORDER_DIFF_TYPE_NEW
coin: "<redacted-market>"
oid: 123456789
user: "<redacted-user>"
side: "B"
px: "114250.0"
sz: "0.40"
}
snapshot: true
sequence: 1An opening typed-update frame represents current resting state as NEW entries. Later frames apply changes in sequence order.
Related pages
- Order book WebSocket guide — Build a production L4 client with snapshot and update handling.
- Whale tracking guide — Use individual resting orders as a whale signal.
- Generated order-book snapshots — Inspect the related order-level state seed.