Lines already matched
Each book names the same bet its own way. Here DraftKings' "Over 249.5 passing yards" and Kalshi's "250+ yards" arrive as one line with one id, each book's price beside the others.
BestBook API
Prices from 22 sportsbooks and 5 exchanges, matched line by line and pushed to you as they move. It is the same data that runs BestBook.
// one book moved one price on one line { "type": "update", "seq": 48213, "prices": [{ "line": "nfl:2026-11-29-ATL-MIN/total/full/-/44.5", "book": "dk", "side": "yes", "american": -112, "decimal": 1.8929, "prob": 0.5283, "since": 1795899350412 }] }
Each book names the same bet its own way. Here DraftKings' "Over 249.5 passing yards" and Kalshi's "250+ yards" arrive as one line with one id, each book's price beside the others.
Open one WebSocket, subscribe to a league or a game, and get a snapshot followed by every change: a book's new price, a line added, a line taken down. About twice a second while prices move.
Kalshi, Polymarket, Novig and ProphetX come as the price you can actually take, with the size available at it and the fee, next to the sportsbooks.
Moneyline, spread, total and team totals by period, plus the player markets people bet: yards, receptions, touchdowns, points, rebounds, assists, shots, saves and more.
22 sportsbooks and 5 exchanges today, each with the id it has in the feed. New ones appear as BestBook adds them; you do nothing.
dkdkpfdmgmpinhrbrsballyparxubrebetstakeb105bovfantsbbwyonyxbolfliffpbs888kalshipolymarketnovignovigppxSubscribe with your BestBook account, then press Create key, right here on this page. The key is shown once; BestBook keeps only a hash of it. Replacing it stops the old one.
Send the key as a bearer token (an X-API-Key header works too). Browsers can call it directly; keep your key out of any page other people can load.
curl -H "Authorization: Bearer $BESTBOOK_KEY" \ "https://api.bestbook.app/v1/events?league=nfl"
A browser cannot set headers on a WebSocket, so the key can also go in the address.
const ws = new WebSocket("wss://api.bestbook.app/v1/stream?key=" + KEY);
const lines = new Map();
ws.onopen = () => ws.send(JSON.stringify({ op: "subscribe", id: "nfl", league: "nfl" }));
ws.onmessage = e => {
const m = JSON.parse(e.data);
if (m.type === "resync") lines.clear(); // rare: everything is sent again
for (const id of m.removed ?? []) lines.delete(id);
for (const l of m.lines ?? []) lines.set(l.id, l);
for (const p of m.prices ?? []) {
const l = lines.get(p.line);
if (!l) continue;
l.prices = l.prices.filter(x => x.book !== p.book || x.side !== p.side).concat(p);
}
for (const p of m.removed_prices ?? []) {
const l = lines.get(p.line);
if (l) l.prices = l.prices.filter(x => x.book !== p.book || x.side !== p.side);
}
};That is a complete client: lines always holds every NFL line with each book's current price.
Base address https://api.bestbook.app. Every answer is JSON, and an error is {"error": "…"}. Use REST to load what exists; use the socket to stay current.
| Request | Answers |
|---|---|
GET /v1/books | Every sportsbook and exchange: id, name, kind. |
GET /v1/leagues | The leagues with games on the board and how many. |
GET /v1/market-types | Every market type: id, name, the leagues it applies to. |
GET /v1/events?league=nfl | Games with prices: id, league, date, start (the start time, ISO 8601 in UTC; null until it is known, and it can move when the schedule does), away, home, how many lines. Leave league out for all of them. date is the game's day in the United States, so it can differ from the UTC date of start. |
GET /v1/events/{id}/lines | One game's lines, each with its prices. Narrow with ?types=spread,total and ?books=dk,fd (comma-separated, ids exactly as listed): with books, only lines those books price come back, with only their prices. |
A line is one bet that can settle one way: a market type, a period, a team or player, and a number. Its prices hold one entry per book and side.
{
"seq": 48213,
"live": true,
"event": { "id": "nfl:2026-11-29-ATL-MIN", "league": "nfl", "date": "2026-11-29", "start": "2026-11-29T18:00:00Z",
"away": { "id": "ATL", "name": "Atlanta Falcons" },
"home": { "id": "MIN", "name": "Minnesota Vikings" } },
"lines": [{
"id": "nfl:2026-11-29-ATL-MIN/player_pass_yds/full/jj mccarthy/224.5",
"event": "nfl:2026-11-29-ATL-MIN",
"type": "player_pass_yds",
"period": "full",
"team": null,
"player": { "id": "jj mccarthy", "name": "J.J. McCarthy", "team": "MIN" },
"line": 224.5,
"outcomes": [{ "side": "yes", "name": "Over 224.5" }, { "side": "no", "name": "Under 224.5" }],
"prices": [
{ "line": "…/224.5", "book": "dk", "side": "yes", "american": -114, "decimal": 1.8772, "prob": 0.5327,
"fee": null, "size": null, "book_ts": null, "since": 1795898112004 },
{ "line": "…/224.5", "book": "dk", "side": "no", "american": -110, "decimal": 1.9091, "prob": 0.5238,
"fee": null, "size": null, "book_ts": null, "since": 1795898112004 },
{ "line": "…/224.5", "book": "kalshi", "side": "yes", "american": -108, "decimal": 1.9231, "prob": 0.52,
"fee": 0.0175, "size": 412, "book_ts": 1795899349120, "since": 1795899349120 }
]
}]
}| Field | Meaning |
|---|---|
type | The market type, from /v1/market-types. New types can appear at any time. |
period | full (the game), halves 1h 2h, quarters 1q–4q, hockey periods 1p–3p, reg (hockey's 60 minutes) and rt (basketball's regulation, no overtime), t3 (after 3 quarters), drives d1–d12, eh / eq (each half / each quarter), and opening minutes m1 m3 m4. Others can appear. |
team, player | Who the line is about, when it is about someone. A spread's team is the side its line belongs to. A player has one id across books; team is null when no book says which side he plays for. |
line | The number: 224.5 yards, a total of 44.5, a spread of -3.5. null for markets without one, such as a moneyline. A spread is listed once, under the team laying the points: the other team at +3.5 is that line's no side. |
outcomes | What yes and no mean on this line, in words. A game has one moneyline: yes is the away team to win, no the home team; a tie is settled by each book's own rules. |
american, decimal, prob | The same price three ways. prob is the price as a probability, before any fee. |
prices | One entry per book and side. A book that prices only one side has only that entry. |
fee, size | Exchanges only: the fee per $1 of payout at this price (null where the exchange charges none), and how many contracts are available at it, each paying $1. |
since, book_ts | When this price was first seen, and the exchange's own timestamp. Milliseconds, UTC. On an exchange since is approximate and does not move with every price change: use book_ts to judge how fresh an exchange price is. |
seq, live | The board's change count, and whether the feed is current. While live is false the last known prices are served. seq only orders what you receive: it skips numbers, and it starts over if the API restarts. |
Read the fields, not the ids: an id is stable, but its layout is not a promise. New fields, books and market types arrive without notice; anything removed or changed in meaning will be a new version at /v2.
wss://api.bestbook.app/v1/stream. Send JSON, get JSON. Ask for permessage-deflate and messages come compressed, roughly six times smaller.
{ "op": "subscribe", "id": "a", "league": "nba" }
{ "op": "subscribe", "id": "b", "event": "nfl:2026-11-29-ATL-MIN", "types": ["spread", "total"], "books": ["dk", "fd"] }
{ "op": "unsubscribe", "id": "a" }
{ "op": "ping" }A subscription takes a league or an event (not both), or neither for the whole board. types and books are lists that narrow it; leave them out for everything. With books you get only the lines those books price. id is yours to choose (up to 64 characters), and subscribing again with the same one replaces it. Anything misspelled or of the wrong shape, an unknown field included, is refused with an error, never guessed at. Messages are text, up to 64 kB each. You never have to send anything to keep a socket open; ping is there when you want an answer.
| Message | Meaning |
|---|---|
snapshot | The answer to a subscribe (sub is its id): every line it covers, each with its prices. A large one arrives as several snapshot messages; the last has done: true. |
update | What changed. Apply its parts in this order: removed (line ids to drop), lines (whole lines; replace yours), prices (one book's side on a line), removed_prices (a book's side that is gone). |
heartbeat | Every 15 seconds of silence, with seq, live and the time ts, so you can tell a quiet market from a dead connection. One is sent at once if the feed stops being current (live: false): treat the prices you hold as stale until a resync. |
resync | Rare. Drop everything you hold; a fresh snapshot for each subscription follows. |
error | A request that was refused, with a message saying why. |
unsubscribed, pong | The answers to unsubscribe and ping. After unsubscribing, drop the lines that subscription gave you; nothing more is sent for them. |
Nothing is skipped on a connection, so there are no gaps to detect. If the connection drops, connect and subscribe again. A client that reads too slowly is not sent a backlog: it gets the latest state of everything it missed in one update. If the API closes a socket, the close code and reason say why.
Size it before you subscribe to everything. On a busy afternoon the whole board is a snapshot of about 25 MB compressed, then around 450 kB a second; the NFL alone is about 9 MB, then 225 kB a second. Subscribing by game, or narrowing with types and books, cuts that down. Updates can arrive while a large snapshot is still coming; the client above handles that as it is.
46 today. Spreads, totals, team totals and player markets come for the full game and for periods; moneylines are for the full game.
| Type | Market | Leagues |
|---|---|---|
moneyline | Moneyline | NFL, CFB, NBA, CBB, NHL |
spread | Spread | NFL, CFB, NBA, CBB, NHL |
total | Total | NFL, CFB, NBA, CBB, NHL |
team_total | Team total | NFL, CFB, NBA, CBB, NHL |
player_pass_yds | Passing yards | NFL, CFB |
player_pass_tds | Passing touchdowns | NFL, CFB |
player_pass_completions | Passing completions | NFL, CFB |
player_pass_attempts | Passing attempts | NFL, CFB |
player_interceptions_thrown | Interceptions thrown | NFL, CFB |
player_longest_completion | Longest completion | NFL, CFB |
player_rush_yds | Rushing yards | NFL, CFB |
player_rush_attempts | Rushing attempts | NFL, CFB |
player_longest_rush | Longest rush | NFL, CFB |
player_rec_yds | Receiving yards | NFL, CFB |
player_receptions | Receptions | NFL, CFB |
player_longest_reception | Longest reception | NFL, CFB |
player_rush_rec_yds | Rushing + receiving yards | NFL, CFB |
player_pass_rush_yds | Passing + rushing yards | NFL, CFB |
player_tds | Touchdowns | NFL, CFB |
player_first_td | First touchdown scorer | NFL, CFB |
player_kicking_points | Kicking points | NFL, CFB |
player_extra_points | Extra points made | NFL, CFB |
player_field_goals | Field goals made | NFL, CFB, NBA, CBB |
player_sacks | Sacks | NFL, CFB |
player_tackles_assists | Tackles + assists | NFL, CFB |
player_def_interceptions | Interceptions | NFL, CFB |
player_points | Points | NBA, CBB, NHL |
player_rebounds | Rebounds | NBA, CBB |
player_assists | Assists | NBA, CBB, NHL |
player_threes | Threes made | NBA, CBB |
player_points_rebounds_assists | Points + rebounds + assists | NBA, CBB |
player_points_rebounds | Points + rebounds | NBA, CBB |
player_points_assists | Points + assists | NBA, CBB |
player_rebounds_assists | Rebounds + assists | NBA, CBB |
player_steals | Steals | NBA, CBB |
player_blocks | Blocks | NBA, CBB |
player_steals_blocks | Steals + blocks | NBA, CBB |
player_turnovers | Turnovers | NBA, CBB |
player_double_double | Double-double | NBA, CBB |
player_triple_double | Triple-double | NBA, CBB |
player_goals | Goals | NHL |
player_first_goal | First goalscorer | NHL |
player_shots_on_goal | Shots on goal | NHL |
player_saves | Saves | NHL |
player_power_play_points | Power play points | NHL |
player_blocked_shots | Blocked shots | NHL |
| Limit | |
|---|---|
| WebSockets open at once | 3 |
| Subscriptions per socket | 50 |
| REST requests | 300 in a burst, refilling at 5 a second |
| Status | Meaning |
|---|---|
401 | No key, or one that is not recognised or no longer active. The error says which. |
404 | No such game or address. |
400 | A parameter that is not understood: an unknown name, or an unknown league, type or book. |
405 | Anything but GET. |
429 | Over a limit. For requests, Retry-After says how many seconds to wait; for sockets, close one first. |
503 | The API is starting. Try again in a few seconds. |
$22a month
Billed each month from the day you subscribe. Cancel whenever you like, here under Billing and invoices; the key works until the end of the month you paid for. A month already paid for is not refunded.
Get an API keyBy subscribing you agree to the Terms of Service and the Privacy Policy.