StreamL4OrderUpdates - Stream Typed Order Diffs
Maintain typed Hyperliquid resting-order state from an opening snapshot and sequenced L4 diffs over V3 gRPC.
StreamL4OrderUpdates sends typed NEW, UPDATE, and REMOVE changes for the resting L4 book. Apply the diffs directly; this projection has already resolved matching effects.
Request and opening behavior
An empty coins list scopes the subscription to all coins. Explicit coins are deduplicated and validated; blank or "*" entries are invalid. Optional users filters order owners case-insensitively and combines with coins using AND semantics.
The first frame has snapshot: true, sequence: 1, and NEW diffs for every matching resting order. Later frames are block-ordered. A fully filtered frame is still sent with empty diffs so the sequence stays contiguous. This stream does not synthesize HIP-4 mirror orders.
Sequencing and recovery
Require each sequence to follow the last accepted value. A gap, ABORTED, or a stream state reset requires a reconnect and a full rebuild from the new snapshot. Treat an UPDATE or REMOVE for an unknown oid as a no-op. See the shared market-stream contract for common errors.
Related references: StreamL4Book and StreamTpslUpdates.
StreamL4Book - Stream Full L4 Order Book
Subscribe to a typed Hyperliquid L4 opening snapshot followed by native per-block order-book diffs over V3 gRPC.
StreamTpslUpdates - Stream TP/SL Order Updates
Reconstruct Hyperliquid take-profit and stop-loss trigger orders from typed snapshots and sequenced V3 gRPC diffs.