Ordering
Within a single coin, order book diffs are delivered in the same order as they are produced by the node. Ordering is not guaranteed across different coins. Ordering is also not guaranteed across different stream types, including:- Blocks
- Order book diffs
- Mempool transactions
- Metrics
- Pings
Reconnection
Treat every disconnect as a full reset. Hyperliquid Data Stream does not support session resume. After reconnecting, the client should repeat the full connection sequence:No backfill
Hyperliquid Data Stream is a live-only stream. Data emitted before a client connects is not replayed. Historical backfill is not part of this service. If a client disconnects, any data emitted during the disconnect window is missed.Clock skew
The following timestamps are provided by the Hyperliquid node, not by Hyperliquid Data Stream:ts_mswall_ts_usreceive_ts_us
Backpressure
Clients must continuously read from the WebSocket connection. If a client cannot keep up with the stream, the server may disconnect it. Block frames are strict. Missing a block frame disconnects the client immediately. Other frame types tolerate brief slowdowns, including:- Order frames
- Metric frames
- Ping frames
- Error frames
If the server closes the connection because of a restart or deploy, the client should reconnect after a short delay and repeat the full connection sequence.
Clean shutdown
A clean client-initiated close is safe. The recommended flow is:- Send a WebSocket Close frame.
- Wait for the server’s Close response.
- Close the local connection.
Recommended client behavior
Production clients should follow these rules:- Use binary mode for production.
- Always send
espbeforeprime. - Re-subscribe after every reconnect.
- Read continuously to avoid backpressure.
- Do not rely on session resume.
- Do not expect historical replay.
- Correlate cross-stream events using timestamps.
- Use server-stamped timestamp differences for latency analysis.
- Handle structured error codes programmatically.