ParlayAPI Field Guides

Should I poll or stream sports odds?

For a pregame report that displays the latest available price every five minutes, start with one REST request per refresh. For a dashboard that reacts when a quote changes, a stream can deliver updates between refreshes. If the job needs a complete price history, decide how you will detect and fill gaps before choosing either transport.

Follow one moneyline for 20 seconds

North Owls play South Foxes. The table follows one fictional bookmaker’s full-game home moneyline. At second 7 the price returns to its opening value. At second 13 it changes while the stream reader is disconnected. The REST reader remains connected throughout this example. All clocks are seconds from the start.

Source changes and stream observations
SecondAvailable home quoteWhat this stream reader receives
0−110Initial state includes the selected row at −110.
4−115Update with −115.
7−110Update with −110.
12−110Connection drops. The reader clears its displayed quote.
13−120Disconnected. The change is missed.
15−120Reconnect. The partial snapshot contains no matching row.
16−105First matching update on the new connection, at −105.

The stream reader sees four of the five source observations. A fresh connection can restore a current price while the intervening changes remain unknown. The downloadable Python replay shows how to handle a partial snapshot, a duplicate and a delayed callback from the earlier connection.

What would a poll capture?

Each poll reads the latest available row, including its source clock. The first call is at second zero and the reader stops before second 20. Change the interval to see which observations reach this reader. The exercise runs locally in your browser.

2 calls observed 2 of 5 source rows.

  • Poll at 0 s saw −110 from 0 s.
  • Poll at 10 s saw −110 from 7 s.

At ten-second intervals the two prices look identical. Their row clocks show that an update occurred. Those two polls alone cannot recover the −115 quote at second 4. Even when every change in this example happens to be captured, a faster change between real polls can still be missed.

Match the transport to the job

Your job What to compare before you commit
Refresh a report on a schedule Poll once per refresh. Save the event, selection, source clock and receipt time. Mark an old or missing observation visibly.
React to changes for one fixture Check whether the feed actually returns the required bookmaker, market and selection. On reconnect, clear the old state and wait for a matching observation. A heartbeat establishes connection activity. Its timestamp cannot give a quote a newer source clock.
Reproduce every intervening change Ask which updates the feed retains, how ordering is defined and whether you can retrieve missing history for that exact selection. Keep uncovered intervals explicit.

For a 90-minute window with one request per poll, a 10-second schedule makes 540 requests. That assumes the first call is at the start, the end is excluded, and there are no retries or extra pages. Multiply by the number of independent request shapes and price each shape using its actual credit cost. For streaming, budget connection attempts, concurrent subscriptions and reconnects under the current plan. Calculate a polling workload.

ParlayAPI offers REST odds on every plan. Odds streaming over WebSocket or SSE starts at Business. Play-by-play SSE starts at Starter and carries game events and scores. Before choosing a plan, check the current entitlements and streaming documentation. To test the event handler without an account, read one fictional play-by-play event and close the connection.