l2BookDiff channel is a bandwidth-efficient way to track order book changes. Instead of a full book on every update, you get an initial snapshot per coin followed by per-block Updates carrying only the price levels that changed — the same { px, sz, n } structure as l2Book. It’s a GoldRush-native channel, unavailable on the public Hyperliquid feed, and the cheapest way to keep a live book across many assets.
l2BookDiff is billed at 0.1 credits/min per coin (500 CU/min) — a fifth
of l2Book. See pricing.Subscribe
coin accepts:
- a single asset:
"HYPE" - an array:
["HYPE", "BTC", "ETH"] - omitted entirely — streams all perps on one connection. When omitted, specify
marketTypeslike["spot"]or["*"]for multi-market coverage.
Payload shapes
The first message per coin is aSnapshot; subsequent messages are Updates.
Snapshot
levels is [bids, asks] — each entry is a price object.
Update
Maintain a local book
- On
Snapshot: initialize (or reset) the coin’s book with bid and ask maps. - On
Updates: for eachbook_diff, apply the changed levels to the matching side. - When
sz === "0", delete that price level; otherwise set or update it.