API ReferenceSports
Fetch recorded price history for one fixture block.
const url = 'https://data.predictefy.com/v1/sports/fixtures/example/history?marketType=moneyline&period=full&lineTeam=team1&interval=1m';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://data.predictefy.com/v1/sports/fixtures/example/history?marketType=moneyline&period=full&lineTeam=team1&interval=1m' \ --header 'Authorization: Bearer <token>'DARK by default. Public access requires both READS_ENABLE_SPORTS and READS_ENABLE_SPORTS_HISTORY to be the literal true, with configured sports Redis and History database clients. A disabled history flag or missing sports Redis client leaves the route unmounted (404). Enabling history without HISTORY_DATABASE_URL rejects service startup. When only the family flag is off, configured beta accounts can access the mounted route; other callers receive 404. Served from the History database, with fixture identity from the mirror or Core when no longer active. priceBasis is best_ask. Samples are retained 90 days; opening and closing marks are permanent once taken. Sample-backed fields (lines, the series[].open fallback, current and movement.changes) consider samples newer than to minus 32 days, the read horizon. The closing block is the recorded kickoff state, not a current quote or an official result. net is non-null only when feeUnknown is false and a net price is available; unknown fees keep net null. Metered at the history weight (sports_history). No ETag, 304, pagination or live venue calls. Recorder liveness failures preserve retained history with degraded metadata; History read failures return HISTORY_UNAVAILABLE. line and venues filter sample-backed data; permanent opening and closing marks can still contribute series for other lines and venues. data.lines lists retained sample lines, so mark-only lines may be absent from that list. Example uses marketType=spread, venues=polymarket and the explicit window in meta before kickoff.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Canonical mirrored fixture ID. Invalid characters or more than 128 characters return VALIDATION_ERROR.
Query Parameters
Section titled “Query Parameters”Screenable market type.
Canonical market period.
Allowed only when marketType=team_total; otherwise 400. team1 is home when both home/away identities are stated, else teamA. Spread always addresses team1 without this parameter. The default applies only to team totals.
Finite numeric line. When supplied, filters retained samples to this line. Omission selects the latest recorded main line; data.lines lists the available retained sample lines. Permanent opening and closing marks can still contribute series for other lines and venues. Spread lines address team1; line-less markets retain null.
Comma-separated display venues. Lowercased, trimmed and deduplicated before enforcing at most 12 distinct venues; each normalized name is 1..32 letters, digits or underscores. Omission uses all available venues.
ISO-8601 instant with seconds and timezone; YYYY-MM-DD is also accepted as UTC midnight. Defaults to the resolved to minus 7 days. Must be strictly before to. An earlier retained sample may anchor the first point at from.
ISO-8601 instant with seconds and timezone; YYYY-MM-DD is also accepted as UTC midnight. Defaults to the earlier of now and exact kickoff plus 12 hours, or now when kickoff is not exact. Explicit future values are capped at now. Must be strictly after from, with a span at most 31 days. The sample read horizon starts at the resolved to minus 32 days.
Sampling bucket width. Omission picks the finest supported interval for which ceil((to - from) / interval) is at most 1000. An explicit finer interval answers 400 VALIDATION_ERROR. Each bucket retains its last recorded state; no future points are manufactured.
Responses
Section titled “Responses”Retained fixture price history.
object
Recorded best-ask history from the History database. Samples are retained 90 days; opening and closing marks are kept forever. The closing block is the recorded kickoff state, not a current quote or an official result. It is null when kickoff is not exact, the window ends before kickoff, or no closing samples exist. final means the keyed markets closed. Fair, edge and hold are Predictefy calculations.
object
object
object
Main-line movement in recorded order. open and current are the first and last returned changes; close is the main line reconstructed from the recorded kickoff block, or null when unavailable.
object
object
object
object
object
object
Predictefy computes average, normalized fair probability, edge, and hold. Edge is null whenever fair is null. Best is an eligible live, non-stale quote or null; unknown fees can select best on gross with edgeOnGross=true and net=null. Best does not promise a verified all-in execution cost.
object
One venue quote. Catalog and stale cells cannot be best. feeUnknown=true always has net=null. grossReason explains a null gross price; asOf is the source quote clock, not a freshness confirmation.
object
One venue quote. Catalog and stale cells cannot be best. feeUnknown=true always has net=null. grossReason explains a null gross price; asOf is the source quote clock, not a freshness confirmation.
object
One venue, selection and line. open is the first usable recorded price; close is the recorded kickoff mark; current is the latest retained state and can fall outside the requested window. Opening and closing marks survive sample retention. points are ordered by at, with an optional anchor at from.
object
At is the recorded point time (or from for an anchor); asOf is source freshness. gross is the recorded best ask, or null with a reason. A non-null net is present only when feeUnknown is false and a net price is available; the net key is always emitted, otherwise null. Catalog and stale states remain explicitly marked.
object
At is the recorded point time (or from for an anchor); asOf is source freshness. gross is the recorded best ask, or null with a reason. A non-null net is present only when feeUnknown is false and a net price is available; the net key is always emitted, otherwise null. Catalog and stale states remain explicitly marked.
object
At is the recorded point time (or from for an anchor); asOf is source freshness. gross is the recorded best ask, or null with a reason. A non-null net is present only when feeUnknown is false and a net price is available; the net key is always emitted, otherwise null. Catalog and stale states remain explicitly marked.
object
At is the recorded point time (or from for an anchor); asOf is source freshness. gross is the recorded best ask, or null with a reason. A non-null net is present only when feeUnknown is false and a net price is available; the net key is always emitted, otherwise null. Catalog and stale states remain explicitly marked.
object
Resolved window and sampling interval. truncated is true when the bucketed sample result exceeds the repository row cap. Recorder liveness is advisory: retained prices remain available when degraded. Healthy responses omit degradedReason.
object
Example
{ "success": true, "data": { "fixtureId": "nba-2026-09-29-lal-bos", "sport": "basketball", "competition": { "id": "nba", "name": "NBA", "timeZone": "America/New_York" }, "home": { "id": "los-angeles-lakers", "name": "Los Angeles Lakers" }, "away": { "id": "boston-celtics", "name": "Boston Celtics" }, "teams": [ { "id": "los-angeles-lakers", "name": "Los Angeles Lakers" }, { "id": "boston-celtics", "name": "Boston Celtics" } ], "kickoffAt": "2026-09-29T12:00:00.000Z", "kickoffPrecision": "exact", "eventDate": "2026-09-29", "status": "scheduled", "marketType": "spread", "period": "full", "lineTeam": { "key": "home", "kind": "team", "side": "home", "team": { "id": "los-angeles-lakers", "name": "Los Angeles Lakers" } }, "line": -3.5, "lines": [ -3.5 ], "movement": { "open": { "at": "2026-09-29T11:50:00.000Z", "line": -3.5 }, "current": { "at": "2026-09-29T11:50:00.000Z", "line": -3.5 }, "close": null, "changes": [ { "at": "2026-09-29T11:50:00.000Z", "line": -3.5 } ] }, "closing": null, "closingUnavailable": "before_kickoff", "series": [ { "venue": "polymarket", "selection": { "key": "home", "kind": "team", "side": "home", "team": { "id": "los-angeles-lakers", "name": "Los Angeles Lakers" } }, "line": -3.5, "open": { "at": "2026-09-29T11:50:00.000Z", "asOf": "2026-09-29T11:50:00.000Z", "gross": { "probability": 0.5, "american": 100, "decimal": 2 }, "net": { "probability": 0.5, "american": 100, "decimal": 2 }, "feeUnknown": false, "sizeAtPrice": 100, "stale": false, "source": "live", "reason": null, "marketId": "1234567", "outcomeId": "78018682347280956411283430278314908651872132508462137629544622958167241418531" }, "close": null, "current": { "at": "2026-09-29T11:59:00.000Z", "asOf": "2026-09-29T11:56:00.000Z", "gross": { "probability": 0.5, "american": 100, "decimal": 2 }, "net": null, "feeUnknown": true, "sizeAtPrice": null, "stale": true, "source": "catalog", "reason": null, "marketId": "1234567", "outcomeId": "78018682347280956411283430278314908651872132508462137629544622958167241418531" }, "points": [ { "at": "2026-09-29T11:58:00.000Z", "asOf": null, "gross": { "probability": 0.4, "american": 150, "decimal": 2.5 }, "net": { "probability": 0.4, "american": 150, "decimal": 2.5 }, "feeUnknown": false, "sizeAtPrice": 100, "stale": false, "source": "live", "reason": null, "marketId": "1234567", "outcomeId": "78018682347280956411283430278314908651872132508462137629544622958167241418531" }, { "at": "2026-09-29T11:59:00.000Z", "asOf": "2026-09-29T11:56:00.000Z", "gross": { "probability": 0.5, "american": 100, "decimal": 2 }, "net": null, "feeUnknown": true, "sizeAtPrice": null, "stale": true, "source": "catalog", "reason": null, "marketId": "1234567", "outcomeId": "78018682347280956411283430278314908651872132508462137629544622958167241418531" } ] }, { "venue": "polymarket", "selection": { "key": "away", "kind": "team", "side": "away", "team": { "id": "boston-celtics", "name": "Boston Celtics" } }, "line": -3.5, "open": { "at": "2026-09-29T11:50:00.000Z", "asOf": "2026-09-29T11:50:00.000Z", "gross": { "probability": 0.5, "american": 100, "decimal": 2 }, "net": { "probability": 0.5, "american": 100, "decimal": 2 }, "feeUnknown": false, "sizeAtPrice": 100, "stale": false, "source": "live", "reason": null, "marketId": "1234567", "outcomeId": "43527008401149359855218064713320894673589240180563304811827286256675437092861" }, "close": null, "current": { "at": "2026-09-29T11:59:00.000Z", "asOf": "2026-09-29T11:59:00.000Z", "gross": null, "net": null, "feeUnknown": false, "sizeAtPrice": 0, "stale": false, "source": "live", "reason": "no_asks", "marketId": "1234567", "outcomeId": "43527008401149359855218064713320894673589240180563304811827286256675437092861" }, "points": [ { "at": "2026-09-29T11:59:00.000Z", "asOf": "2026-09-29T11:59:00.000Z", "gross": null, "net": null, "feeUnknown": false, "sizeAtPrice": 0, "stale": false, "source": "live", "reason": "no_asks", "marketId": "1234567", "outcomeId": "43527008401149359855218064713320894673589240180563304811827286256675437092861" } ] } ] }, "meta": { "asOf": "2026-09-29T11:59:30.000Z", "from": "2026-09-29T11:55:00.000Z", "to": "2026-09-29T11:59:00.000Z", "interval": "1m", "priceBasis": "best_ask", "retentionDays": 90, "truncated": false, "degraded": false }}Invalid query or fixture ID. Facets rejects from/to because its snapshot owns the window.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Missing, invalid or revoked API key.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The account's credit balance cannot cover this sports read's weight. Not retryable.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The API key lacks the read scope this route requires. Not retryable.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The fixture is absent from the mirror, or the family is unmounted.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Request rate limit exceeded.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Unexpected internal error; requestId identifies the failure.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}HISTORY_UNAVAILABLE when the History database read fails or exceeds its bounded budget; database timeouts and budget exhaustion are not retryable. Capacity overflow is retryable and includes Retry-After: 1. SPORTS_SCREEN_UNAVAILABLE when the cold engine fixture index cannot load. CATALOG_UNAVAILABLE when the Core identity fallback times out. PLATFORM_UNAVAILABLE when authentication or metering storage is unavailable. Recorder liveness alone instead returns retained history with degraded metadata.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}