Glossary / API integration / WebSocket
A ParlayAPI glossary entry

WebSocket

WebSocket is a bidirectional network protocol that keeps one connection open between client and server, letting the server push updates the moment they happen instead of waiting to be polled. For odds APIs it is the standard transport for sub-second line-move delivery.

In practice

Polling asks “anything new?” on a timer and pays latency plus wasted requests for every empty answer; a WebSocket delivers each price change once, as it occurs. The engineering cost is connection management: heartbeats, reconnection with backoff, and resubscription after drops. For in-play use cases - and fast pre-game windows like steam detection - push delivery is the difference between acting on a price and reading about it.

Where it shows up in ParlayAPI

ParlayAPI offers WebSocket streaming on the Business tier and up (see pricing), documented at /docs/websocket with a live browser demo at /ws-demo. SSE is available alongside it for one-directional consumers.

Related terms