Show bookmakers' odds side by side

An odds comparison site or app shows each bookmaker's price for a match side by side, often with a link to place the bet. It needs the program, the same markets named the same way at every bookmaker, and to drop a price as soon as it is gone.

How it reads the feed

  1. Scope tournaments

    Build the program from the tournaments, leagues and matches scopes: countries, their leagues and their matches with kick-off times, each level with counts of what has odds right now.

  2. Scope odds

    Ask the odds scope for the matches on your screen. Every bookmaker's markets use one type_id table, so a column is the same market at every bookmaker.

  3. Scope odds

    Use nav to link a price to the bookmaker's bet slip, where the bookmaker sends its own ids.

  4. Ask again on a timer and redraw from the answer: a price that is no longer in it has been suspended or closed.

What to watch for

  • A price the bookmaker suspends or closes leaves the feed instead of showing 0. A price missing from an answer is not on offer: never keep the last one you saw.
  • nav carries the bookmaker's own ids for a link to its bet slip. Its keys differ per bookmaker, and some bookmakers send none.
  • Kick-off and every other time in the feed is UTC: show it in your visitor's time zone.

Your first request

The odds of two matches at every bookmaker your key carries. The match ids come from the matches scope. Put your own key in place of ofk_your_api_key. Every scope and field in the documentation

curl -X POST https://oddfeeds.com/api/v1/feeds \
  -H "Authorization: Bearer ofk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"scope":"odds","match_ids":[13264298,13264221]}'

Build it on live data

Start with a free API key: every bookmaker, PreMatch and InPlay, on live production data.