Skip to content
Product Documentation

List a live game's line segments (manifest + position cursor).

GET
/v1/games/{game_id}/{dataset}/live/segments
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.

game_id
required

Game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).

string

Game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).

dataset
required

A dataset served live (adr-0037). Its earlier names still resolve, with a Deprecation header.

string
Allowed values: prediction-market-lines sportsbook-lines

A dataset served live (adr-0037). Its earlier names still resolve, with a Deprecation header.

cursor

Opaque position cursor from a previous /segments response.

string
/^\d+:\d+$/

Opaque position cursor from a previous /segments response.

The live manifest, with a URL per segment and per board file, and the cursor to pass next time.

Media typeapplication/json
object
game_id
required
string
dataset
required
string
Allowed values: prediction-market-lines sportsbook-lines
schema_version
required
string
provisional
required
boolean
updated_at
required
string
applied_through
required
string | null
history
required

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.

string
Allowed values: live after_settlement
operators
required
object
key
additional properties
object
last_row_at
required
string
observed_through
required
string | null
segments
required
Array<object>
object
seq
required
integer
rows
required
integer
closed
required
boolean
min_timestamp
required
string
max_timestamp
required
string
url
required

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

string
from_row

Rows of this segment the cursor already consumed; read rows [from_row, rows).

integer
board
required
object
rows
required
integer
files
required
Array<object>
object
operator
required
string
rows
required
integer
url
required
string
cursor
required

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.

string
Example
{
"dataset": "prediction-market-lines",
"history": "live"
}

Validation failed — unknown or invalid query parameter, or a malformed range (problem type validation-error).

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}

Missing, malformed, or unrecognized API key (problem type invalid-key).

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

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

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

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

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

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

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

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

Media typeapplication/problem+json
object
type
required
string
Allowed values: https://api.betflux.ai/problems/live-cursor-reset
title
required
string
status
required
number
Allowed values: 409
detail
required
string
game_id
required
string
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.

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}