Skip to content

Polling

Every answer carries an ETag. Send it back in If-None-Match, and if nothing changed you get 304 Not Modified without a body:

curl -i -H "X-Api-Key: $KEY" "https://fixtures.halfpoint.tech/live"
# HTTP/2 200
# etag: "2aff76af54fa1b81"

curl -i -H "X-Api-Key: $KEY" -H 'If-None-Match: "2aff76af54fa1b81"' "https://fixtures.halfpoint.tech/live"
# HTTP/2 304

Most HTTP clients do this for you when they cache (Cache-Control: no-cache tells them to ask every time). The ETag depends only on the answer's content.

How often

endpoint suggested interval
/live every 2-5 s while games are on
/fixtures every few minutes
/mappings every few minutes until games start
/grades every few minutes after games end
/odds every 1 s while games are on

Our live data follows the games within seconds; polling /live faster than every 2 s gains little. To have it pushed instead, use the live stream.

/odds is rebuilt at most once per second, so polling it faster returns the same answer. For every change as it happens, use the stream instead of polling.