Published May 21, 2026Documentation Index
Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
The GoldRush Hyperliquid WebSocket API now exposes a GoldRush-exclusive l2BookDiff channel at wss://hypercore.goldrushdata.com/ws that provides an initial snapshot followed by per-block diffs of Hyperliquid’s aggregated L2 book, with no equivalent on the public Hyperliquid feed. A new recipe page shows how to build cross-asset depth dashboards, market scanners, and arbitrage engines on one coin, a fixed list, or every Hyperliquid asset, with bandwidth proportional to what changed each block, not the size of the book.
Why it’s different from l2Book
- Snapshot then per-block diffs - one full
Snapshotper subscribed coin onsubscribe, thenUpdatesmessages each block carrying only the price levels that moved.l2Bookin contrast re-sends the full book on every tick. - Bandwidth proportional to change - quiet markets cost almost nothing on the wire; only changed levels arrive instead of a full re-snapshot every tick. Pricing reflects this.
- Multi-coin and wildcard on one subscription -
coinaccepts a single asset, an array, or can be omitted. When omitted,marketTypesdefaults to["perp"]; pass["spot"],["outcome"], a mix, or["*"]to opt into spot, outcome, and any future market types. - GoldRush-native - not exposed on
wss://api.hyperliquid.xyz/ws. Public Hyperliquid has no L2-diff transport at all.
What you can build
The recipe walks through patterns end-to-end with TypeScript and Python code:- Maintain a
Map<coin, Book>from diffs - apply eachbook_diffagainst per-sideMap<px, Level>state: an entry withsz: "0"deletes the level, anything else replaces it. Same{px, sz, n}shape asl2Book, so existing aggregated-book types carry over and you only add a level-apply function. - Single coin, fixed list, or wildcard - one handler, only the subscribe payload changes. List and wildcard subscriptions receive one
Snapshotper live coin before diffs begin, so the books map fills in over the first few messages rather than all at once. - Reconstruct a top-of-book stream - after each diff is applied, best bid is the highest
pxinbook.bidsand best ask the lowest inbook.asks; cache and update only when an incoming diff touches or improves the current best.