Discovery

Event state changes (log)

Changed on

The event-state register's ordered log for one region's lane, from since (a snapshot's FIRST meta.since, then each reply's meta.next_since). Free, like /v2/events. Each change carries the FULL row after it (event): replace your row with it whenever its seq is above yours, whatever change says, including values you do not know. A call scans at most 50,000 positions of the log: while meta.more is true call again at once with meta.next_since (a reply can be empty and still have more), then store meta.next_since and call again in about 30 s. Filters run on each change as it was written: send exactly your snapshot's filters. A descriptors change passes sports and leagues when the event passes before or after it (an event that leaves your filters still reaches you with its new row); a kickoff passes a kick-off window when its old or new kick-off is inside; a merged change passes when the merged id does. A kick-off window selects on each change's kick-off at the time of the change: use a fixed window (re-snapshot to move it) or none. On 410 since_expired, snapshot again, then look up with /v2/events/state?eventIds= every id you hold that the new snapshot lacks, before you hide it. Your account's scope is a ceiling, judged before or after each change like sports.

get/v2/events/changes

Request

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

Query parameters

since, string required

Required: the position to follow from, meta.since of a snapshot's FIRST page or the previous call's meta.next_since. Missing is 400 missing_param; not of the form <epoch>.<seq> 400 bad_request; one this lane can no longer serve 410 since_expired with oldest_since.

region, string

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.

sports, string

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.

leagues, string

Comma-separated, at most 40: competition names (an event's league or sport_title), lowercased. Not checked against a catalogue.

eventIds, string

Comma-separated, at most 50 event ids: only their changes. Add a survivor when one of yours is merged.

commenceTimeFrom, string

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.

commenceTimeTo, string

Events kicking off at or before this ISO-8601 instant (no offset = UTC).

limit, integer

Changes per call, 1-5000 (default 1000). Anything else is 400.

dateFormat, 'iso' | 'unix'

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).

object required
meta, EventChangesMeta required
data, EventChange[] required

Changes