The GoldRush Hyperliquid WebSocket API now exposes l4BookUpdates, a strictly-ordered, diff-only L4 book stream with per-coin sequence numbers for gap detection. It pairs with a new /info method, l4BookSnapshot, which returns a full order-level book for one coin along with the height, epoch, and seq that bootstrap the stream. Both are GoldRush-native — neither exists on the public Hyperliquid feed.
Why it’s different from l4Book
- Strictly block-ordered — diffs are emitted synchronously in monotonic
block_heightorder. Thel4Bookper-block broadcast can deliver adjacent blocks out of order, which puts an exact local book out of reach.l4Bookis unchanged;l4BookUpdatesis the sequenced sibling. - Per-coin
seq/prev_seq— each per-coin entry names the sequence it follows. Whenprev_seqdoesn’t match the lastseqyou applied, you dropped a message and you know it on the next frame instead of drifting silently. Coins in a multi-coin subscription are sequenced independently. - A server
epoch— a UUID regenerated whenever the stream resets. A changedepochtells you your local book is stale and to re-bootstrap, rather than applying diffs onto a book that no longer matches. - Diff-only, snapshot on demand — the stream never emits an inline
Snapshot. You seed froml4BookSnapshot, so a reconnect re-fetches the one coin you need instead of pushing every subscribed book back over the wire.
What you can build
- An exact local order-level book — seed from
l4BookSnapshot, drop buffered batches at or below itsheight, then applynew/update/removediffs byoid. The snapshot’sseqis theprev_seqof the first diff you apply. - Queue position and per-trader flow — entries are individual orders carrying
user,oid, andtif, so you can reconstruct queue order at a price, attribute flow per wallet, and follow an order’s lifecycle throughorder_statuses. - Pipelines that can prove they’re complete —
seq,prev_seq, andepochturn “did I miss anything?” into a check rather than an assumption, so a market-making loop or a backfill can assert continuity.
l4BookUpdates is perps-only and coin is required — subscribe with a single symbol or an array of up to 64.
Learn more