Historical

One event's price changes

Changed on

Every price change of one event from from to to (at most 24 hours), bookmakers and exchanges (bookmakersOnly=true: bookmakers alone; BETDAQ never), as rows: first the event's prices at from, then one row per outcome per board version it changed in, in time order. Ids merged with the event are followed too (meta.ids). A recording gap is listed in meta.gaps. Fold the rows in order to hold the event's prices at any instant of the window. Pages by cursor, at most 5,000 rows a page (a page never splits a board version, so it can hold a few more). THE RELEASE LAG: history is released a UTC day at a time, cut the night after the day; the newest instant served is the archive's newest checkpoint's board version plus one hour, and a later one is 400 date_out_of_range with latest.

Checks, in this order (the live feed's own): the per-address shield, the key, the flood cap, a suspended account, a browser key's website, the API version; region (uk or one international code; outside the regions your key reads 403 region_not_in_scope), historical in the key; the parameters (each one this route reads, once) and their values; the instant(s); the venues (400 unknown, 403 outside your plan, 403 exchange_history_unavailable for any exchange while exchange history is switched off; bookmakersOnly=true beside an exchange filter is 400); your account's scope (403 with valid; a sport, market or venue left out is the scope's list); quote=true; the price (402); the event's sport inside your account's scope (403 sport_not_in_plan).

Price: /v2/pricing regions.uk.historical.event (an international region: its own regions.<code>.historical.event) tokens a page with rows; a page with none, a 304 and quote=true are free.

get/v2/historical/events/{id}/odds

Request

  • Base URL
    https://api.oddsrelay.io
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Path parameters

id, string required

The event id (an id since merged away answers as its survivor).

Query parameters

from, string date-time required

The window's start, ISO-8601 to the millisecond, from 2026-10-15T00:00:00Z (the recorded data starts 2026-10-17T00:00:00Z) to the archive's newest instant.

to, string date-time

The window's end (default: from + 24 h, or the archive's newest instant if that is earlier). At most 24 hours after from, and never after the archive's newest instant (400 date_out_of_range, with latest).

region, 'uk' | 'za' | 'ng' | 'us' | 'tz' | 'ke' | 'gh' | 'au' | 'ca' | 'zm' | 'ug' | 'cm' | 'ci' | 'sn' | 'cd' | 'mz' | 'mw' | 'nz' | 'rw' | 'global' | 'gr' | 'cz'

uk, the archive's own region (default), or one international code. Each international code is its own archive of its own venues: bookmakers, and in ca also STX (stx_ca, Ontario's betting exchange, as /v2/odds/raw serves it there: its back prices under each market's key, its lay prices under <key>_lay; bookmakersOnly=true leaves it out, and a file's bookmakers_only says whether the file holds its rows), recorded from 2026-11-16T05:50Z, the lane's first checkpoint (its first day 2026-11-16: an instant before that day is 400 date_out_of_range with earliest 2026-11-16T00:00:00.000Z, one inside it before the first checkpoint 404 no_history), gr from its switch-on at 2026-11-16T18:19Z (a gr page asked for before it is empty, and free), cz from its first rows in December 2026 (likewise empty, and free, before them), with uk's tiers, release lag and rules. Outside the regions your key reads: 403 region_not_in_scope; any other code is 404 unknown_region.

oddsFormat, 'decimal' | 'american'

decimal (default) or american (a signed integer; null for a price at or below 1.0). standard and dutching serve decimal only: anything else is 400.

bookmakers, string

Comma list of bookmaker keys (/v2/bookmakers), up to 40; none = every bookmaker. An exchange here is 400 naming exchanges.

exchanges, string

Comma list of exchange keys (/v2/bookmakers), up to 4. While exchange history is switched off, any exchange here is 403 exchange_history_unavailable; beside bookmakersOnly=true it is 400.

markets, string

Comma list of raw's market keys (h2h, over_under, handicap, …; never the matched boards' totals), up to 20: a key raw does not carry matches nothing, and venues and markets outside it are left out.

exchangesOnly, 'true' | 'false'

true: exchanges alone. While exchange history is switched off, true is 403 exchange_history_unavailable; beside bookmakersOnly=true it is 400.

bookmakersOnly, 'true' | 'false'

true: bookmakers alone, no exchange — the answer this route gave before exchanges were added. Default false (bookmakers and exchanges; BETDAQ never). true or false, else 400; true beside exchanges or exchangesOnly=true is 400.

limit, integer

Rows per page, 1-5000 (default 5000): the page one price buys. A page never splits one board version, so it can hold a few more.

cursor, string

The previous page's meta.next_cursor (or X-Next-Cursor). A cursor is bound to no account and expires 300 s after it was issued: 400 cursor expired: start again from the first page; any other shape 400 cursor not recognised: start again from the first page.

quote, string

true (also 1, yes, on): price this exact request instead of serving it. 200 {cost, remaining, rate_card}, free, every check before the price still applies; any other value is an ordinary request.

Response

The rows, or under quote=true the price.

union required
HistoricalEventEnvelope required
OR
Quote required

quote=true: this request's price. Free.

Changes

    • info

      added the new enum value cz to the query request parameter region

    • info

      added the new enum value au to the query request parameter region

    • info

      added the new enum value ca to the query request parameter region

    18 more changes in this revision