Download one live segment's Parquet.
const url = 'https://api.betflux.ai/v1/games/example/sportsbook-lines/segments/example';const options = { method: 'GET', headers: {Range: 'bytes=0-65535', 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/sportsbook-lines/segments/example \ --header 'Authorization: Bearer <token>' \ --header 'Range: bytes=0-65535'The segment’s bytes, in exactly the columns the final artifact publishes — concatenating every segment in seq order reproduces the game’s line history so far.
Closed segments are immutable and cached 24 h; the highest seq is the open tail, rewritten in place as rows are appended and cached 5 s. The live engine guarantees prefix stability: an object at a given seq only ever grows and its first rows never change, so a (seq, rows) pair always names the same rows.
rows — carried by every URL /segments lists — is the row count the listing promised. When the object holds fewer, the log was rebuilt underneath the listing and the response is 409 live-segment-behind (never cached, nothing debited): list the segments again. The edge cache key includes rows, so each (seq, rows) is its own entry and a cached body always held at least rows rows. Without rows the object is served as is (hand-built URLs, DuckDB).
HTTP Range is honored (206; partial responses are never cached; rows is still checked).
Metering: each row of a live segment is charged once per account per month. A segment’s rows never change once published and the open tail only grows, so re-reading a segment costs nothing and each poll of the open tail costs only the rows it gained since you last read it. Range requests are charged the same way.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Public game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).
Public game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).
Segment sequence number as listed by /segments (a non-negative integer).
Segment sequence number as listed by /segments (a non-negative integer).
Query Parameters
Section titled “Query Parameters”Row count the listing promised for this segment (listed segment URLs carry it — use them verbatim). 409 live-segment-behind when the object holds fewer rows than this.
Row count the listing promised for this segment (listed segment URLs carry it — use them verbatim). 409 live-segment-behind when the object holds fewer rows than this.
Header Parameters
Section titled “Header Parameters”Standard HTTP byte range, e.g. bytes=0-65535.
Example
bytes=0-65535Standard HTTP byte range, e.g. bytes=0-65535.
Responses
Section titled “Responses”The segment’s Parquet. X-Betflux-Rowcount is its row count; the amount charged is the part of it not charged to your account this month. Accept-Ranges: bytes.
The requested byte range of the segment (Content-Range set). Never served from the edge cache.
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 has no entitled tier — subscription lapsed or absent (problem type subscription-required; the body carries an upgrade_url).
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), or the requested range exceeds the tier’s history window (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"}Unresolvable game id, no live artifacts for the game, or no segment with that sequence number.
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 object holds fewer rows than rows promised (problem type live-segment-behind, with game_id, seq and the requested rows). List the segments again. Never cached; nothing debited.
object
The rows the request asked for — what the listing promised.
Example
{ "type": "https://api.betflux.ai/problems/live-segment-behind", "status": 409}Rate limit, monthly row quota, or ops throttle — the problem type distinguishes rate-limited, quota-exhausted, and throttled.
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"}