Event states (snapshot)
Changed onThe event-state register's snapshot: each event's FATE in one region's lane, judged across every venue we read, not only your bookmakers — scheduled (not known to be over or withdrawn), started (pre-match is over), gone (withdrawn, confirmed; not issued yet: the changelog dates its start) or merged (a duplicate of merged_into). Free, like /v2/events; it counts against your flood and in-flight caps. Rows are ordered by id and paged with cursor (300 s); each page is read in one transaction with the log position in meta.since: keep the FIRST page's and follow /v2/events/changes from it with the same region and filters. List your events from raw (/v2/odds/raw), and use these routes for each event's fate: keep an event listed while its state is scheduled, even when raw has no prices for it right now; hide it, but keep its row, while it is started, gone or merged. The register covers the ids raw serves in the lane; an id served only on the matched boards answers in meta.unknown_ids. Your account's scope is a ceiling: rows outside its sports are never returned. The client recipe and the windows table (K, G and C per sport) are in the docs.
Request
- Base URLhttps://api.oddsrelay.io
- Auth
- HTTP bearer
- or API key in header x-api-key
Query parameters
ONE lowercase region code; missing means uk. Event ids are shared across regions wherever the two listings can be matched: a fixture uk lists carries its uk id on any other region, and an id merged across regions keeps answering in previous_ids on its own region's routes. Not matched across regions yet, so served under their own region's id: horse and greyhound racing, outright markets, virtual games, and a fixture two regions list too differently to join. since tokens still belong to one lane: uk, or every other region. A comma list, the parameter sent twice or an uppercase code is 400 bad_request; an unknown code, one another service answers, or one whose lane is not switched on here is 404 unknown_region.
Comma-separated, at most 20, lowercased, judged exactly as raw's sports: a row passes when its sport_key starts with a value, its sport name (football) equals one, its competition is the one a competition key names, or a key one of its venues files it under starts with a value. Unknown is 400 unknown_sport with valid. Inside your account's scope (the sports of the products your key holds); outside, 403 sport_not_in_plan.
Comma-separated, at most 40: competition names (an event's league or sport_title), lowercased. Not checked against a catalogue.
Comma-separated, at most 50 event ids: one page holding each id's own row, plus each merged id's final survivor, deduplicated and ordered by id. sports, leagues and the kick-off window are not applied, and a survivor is returned whatever its sport, window or state; your account's scope still applies. An id with no row here, or outside your scope, is listed in meta.unknown_ids. cursor cannot be sent with it.
Comma-separated: scheduled, started, gone, merged. Default scheduled; all four with eventIds. Without eventIds, any value but scheduled needs commenceTimeFrom and commenceTimeTo at most 7 days apart. Any other value is 400 bad_request.
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).
Rows per page, 1-1000 (default 1000). Anything else is 400.
The previous page's meta.next_cursor. This route sends no X-Next-Cursor header: page with the envelope. 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. With eventIds (always one page) it is 400.
iso (default, second-precision ISO-8601 UTC) or unix (epoch seconds) for commence_time, from_commence_time, state_since, first_seen, at and meta.as_of. board_version, X-OddsRelay-Version and meta.processed_at never change.
Response
A page. Gzip unless refused (over 1 kB).
Changes
- info
endpoint added
- info