Skip to main content
Delivery is at most once — there is no replay. Whatever confirmed while you were disconnected is not resent, so a production client needs to detect the gap and decide whether to backfill it. The signal for that is context.slot: it bounds the window you missed across a disconnect. This guide covers why connections close, how to reconnect cleanly, and how to use it.

Why Connections Close

Every close has a WebSocket close code that tells you what happened and what to do next: The server pings every 15 seconds, so a healthy but quiet connection still carries traffic. If you see nothing at all for over a minute — no notification, no ping — assume the connection is dead and reconnect rather than waiting for the socket to tell you.

Keep the Connection Alive

If your filter is narrow enough that it can legitimately go 10 minutes without a match, send an explicit JSON-RPC ping on an interval shorter than that:
It returns the current slot and, more importantly, counts as a client message for the idle timer. A library-level WebSocket ping frame does not.

Reconnect and Detect the Gap

1

Reconnect with Backoff

On any close — expected or not — reconnect with exponential backoff. Subscription ids do not survive a reconnect, so resend parsedTransactionSubscribe for every filter you had open.
2

Track context.slot Across Disconnects

Keep the last context.slot you saw before the disconnect. The gap between that slot and the first slot you see after reconnecting is exactly the window you missed — nothing more, nothing less.
3

Backfill if You Need To

If your application can’t tolerate the gap, backfill that slot window from RPC: getSignaturesForAddress to enumerate transactions in range, then getTransaction to fetch each one. This is a manual reconciliation step — Parsed Streams itself does not replay.
context.slot is what survives a reconnect: track the highest slot you fully processed before the disconnect and treat everything after it as the backfill window.

Handling JSON-RPC Errors

Requests that fail return a JSON-RPC error instead of a result, so you can branch on error.code: -32602 and -32000 mean the request itself is wrong — fix the filter, don’t retry it as is. -32001 and -32002 are transient; retry with the same backoff you use for reconnects.

Next Steps

Quickstart

Full protocol reference: methods, filter fields, limits.

Track Jupiter Swaps

Build a filter this connection can subscribe to.