Answer · WebSocket · Protocol
Snapshot vs delta on the Pinnacle WebSocket
Answer: after subscribe, wait for snapshot parts until final: true, then apply every delta upsert/remove. Clear local maps when part === 1. Docs: WebSocket.
Mental model#
- Snapshot — current matching book, split into parts (≤400 events).
- Delta — only changes: market/event upsert (full object) or remove (id).
- Ping — reply
{"type":"pong"}.
if (msg.type === 'snapshot' && msg.part === 1) { events.clear(); markets.clear(); }
Node reconnect pattern: answer.
Trial CTA#
Builder (€99/mo) for WebSocket and closing history. 3-day trial; card required, charged after day 3 unless cancelled. Free REST: signup. Related: answers hub, docs.
See also: raw Pinnacle frames (Pro).
Related: Node snapshot/delta Map, dynamic odds API.
Questions people ask#
Can I apply deltas before final snapshot?#
You can buffer, but treat the book as incomplete until final: true.
Do removes cascade?#
When an event is removed, drop all of its markets locally.
Is this educational content for adults?#
Yes (18+).