Events of a sport
Changed onEvery event the API serves under one sport key or prefix — the matched boards' and the raw board's — with what identifies it (teams, a race's venue, an outright's event_name, competition_key) and the matched boards carrying each, so any served event id can be looked up here (merged ids answer in eventIds). Free. Paged 250 at a time in (kick-off, id) order; a cursor resumes strictly after the last event it saw, so an event whose kick-off moves across the cursor during a walk can appear twice or be missed: dedupe by id and take a missed event on the next walk. A cursor expires 300 s after it was issued. region missing means uk. An event listed for a region that serves raw only is that region's own entry: its raw tree's values, has_coverage empty.
Request
- Base URLhttps://api.oddsrelay.io
- Auth
- HTTP bearer
- or API key in header x-api-key
Query parameters
ONE lowercase region code (/v2/regions lists yours). Missing means uk: on a data route only when your key covers uk, else 400 region_required naming your account's home region or another code your key reads; on discovery and keyless routes always. A comma list is 400 bad_request on every route but /v2/odds/raw (which reads a list of international codes as one board: see its region); the parameter sent twice or an uppercase code is 400 bad_request on every route; an unknown code, or one with no live bookmaker here, is 404 unknown_region; on a data route, a known code that does not serve the route's product is 403 product_not_in_region instead (standard?region=au).
envelope (default): {meta, data}. bare: the data array alone, meta moved to X-* headers.
iso (default, ISO-8601 UTC) or unix (integer epoch seconds) for commence_time, processed_at, last_update, and raw's meta.removed_since and meta.removed[].at. standard and dutching serve iso only: anything else is 400.
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.
Required: a sport key or a prefix of one as /v2/sports lists them. A competition key (an event's competition_key, listed on /v2/sports) returns every event of that competition, whatever its venues call it. Any other key returns what it returned before, plus every event a venue files under a key it begins (each venue names its league its own way), and, when every event that key has ever named belongs to ONE competition, the rest of that competition. Missing is 400 missing_param; unknown 400 unknown_sport with valid. A key can hold letters with accents (soccer_taça_de_portugal); its spelling without them (soccer_taca_de_portugal) is accepted too, so a value never needs percent-encoding.
Comma-separated, at most 50 event ids. An id merged into another (in that event's previous_ids) returns that event.
Events kicking off at or after this ISO-8601 instant (no offset = UTC; a fraction of a second rounds up). Not ISO-8601 is 400; on the matched boards a From after To is 400.
Events kicking off at or before this ISO-8601 instant (no offset = UTC).
Response
A page. Gzip unless refused (over 1 kB).
Changes
- breaking
added
subschema #1subschema #2to the response bodyoneOflist for the response status - info
removed
subschema #1subschema #2from the response bodyoneOflist for the response status
- breaking
- breaking
added
subschema #1subschema #2to the response bodyoneOflist for the response status
1 more change in this revision
- breaking