DocsGuidesView as Markdown

How fresh a price is

The timestamps each reply carries and how to work out a price's age.

Reply time

meta.processed_at, and the X-Processed-At header, are the reply's time. X-OddsRelay-Version says which version of the data you were served, the same on every route for one publish.

When each bookmaker was last read

On the matched products, meta.last_seen is {bookmaker key: {sport group: ISO time}}: the last time each bookmaker and sport was read, the oldest reading behind the reply. Now minus last_seen is the most that bookmaker's prices can have aged. It is keyed by the sport's key base (soccer, horse_racing, american_football), not an event's full sport_key: take the group /v2/sports gives each sport key (American Football) and write it lowercase with underscores. A filtered reply's table is cut to the bookmakers and sports it returns.

Keyed /v2/coverage carries the same last_seen per bookmaker and sport, with event counts.

last_seen counts the reads of a bookmaker's markets beyond match odds as well. Further from kick-off, prices in the other markets can be older. A bookmaker serving markets far from kick-off can therefore show an older last_seen. William Hill's prices can be older than its last_seen says.

A price's age, JavaScript

// groupOf: {sport_key: key base}, built once from GET /v2/sports rows: base = group.toLowerCase().replace(/[^a-z0-9]+/g, "_")
const seen = meta.last_seen[offer.bookmaker]?.[groupOf[event.sport_key]];
const ageSeconds = seen ? (Date.now() - Date.parse(seen)) / 1000 : null;

Raw's last_update

On raw, each market's last_update is when that bookmaker's market last changed: a price, a lay price or available moved, or a row appeared. A service restart can move it once with nothing changed, so dedupe on content. It is not a heartbeat: a quiet market's last_update ages while the bookmaker is still read.

What is left out for age

The API drops no pre-match row for age. A bookmaker whose latest read is older than its own window, at most two minutes, is left out until it is read again.

An in-play price is served only while it was read in the last 10 seconds: In-play prices covers the rest.

From the blog

Every parameter: API reference.