StreamL2BookDiff - Stream Ordered L2 Diffs
Reconstruct up to 20 Hyperliquid L2 books from typed opening snapshots and sequenced level diffs over V3 gRPC.
StreamL2BookDiff carries aggregated L2 level changes for multiple coins. It is the bandwidth-efficient state-reconstruction counterpart to full StreamL2Book snapshots.
Request and opening behavior
coins is required and accepts 1 through 20 distinct, case-sensitive identifiers. The depth, significant-figure, and mantissa rules match StreamL2Book; there is no strict field because unchanged windows emit no diff.
The stream opens with one snapshot: true full-book entry per coin, each with seq: 1 and prev_seq: 0. Later entries contain changed levels only. A level whose sz is "0.0" removes that price.
Sequencing and recovery
Track seq independently per coin and require every prev_seq to equal the last accepted seq. A mismatch is loss. Subscriber lag closes the stream with ABORTED; reconnect and rebuild every coin from the new opening snapshots. Quiet coins do not advance and unchanged windows produce no frame. See the shared market-stream contract for common request and error rules.
Related references: StreamL2Book and StreamRawBookDiffs.