Live WebSocket

FanDuel odds over a push WebSocket.

Subscribe once to the markets you care about. Every price move arrives as it happens — a burst while the game moves, silence when it doesn't. Silence is normal, not an outage.

Push WebSocketPolling loop
When updates arriveThe moment the book movesOn your next request cycle
Wasted requestsNone — no move, no messageMost polls see no change
Cost to scale frequencyZero — pushes don't consume quotaMore polls = more requests = more spend
Market statusOPEN ↔ SUSPENDED flips pushed liveYou infer it from diffs
Live & pre-matchOne subscription, bothTwo schedules to babysit

How a subscription works

The live transport is AWS AppSync GraphQL over WebSocket — the same transport class the FanDuel Sportsbook app itself uses. You subscribe with a GraphQL subscription carrying the market IDs you picked during REST discovery:

subscription OnUpdateMarketPrice($ids: [String!]!) {
  onUpdateMarketPrice(ids: $ids) {
    id
    marketStatus
    runnerDetails {
      selectionId
      handicap
      runnerStatus
      winRunnerOdds {
        americanDisplayOdds { americanOdds americanOddsInt }
        decimalDisplayOdds { decimalOdds }
      }
    }
  }
}

Chunk your IDs — roughly 30 markets per subscription works well; 90 markets across three subscriptions ack cleanly. Larger single subscriptions hit the message-size cap. Measured on a live reference run: 90 markets over 75 seconds produced 13 price updates with a median 0.35 s gap between ticks inside a burst.

What arrives on each tick

Every update carries the market status, the runner identity, and both odds formats side by side:

FieldMeaning
marketStatusOPEN or SUSPENDED — pushed the moment it flips.
selectionIdStable ID for the runner you are pricing.
handicapThe spread/total line attached to the runner.
runnerStatusStatus of the individual runner.
americanOdds / americanOddsIntAmerican display odds (string and integer forms).
decimalOddsDecimal display odds.

See the push behavior live, without a key

The public demo snapshot exposes the same board the WebSocket subscription watches — live and pre-match totals, per-sport breakdown, and a tape of the latest price moves:

curl https://fanlinewire.com/odds.json

Fetch it twice a minute apart and compare: the sequence counter climbs with every collector tick, the fixtures tape reorders, and the drops list records every move against the bettor. That is the subscription's view of the board, at snapshot pace.

Questions people ask

Does FanLine Wire support WebSocket?

Yes — the live feed is an AWS AppSync GraphQL WebSocket. You subscribe once per ~30-market chunk and price updates are pushed to you as they happen. REST discovery handles the one-time market-ID lookup.

Why WebSocket instead of polling?

Three reasons: latency (the tick arrives when the book moves, not on your next cycle), waste (a quiet market costs nothing — a poll costs a request), and signal (OPEN ↔ SUSPENDED flips arrive as events, so you can alert on them).

How many markets can one connection watch?

Subscribe in chunks of roughly 30 markets — 90 across three subscriptions acks cleanly. Bigger single subscriptions hit AppSync's message-size cap. There is no practical cap on the number of chunks.

What does the silence mean?

A push socket goes quiet when nothing is moving. That is healthy. Judge feed health by your subscription acks and market-status flips — never by tick count. During live action you get bursts; measured median gap inside a burst is 0.35 s on the reference run.

Do I pay per message?

No. Push streams ride flat-rate plans — the message rate can't change your bill. That is the structural difference vs credit-priced polling APIs.