session_id and since_seq cursor on reconnect, and the server replays every missed event that matches your subscription filter before resuming the live stream.
When to use this
- Production trading systems where gaps in the event stream can cause desync between your local state and the real chain state
- Fill monitors that track PnL and positions by watching
fillevents - Builder analytics tracking every fill attributed to your builder address
- Compliance and audit pipelines that need to prove they received every event in a window
- Any client that cares about reliability — brief network blips, client crashes, container restarts, load balancer reconnects
session_id work exactly as before.
How it works for the client
Every event on the WebSocket stream now carries aseq field. It’s a monotonically increasing integer — each event gets a unique seq one higher than the last. Track the highest seq you’ve processed, and on reconnect you’ll get exactly what you missed.
Example event with seq:
Reconnect flow
Passsession_id and since_seq as query params when reconnecting:
subscribe message, the server responds with:
- A normal
subscribedack - A
reconnectednotification listing how many events will be replayed - The replayed events themselves (ordered by seq, already filtered)
- A
replay_completemessage - Live events resume
Subscribed ack
Reconnected notification
Replay complete
Retention window
hypernode keeps up to 30 seconds of recent events available for replay. If you reconnect within that window, every missed event that matches your subscription filter is delivered before live events resume. If your cursor is older than the window, you’ll receive a gap signal instead.Gap signal
gap: true, your cursor was older than the oldest replayable event. Reload any snapshot state you were maintaining (positions, order book, etc.) from REST and start fresh. In practice this rarely happens — most clients reconnect within a few seconds.
Full Python client
A reconnect-safe client that tracks the last seq and resumes automatically:Limits
If you need longer retention or higher replay caps, reach out and we can tune these.