Racing
Racing race_id and status
How a race is identified, where its status comes from, and what changed_at means.
race_id
A race is identified by its race_id, built from the race record:
Ris thoroughbred,Ggreyhound andHharness.dateis the race day on the Australia/Melbourne calendar, so a UK evening race and the next Australian morning card share a day.start_timeis always UTC.countryis a token such asau,nz,gb,ie,fr,us,canada,hkorza.
Get it from /racing/meetings and pass it back unchanged. Do not build one yourself.
Status
A race's status comes from Betfair, never from the clock. betfair_status is OPEN, SUSPENDED or CLOSED, or null when Betfair has no market or has purged it. in_play is Betfair's in-play flag. race_state reconciles the two with the settle states we see: upcoming, in_play, interim or finalised.
| Field | Values |
|---|---|
betfair_status | OPEN, SUSPENDED, CLOSED, null |
in_play | true or false |
race_state | upcoming, in_play, interim, finalised |
A race running late is still OPEN after its start_time. Do not treat the start time as the off.
Results
result on /racing/race is null until a result source has one. It comes from TAB where TAB has it (source: "tab"), and becomes official once TAB is paying. Without TAB, a Sportsbet result is served instead: source: "sportsbet", official: false, placings only (no dividends, no scratchings).
changed_at
Each book's price carries changed_at, the time we last recorded that book's price for that runner change. A price that has not moved keeps an old changed_at, so it is not a freshness stamp and it is omitted when unknown. Racing prices have no updated_at.
scraped_at is the freshness stamp: when we last read that book's price from the book (UTC, milliseconds), whether or not it moved. It is on races with source: "live", and omitted when unknown. To measure how fresh a price is, compare scraped_at with your receive time, not changed_at. On the WebSocket a scraped_at change arrives together with a change of that book's win or place, never on its own; the REST response carries it on every price.
Tote
AU and NZ races carry TAB tote data for NSW and VIC: per-runner win and place approximates in runners[].tote, pool totals in tote_pools (stamped by tote_updated_at) and every dividend in result.dividends once the race is official. Fields are absent until TAB has published them. Values are dollars per $1 staked and are never converted by format.