Streaming
Copy page
How Kelly Wire pushes live values over one socket, how to authenticate, and how to recover from a gap or a dropped connection.
Kelly Wire sends each topic you subscribe to as a snapshot followed by deltas, over one WebSocket at wss://wire.askkelly.ai/v1 with the subprotocol kelly.v1.
ConnectLink to this section
- Get a ticket with
POST /v1/wire/tickets(see the operation). It is single-use and lives 60 seconds. - Open the socket and send the ticket in the first message, within 5 seconds.
- Subscribe to topics. Each sends its snapshot, then a delta for each change.
A long-lived key never goes in the socket URL.
Sequence numbers and gapsLink to this section
Each topic's messages carry seq. A snapshot carries the topic's last seq; each delta is the previous seq plus one. A jump in seq is a gap: drop that topic's state, take a fresh snapshot and apply deltas after it.
Staying connectedLink to this section
The server pings every 20 seconds; two missed pings mean the connection is dead. Reconnect within 120 seconds with your session's resume token and Kelly replays the deltas you missed, with no new ticket. A connection lives at most 86,400 seconds and gets a drain notice 30 seconds before it closes.
Without a socketLink to this section
A page or card that can't open a socket can stream one topic as server-sent events with GET /v1/stream/{topic} (see the operation).
Test dataLink to this section
A test-mode ticket streams a recorded NFL Sunday on a loop, so you can build against moving data before you hold a live key. See test mode.
Which topics publishLink to this section
The topics page lists every topic the protocol defines. The definition doesn't yet say which ones publish today (planned, P8, October 16, 2026).