Skip to content
Product Documentation

Download one live segment's Parquet.

GET
/v1/games/{game_id}/sportsbook-lines/segments/{seq}
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.

game_id
required

Public game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).

string

Public game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).

seq
required

Segment sequence number as listed by /segments (a non-negative integer).

string

Segment sequence number as listed by /segments (a non-negative integer).

rows

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.

string
/^\d+$/

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.

Range

Standard HTTP byte range, e.g. bytes=0-65535.

string
Example
bytes=0-65535

Standard HTTP byte range, e.g. bytes=0-65535.

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.

Media typeapplication/vnd.apache.parquet
string format: binary

The requested byte range of the segment (Content-Range set). Never served from the edge cache.

Media typeapplication/vnd.apache.parquet
string format: binary

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 has no entitled tier — subscription lapsed or absent (problem type subscription-required; the body carries an upgrade_url).

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), or the requested range exceeds the tier’s history window (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"
}

Unresolvable game id, no live artifacts for the game, or no segment with that sequence number.

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

Media typeapplication/problem+json
object
type
required
string
Allowed values: https://api.betflux.ai/problems/live-segment-behind
title
required
string
status
required
number
Allowed values: 409
detail
required
string
game_id
required
string
seq
required
integer
rows
required

The rows the request asked for — what the listing promised.

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

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"
}