Change a WebSocket subscription without reconnecting
Answer: on wss://pinnfeed.io/v1/stream, each subscribe message replaces the previous filters on that connection and the server replies subscribed with the new filters, then a fresh snapshot. Send {"type":"unsubscribe"} to stop deltas while keeping the socket open (unsubscribed comes back). Add "snapshot":false to a subscribe when you already hold the state and only want deltas.
Examples#
{"type":"subscribe","sports":["soccer"],"markets":["moneyline"],"main":true}
Later, switch to tennis and basketball totals:
{"type":"subscribe","sports":["tennis","basketball"],"markets":["total"],"main":true}
Pause:
{"type":"unsubscribe"}
About seq#
seq is one counter for the whole feed. It increases once per upstream batch, and you only receive a delta when that batch touches something in your filters. Gaps in seq are normal on a filtered subscription and do not mean you lost a message. After a reconnect, resubscribe with a snapshot (the default) to rebuild state: reconnect, snapshot/delta.
When to use snapshot:false#
Only when your local state is still valid on the same connection, for example narrowing filters (dropping a sport). If you widen filters, keep the snapshot so you receive the new events.
Plans#
WebSocket on Builder (€99/mo, 3 connections) and Pro (10). 3-day trial; a card is required and it is charged after day 3 unless you cancel. More filters: subscribe filters.
Educational content for adults (18+).
Related: Multi-sport subscribe.
Questions people ask#
Do I keep receiving pings after unsubscribe?#
Yes. The connection stays open, so keep answering ping with pong.
Does a new subscribe close the old one?#
No reconnect happens; the filters are swapped on the same connection.
What if I unsubscribe and wait?#
The 30-second no_subscription timer only applies to a new connection, but an idle socket still uses one of your connection slots.