Game markets
FanDuel game lines and markets
Every FanDuel market per game: moneyline, spread and total for the game and each period, alternates, ladders, team props and futures, with no-vig fair prices.
FanDuel API is an independent data service operated by FF API Inc. It is not affiliated with, endorsed by or sponsored by FanDuel.
Read the whole book for a game, game lines first, with the hold and a fair price for every selection.
- Every market
- Game, half, quarter and period lines, alternates and ladders, first scorer, team props and specials, as FanDuel lists them.
- Fair prices
- Where outcomes exclude each other, each selection carries a no-vig fair probability and the market its hold.
- Futures
- Champions, awards and win totals per league, on their own endpoint.
What it returns now
| Selection | Line | American | Decimal | Fair |
|---|---|---|---|---|
| Boston Celtics | -405 | 1.247 | 77.1% | |
| Charlotte Hornets | +320 | 4.200 | 22.9% |
Hold 4.01%. Fair is the no-vig probability: each side's implied probability divided by their sum.
Endpoints and parameters
/api/v1/marketsEvery market FanDuel lists per game: moneyline, spread and total for the game and each period, alternate lines, ladders, first scorer, team props, specials and player props. Each selection has American and decimal odds and, where outcomes exclude each other, a fair no-vig probability.
| Parameter | In | Description |
|---|---|---|
| game | query | One game id, from /api/v1/events. |
| market_type | query | A market family such as moneyline, spread, total or player_prop, or a FanDuel market type such as MONEY_LINE. |
| period | query | game or a period such as q1 or h1. One of game, q1, q2, q3, q4, h1, h2, p1, p2, p3, i1, f5. |
| live | query | true for in-play markets only, false for pregame. One of true, false. |
| league | query | League code as FanDuel lists it, such as NBA. |
| sport | query | nba, nfl, nhl, mlb, ncaab or ncaaf. |
| player | query | Part of a player name. |
| status | query | Market status. Default: everything except removed. One of open, suspended, closed, removed, any. |
| limit | query | Rows per page, 1 to 200. Default 50. |
| offset | query | Rows to skip, for paging. |
/api/v1/games/{id}/oddsThe whole FanDuel book for one game in one call, game lines first.
| Parameter | In | Description |
|---|---|---|
| id * | path | Game id from /api/v1/events. |
| status | query | Market status. Default: everything except removed. One of open, suspended, closed, removed, any. |
/api/v1/futuresSeason-long FanDuel markets per league: champions, awards and win totals, with fair prices where outcomes exclude each other.
| Parameter | In | Description |
|---|---|---|
| league | query | League code as FanDuel lists it, such as NBA. |
| sport | query | nba, nfl, nhl, mlb, ncaab or ncaaf. |
| market_type | query | A FanDuel market type. |
| status | query | Market status. Default: everything except removed. One of open, suspended, closed, removed, any. |
| limit | query | Rows per page, 1 to 200. Default 50. |
| offset | query | Rows to skip, for paging. |
Code
curl "https://fanduelapi.com/api/v1/markets?league=NBA&market_type=spread&limit=5" \
-H "Authorization: Bearer $FANDUEL_API_KEY"import os, requests
r = requests.get(
"https://fanduelapi.com/api/v1/markets",
params={"league": "NBA", "market_type": "spread", "limit": "5"},
headers={"Authorization": f"Bearer {os.environ['FANDUEL_API_KEY']}"},
)
r.raise_for_status()
body = r.json()
print(body["meta"]) # plan, delay_seconds, as_of, source_status
for row in body["data"][:5]:
print(row)Keys look like fd_.... Keep one in the FANDUEL_API_KEY environment variable on your server, never in browser code. Every response's meta says which plan answered, how far behind it is and how fresh the collection is.
Which plans include it
- FreeIncluded, 5 minutes behind
- DeveloperIncluded, real time
- ProductionIncluded, real time
- ScaleIncluded, real time
Read from the plans on the pricing page. Every request counts against the monthly and per-minute allowance; request quotas explains how.
Works well with
- Props feedRead the whole player prop board in one call, already normalised, with where each line opened.
/api/v1/props - Line historyReplay a prop or a game line from the first time it was seen to now, move by move.
/api/v1/props/{id}/history - CoverageKnow what the feed holds before you build on it, and show users exactly how fresh it is.
/api/v1/coverage
Related
Make your first call in a few minutes
Sign up, create a key in the dashboard, and send it as a Bearer token. The free plan needs no card and reads the same data five minutes behind.
Get a free API key