Arkstone
Contact us
Guide

WebSocket or polling for live odds?

Two ways to take live odds into your platform, and how to choose between them.

The short answer

If you take bets in play, use the WebSocket stream. Prices and suspensions reach you as they happen, and a suspension that arrives late costs real money. If you only show prices, or your stack cannot keep a connection open, polling REST is simpler and good enough.

How the stream works

A WebSocket is a connection that stays open. The server pushes each change the moment it happens. You do not ask; you listen.

  • Sequence numbers on every message, so you always know the order and can spot a gap.
  • Heartbeats every 50 ms, so silence means a problem, not a quiet market.
  • Resume after a drop: reconnect with the last sequence number and receive what you missed.

How polling works

With REST you start from a snapshot of every open market, then ask for changes. A long poll on the changes endpoint waits up to 25 seconds for something new, and answers the moment there is. That is far better than asking every second, but each answer still has to travel back before you can ask again.

Side by side

WebSocket streamSnapshot plus long poll
SpeedFastest: pushed as it happensClose, with a round trip per batch
ConnectionOne long-lived socketPlain HTTP requests
After a dropResume by sequence numberAsk for changes since your last one
Best forIn-play bettingDisplay, back-office tools, simple stacks

Results are a third channel

Whichever you choose for prices, results can also arrive as signed webhooks, retried for up to 24 hours until your server accepts them. Voids and corrections come the same way. If you missed one, the results history endpoint has it.

Verify the webhook signature before you settle anything. An unsigned result is a guess, not a result.

Test before you choose

The easiest way to decide is to try both against the sandbox. Our sandbox key lasts 30 days, renews, and needs no IP allowlist. Recorded real matches replay around the clock, so you can test a busy innings at any hour.

Start with the fancy odds API page, or ask us for a key.

Related

Keep reading

01 / ProductFancy odds APIFancy, bookmaker and results data over WebSocket and REST, with a free 30-day sandbox key.
02 / ProductWhite-label exchangeYour own exchange and casino site on your domain, with an agent back office, live within 48 hours.
03 / ProductGlossaryPlain definitions of 42 betting exchange, casino and odds API terms, from back and lay bets to seamless wallets, each on its own page, most with an example.
Next step

See the whole platform on one call.

30 minutes, no slides. We walk you through the platform or the API you need, answer every question, and send a written price, often the same day.