Stable Pinnacle WebSocket: stale prices and reconnect
Answer: treat the socket as unreliable transport. (1) Reply to every ping with {"type":"pong"}. (2) On close, exponential backoff + jitter, resubscribe, clear maps on snapshot part === 1. (3) Track seq/ts and your last apply time — if wall-clock silence exceeds your SLA, force reconnect. (4) Honour close codes (1001 deploy, 4008 slow consumer). Builder required (€99/mo). Node sample: reconnect answer.
Stale-price detection (client-side)#
import time
LAST = {"ts": 0.0}
STALE_SEC = 15 # your SLA — not a vendor latency claim
def on_message(msg):
if msg["type"] in ("snapshot", "delta", "ping"):
LAST["ts"] = time.time()
# ... apply book ...
def watchdog():
if time.time() - LAST["ts"] > STALE_SEC:
raise TimeoutError("no frames; reconnect")
Quiet markets are normal — gate the watchdog on whether events you care about are live, or combine with application-level "expect ticks near tip-off" logic.
Failure modes to log#
| Signal | Action |
|---|---|
No pong path | Socket dies ~60 s after missed ping |
4008 slow_consumer | Narrow filters or speed up handlers |
1001 server_shutdown | Backoff reconnect (deploy) |
| Snapshot without clear | Ghost markets from the previous session |
We do not publish latency versus named competitors. Measure tick → your handler yourself.
Trial CTA#
Builder. 3-day trial; card required, charged after day 3 unless cancelled. Docs: WebSocket.
Questions people ask#
Is guest scraping a substitute?#
Account bans and delayed guest boards are common failure modes. A self-serve API key with documented close codes is the supported path.
Does PinnFeed guarantee sub-second updates?#
We document heartbeats and frame types, not a marketing RTT versus other resellers. Instrument end-to-end in your process.
Is this educational content for adults?#
Yes (18+).