List a live game's line segments (manifest + position cursor).
const url = 'https://api.betflux.ai/v1/games/example/prediction-market-lines/live/segments';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.betflux.ai/v1/games/example/prediction-market-lines/live/segments \ --header 'Authorization: Bearer <token>'Until a game settles, its data is published as an append-only series of Parquet segments plus a current board (adr-0037). A dataset whose history is after_settlement (prediction-market-lines, adr-0107) publishes the board alone: segments is always empty and the history arrives with the final file. This route returns the manifest with a URL per segment; every segment URL carries ?rows= (the listed row count) — fetch listed URLs verbatim. The final artifact replaces all of it the moment it lands: once rows.parquet exists this route answers 404 with reason: "final_available" and the dataset route’s URL under final.
Pass cursor from the previous response to get only what is new: segments above the cursor’s seq, plus the cursor’s own segment when it has grown, carrying from_row so you read rows [from_row, rows). Fully-consumed segments are omitted, the response cursor echoes the request when nothing is new, and it is "0:0" while no segment exists yet.
A cursor must name a position the log still holds: 0:0, or a segment seq with at least rows rows. Anything else means the live log was rebuilt since the cursor was minted (a version bump, lost state) and answers 409 live-cursor-reset — list again without a cursor. A cursor this route returned never 409s while the log stands.
The cursor is a position, not a timestamp, on purpose: a slower operator’s file lands after a faster one’s later-stamped rows, so a later segment can end earlier than the one before it and a timestamp would silently drop rows.
Live rows are provisional — the final build may revise them. Cached 5 s at the edge; the listing itself counts nothing.
Live lines are a plan feature (limits.live on /v1/me). On a plan without them this route answers 403 plan-excludes — with feature: "live", required_tiers and upgrade_url — before any cache, file or usage is touched; the settled game’s final artifact on the dataset route is open to every plan.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).
Game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).
A dataset served live (adr-0037). Its earlier names still resolve, with a Deprecation header.
A dataset served live (adr-0037). Its earlier names still resolve, with a Deprecation header.
Query Parameters
Section titled “Query Parameters”Opaque position cursor from a previous /segments response.
Opaque position cursor from a previous /segments response.
Responses
Section titled “Responses”The live manifest, with a URL per segment and per board file, and the cursor to pass next time.
object
live: the segments hold every change so far. after_settlement: only the board is served while the game is live; segments is always empty and the history arrives with the final file.
object
object
object
/v1/games/{game_id}/{dataset}/live/segments/{seq}?rows={rows}&version={version} (the deprecated /v1/games/{game_id}/sportsbook-lines/segments/... listing lists its own paths) — fetch it verbatim; the rows it carries is this entry’s rows, and version pins the read to the listing’s dataset version.
Rows of this segment the cursor already consumed; read rows [from_row, rows).
object
object
Position of everything listed; the request cursor echoed when nothing is new; “0:0” when no segment exists yet, which is always when history is after_settlement.
Example
{ "dataset": "prediction-market-lines", "history": "live"}Validation failed — unknown or invalid query parameter, or a malformed range (problem type validation-error).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Missing, malformed, or unrecognized API key (problem type invalid-key).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}The key is valid, but the account has no active plan (problem type subscription-required): a new account, or one whose plan was cancelled or lapsed. The response includes upgrade_url; the key works again once the account has a plan.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}API key revoked or suspended (problem type key-disabled); a feature the plan does not include (problem type plan-excludes, with feature — live for the live lines routes, league_datasets for league-scoped datasets, prediction_markets for prediction-market datasets — required_tiers and upgrade_url; never worth retrying on the same key); or a game outside the key’s history window (problem type history-restricted).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Unknown or not-live dataset, unresolvable game id, a league outside the dataset’s coverage, or no live artifacts for the game. reason is final_available when the game has settled (fetch final, the dataset route) and no_live_artifact when it has not started being tracked.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}The cursor names a position the live log no longer holds — the log was rebuilt since the cursor was minted (problem type live-cursor-reset, with game_id). List again without a cursor. Never cached; nothing counted.
object
Example
{ "type": "https://api.betflux.ai/problems/live-cursor-reset", "status": 409}Rate limit, games allowance, or ops throttle — the problem type distinguishes rate-limited, quota-exhausted and throttled. quota-exhausted refuses only a new game past the period’s allowance (games already counted stay readable) and carries reset_at, upgrade_url, game_id, games_used and games_allowance.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}