Sports betting model data

Sports betting model data: market prices, implied probabilities and line history with stable ids, to train, backtest and run betting models and research.

Models are only as good as the data you train and evaluate them on. PreciseAPI gives you consistent ids, the full line history and the closing line to evaluate every prediction your model makes.

Sports betting model data comes in three layers: the prices the market posted, which are both inputs and benchmarks; the results, which are your labels; and the closing line, which is the yardstick most serious bettors and researchers use to judge a model. Get any one of them wrong, usually through a timestamp, and a backtest will look better than reality.

This page covers how to collect all three from PreciseAPI, what the API does and doesn't store, a Python collector you can run on a schedule, and the mistakes that most often inflate results.

What sports betting model data has to include

PreciseAPI covers each layer. /v1/odds, /v1/props and /v1/futures return current prices from 36 sources, with an updated_at on every market. /v1/history returns the opening price, the current price and every recorded change for main full-game markets (moneyline, spread and total) at any book. /v1/scores returns live and final scores on the same event ids. format=probability returns implied probabilities directly. The historical odds API and sports scores API pages summarize the two endpoints most models lean on, and league pages such as the NBA odds API list the markets and periods each league carries.

What it doesn't store: build the sports betting dataset forward

PreciseAPI does not sell a multi-season archive. Line history covers main full-game markets for games in the feed, and finished events stay queryable for at least four hours. Player prop history isn't recorded. The dependable pattern is a collector that copies prices, history and results into your own storage as games happen, so your dataset grows from the day you start. If you need several past seasons right away, our comparison page The Odds API alternative says plainly where that provider's archive is deeper than ours.

Three scheduled jobs cover most models:

JobEndpointWhen
Price snapshots/v1/odds (2 credits), /v1/props (3)Every 5 to 15 minutes before games
Line history and close/v1/history (3 per market and book)After each game ends
Results/v1/scores (1)Every hour; finals stay for at least four hours

A collector in Python

The official Python client reads PRECISEAPI_KEY from the environment. This collects snapshots, closing prices and results into pandas:

from datetime import datetime, timezone
import pandas as pd
from preciseapi import PreciseAPI

client = PreciseAPI()
BOOKS = ["pinnacle", "circa", "draftkings", "fanduel"]

def snapshot(league):
    res = client.odds(league=league, markets=["moneyline", "spread", "total"], books=BOOKS)
    now = datetime.now(timezone.utc).isoformat()
    return pd.DataFrame([
        {"captured_at": now, "event_id": e["id"], "start_time": e["start_time"], "book": b["id"],
         "market": m["key"], "line": m.get("line"), "selection_id": o["id"], "side": o["side"],
         "point": o.get("point"), "price": o["price"], "updated_at": m["updated_at"]}
        for e in res.data for b in e["bookmakers"] for m in b["markets"] for o in m["outcomes"]
    ])

def close(event_id, start_time, book="pinnacle", market="spread"):
    h = client.history(event_id=event_id, book=book, market=market).data
    before = [p for p in h["points"] if p["t"] <= start_time]
    return before[-1] if before else h["open"]  # {"t", "line", "prices"}

def results(league):
    res = client.scores(league=league, status=["final"])
    return pd.DataFrame([
        {"event_id": e["id"], "home_score": e["score"]["home"], "away_score": e["score"]["away"]}
        for e in res.data if e["score"]
    ])

History prices follow the market's outcome order: home then away for moneylines and spreads, with line from the home side's view, and over then under for totals. The backtesting betting models post builds a full archive and grading pipeline on top of this, and the odds API Python docs cover the client's retries, async use and streaming.

Betting model odds data at every stage

The same sports betting model data serves each stage of a model's life:

An odds API for researchers

Researchers studying market efficiency, book behavior or exchanges need the same collector, plus documentation of how the data was gathered. Record your book list, snapshot interval and the captured_at time of each row so the method can be repeated. Contract exchanges such as Kalshi and Polymarket sit in the same schema as sportsbooks, with liquidity on each outcome, so a comparison between venues needs no mapping. For quick questions before writing code, the odds API MCP server lets an AI client call tools such as get_line_history with your key.

Which plan fits

Sports betting model data rarely needs a big credit budget. Snapshotting three leagues every 15 minutes, one /v1/odds call each, is 17,280 credits a month, and closing prices for ten games a day at two books and three markets add about 5,400. Both fit easily in Edge's 100,000 credits, and line history, props and futures are on every paid plan. Sharp's unlimited credits suit frequent snapshots of props across many leagues. Syndicate adds in-play prices and the WebSocket stream, the way to capture every pre-game and live tick yourself. See odds API pricing.

Mistakes that inflate backtests

Frequently asked questions

Does PreciseAPI have historical odds for past seasons?

No multi-season archive. /v1/history covers the opening price, current price and every recorded move for main full-game markets of games in the feed, and finished events stay available for at least four hours. Most teams run a collector and build their own archive from there.

Can I get implied probabilities instead of American odds?

Yes. Pass format=probability to any odds endpoint, or format=decimal for decimal odds. Probabilities include the book's margin, so de-vig them before using them as fair prices.

Is line history included on the Edge plan?

Yes. Line history, player props and futures are included on every paid plan, from Edge at $49.99 a month.

Which books should a model use as its reference?

Most models use low-margin books such as Pinnacle and Circa, and exchanges such as Novig weighed by liquidity. The why Pinnacle odds matter post and the Pinnacle odds API page explain the reasoning; test any choice against your own closing-line results.

Training data with stable keys

Event, team, player and market ids stay the same across books and over time, so a dataset built from daily /v1/odds pulls joins cleanly with results from /v1/scores. Request format=probability to get implied probabilities directly, or keep American odds and convert in your own code. /v1/scores keeps finished games for four hours, so grade results soon after games end, or store them as they arrive.

Measuring a model against the market

Closing line value compares the price you took with the last price before the game started, and beating the close consistently is the usual sign that a model is ahead of the market. /v1/history returns the opening and current values and every recorded move for main full-game markets, so you can store the close and compare it with the price your model acted on. Line history is included on every paid plan.

Example request

GET /v1/odds?league=nba&markets=moneyline&format=probability

Endpoints

Products

Related reading

More use cases

Looking for a specific league or book? See the odds API directory, or compare plans.