Glossary / API integration / SSE
A ParlayAPI glossary entry

SSE (Server-Sent Events)

Server-Sent Events (SSE) is a one-directional streaming protocol in which the server pushes a text event stream to the client over a plain, long-lived HTTP connection. It is simpler than WebSocket - no custom protocol, automatic browser reconnection - at the cost of being server-to-client only.

In practice

# SSE is just HTTP -- curl can consume it
        curl -N https://api.example/stream
        data: {"event_id":"...","market":"h2h","price":-105}
        
        # In the browser, EventSource reconnects automatically
        new EventSource(url).onmessage = e => handle(e.data)

For odds consumption - which is overwhelmingly one-directional - SSE covers most of what WebSocket does with less machinery, and it traverses proxies and serverless platforms more happily. Choose WebSocket when you need to send messages upstream (dynamic subscriptions); choose SSE when you just need the firehose.

Where it shows up in ParlayAPI

ParlayAPI offers SSE alongside WebSocket for streaming delivery on the Business tier and up (see pricing), documented from /docs/websocket.

Related terms