To build a US line-shopping or +EV feed on DraftKings and FanDuel, you need the same events and markets from both books, a stable way to join them, and a transport that matches how often prices actually move. A REST poll is enough for pre-match boards. Live alerts need a push stream. One practical stack is PricedOdds: pick draftkings and fanduel on the Solo plan, read GET /v1/best for the better price, and subscribe to wss://api.pricedodds.com/v1/stream for the market types flagged as real-time.
This guide walks through that design with documented endpoints and a short, copy-pasteable example. It is not betting advice, and it does not invent latencies or book counts. Coverage figures are from PricedOdds' GET /v1/coverage snapshot at 17:22 UTC on 28 November 2026. Latency figures are from the measurement PricedOdds published for 23 November 2026.
The problem you are actually solving
A “DraftKings and FanDuel odds API” is usually three jobs:
- Discover the slate. List upcoming and live events for a league (NBA, NFL, NCAAB, and so on).
- Shop the line. For each selection, compare the DraftKings price with the FanDuel price, in the same market and period, and keep the better one.
- Stay current. Pre-match, a poll every few minutes may be fine. In-play, a 40–60 second poll can miss a move you cared about.
You can assemble that yourself from any API that returns both books as raw prices. You then have to normalize team names, market keys, player IDs and timestamps, and compute a fair price if you want +EV rather than “FanDuel is 5 cents better.” Some feeds already do the join for you.
What the main US odds APIs give you
The Odds API is a credit-based REST API. You request a sport, a region (us) and a market (h2h, spreads, totals, plus props for selected sources). DraftKings and FanDuel are named on its homepage. Featured in-play markets update every 40 seconds; featured pre-match markets every 60 seconds; player props and period markets every 60 seconds. There is a free 500-credit plan and paid plans from $30/month (20,000 credits), as listed in late November 2026. We did not find a WebSocket on its public v4 docs. Historical snapshots are a real strength on paid plans.
SportsGameOdds includes live odds, player props and fair odds on its published REST plans, and meters by event objects rather than market × book. Its WebSocket is documented as beta, and only for All-Star and custom subscribers. If you are on Rookie or Pro, plan for REST.
PricedOdds lets you select exactly the books you need. Solo is any 2 of 15 sources for $39/month REST, or $98/month with the WebSocket add-on (1 request/second, 1 socket). That is enough to run DraftKings and FanDuel alone. Every plan includes props, live odds, a best line and a no-vig fair price. Keys look like po_live_... and belong on the server, in the Authorization: Bearer header (or X-Api-Key). Keys in the URL are rejected.
At 17:22 UTC on 28 November 2026, the coverage snapshot showed both books with pre-match and live data: DraftKings, 1,145 events across 243 leagues and 32 player prop types; FanDuel, 833 events across 141 leagues and 26 player prop types. Those numbers are a point in time. They will change with the schedule.
REST first: find games, then shop the line
PricedOdds responses are shaped as { data, asOf, next }. A few catalog endpoints work without a key: /v1/sports, /v1/leagues, /v1/books, /v1/markets, /v1/coverage and /v1/status. Everything else needs the key.
A sensible REST path for a line shopper:
-
GET /v1/events?league=nba— discover events. Readable league ids (nba,nfl) and opaque, stable event ids (evt_...). -
GET /v1/events/{id}/odds— every book you are allowed to see, for that event. Filter withmarkets=moneylineormarkets=spread@1h. -
GET /v1/events/{id}/props— player props, with aplayerobject (plr_...) on the market. -
GET /v1/best?league=nba&market=moneyline— the shop already done: each selection carriesbest.bookandbest.american(and decimal). -
GET /v1/fairandGET /v1/ev, or addinclude=ev— no-vig fair price and expected value. Official formula: EV = decimal × fair.prob − 1. -
GET /v1/changes— poll only what changed, when you do not have the socket.
If you only bought DraftKings and FanDuel, asking for a third book returns book_not_in_plan. You can change the selection once every 24 hours with POST /v1/account/books.
// best-lines.mjs — Node 18+ (built-in fetch)
// PRICEDODDS_API_KEY=po_live_... node best-lines.mjs
const KEY = process.env.PRICEDODDS_API_KEY;
const headers = { Authorization: `Bearer ${KEY}` };
const res = await fetch(
"https://api.pricedodds.com/v1/best?league=nba&market=moneyline",
{ headers }
);
if (!res.ok) {
throw new Error(`HTTP ${res.status}: ${await res.text()}`);
}
const { data, asOf } = await res.json();
for (const market of data) {
for (const sel of market.selections) {
const ev = sel.best?.decimal != null && sel.fair?.prob != null
? sel.best.decimal * sel.fair.prob - 1
: null;
console.log(
asOf,
market.matchup,
sel.side,
sel.best.book,
sel.best.american,
ev != null ? (ev * 100).toFixed(2) + "%" : "n/a"
);
}
}
Keep the key server-side. If you need EV already computed on each price, request include=ev instead of doing the arithmetic yourself, and prefer GET /v1/ev when you only want the positive rows.
The same idea in curl, from the official quickstart:
curl -s "https://api.pricedodds.com/v1/events?league=nba" \
-H "Authorization: Bearer $PRICEDODDS_API_KEY"
When REST is enough, and when it is not
Use REST (and /v1/changes if you are polling) when you are filling a pre-match dashboard, a research notebook, or a job that can be a minute late. PricedOdds documents REST refresh cadences for market types that are not real-time: 1 minute for live events, 15 minutes for events starting within 6 hours, 60 minutes within 36 hours, and 120 minutes out to 7 days. Once those markets are priced, they are also available on the WebSocket. Do not assume every prop is pushed as a delta; read the realtime flag on /v1/coverage.
Use the WebSocket when you are sending live alerts, tracking line movement, or screening +EV during a game. In PricedOdds' 23 November 2026 test (about 20 minutes, external client, All-Access, all 16 books), live prices reached that client in 0.49 seconds at the median from the upstream sourceChangedAt timestamp, and 2.4 seconds at p95. Across pre-match and live the median was 0.75 seconds. Processing inside PricedOdds was 0.43 milliseconds at the median. Those numbers include upstream delay, came from one network path, and the vendor says they will be refreshed after a 72-hour run. In the same window, DraftKings live median source-to-client time was 463 ms (1,935 samples) and FanDuel live median was 462 ms (3,706 samples). Circa had no live samples in that particular window, which is a reminder to treat any single test as a snapshot.
For comparison, if you stay on The Odds API you should design around its published 40-second in-play interval for featured markets, not around a push guarantee it does not document.
One WebSocket: snapshot, then only what changed
The stream is wss://api.pricedodds.com/v1/stream. Authenticate first, wait for ready, then subscribe. You get a snapshot, then price frames that contain only the prices that changed. After a disconnect, resume with since_seq. The ready frame in the docs includes heartbeat_seconds: 20.
// stream.mjs — Node 22+ (built-in WebSocket)
// PRICEDODDS_API_KEY=po_live_... node stream.mjs
const ws = new WebSocket("wss://api.pricedodds.com/v1/stream");
const subscribe = {
type: "subscribe",
leagues: ["nba", "nfl"],
books: ["draftkings", "fanduel"],
markets: ["moneyline", "spread", "player_points"],
include: ["best", "fair"],
};
ws.addEventListener("open", () => {
ws.send(JSON.stringify({ type: "auth", key: process.env.PRICEDODDS_API_KEY }));
});
ws.addEventListener("message", (event) => {
const frame = JSON.parse(event.data);
if (frame.type === "ready") {
ws.send(JSON.stringify(subscribe));
return;
}
if (frame.type === "snapshot" || frame.type === "price") {
apply(frame); // your state: upsert by selection id (sel_...)
}
});
ws.addEventListener("close", (event) => {
console.error("closed", event.code);
// reconnect, then subscribe with since_seq from the last frame
});
function apply(frame) {
const rows = frame.type === "price" ? frame.data : frame.data;
console.log(frame.type, frame.seq, frame.ts, JSON.stringify(rows).slice(0, 200));
}
Book, league and market ids are readable (draftkings, nba, player_points). Events, markets, selections and players are opaque and stable (evt_, mkt_, sel_, plr_). Store those ids; they are what you join on, not display names. Each price can carry decimal, american, implied, updatedAt (last confirmation), changedAt (last change) and, when the source sends one, sourceChangedAt (upstream market time, ISO-8601, ending in Z). changedAt and updatedAt are PricedOdds ingest times.
Exchanges and prediction markets also carry lay prices and liquidity when the venue publishes them. You will not see those fields on DraftKings or FanDuel.
A minimal architecture for a +EV line shop
-
One writer process holds the WebSocket (or a
/v1/changespoll if you skipped the add-on) and upserts selections bysel_id. -
REST on boot (
/v1/events,/v1/best) fills the first screen so you are not waiting on the snapshot. -
Filter in your process. A positive EV is
decimal × fair.prob − 1. Require more than one source behind the fair price before you trust a number; the fair object includesmethodandsourcesfor that reason. -
Watch rate limits. Solo is 1 request/second. Responses include
RateLimit-*headers. Errors are written to tell you the fix (book_not_in_plan,book_change_too_soon). - Do not bet from the API. PricedOdds is a data service, not a sportsbook. Its own terms say the data is informational and must not be used to price or accept wagers. Use it to compare prices at books where you are allowed to bet.
If you later want Circa, an exchange, Kalshi, or Pinnacle as a sharp reference, you change the book selection or move up a plan. You do not rewrite the join logic. Pinnacle is not a pickable book: it is included in All-Access ($349/month) or a $99/month add-on, and in the 28 November coverage snapshot it had no player props.
FAQ
Can I get only DraftKings and FanDuel?
Yes, on PricedOdds Solo (any 2 of 15 books). The Odds API will usually return the whole US region in one request, which is convenient but costs credits per market. SportsGameOdds also returns many books per event and charges by event objects.
Is the WebSocket required?
No. For pre-match research, REST plus /v1/changes is enough, and Solo REST is $39/month. For live betting alerts and line-movement tools, PricedOdds' own docs say you want the socket. All-Access includes it; on Solo it is a $59 add-on.
How do I know a market is real-time?
Read GET /v1/coverage (no key required). Market types with realtime: true are pushed as they change. Others are refreshed on the REST cadence above. In the 28 November 2026 snapshot, 64 real-time market types had data, out of 69 in the catalog.
Can an AI coding agent wire this up?
PricedOdds publishes /llms.txt, OpenAPI 3.1, an AGENTS.md, and a hosted MCP server at https://api.pricedodds.com/mcp with 14 tools, including coverage, price comparison and positive-EV helpers. That does not replace reading the docs for rate limits and book selection.
Where should I put the API key?
In an environment variable on a server, sent as Authorization: Bearer. Never in a query string, a frontend bundle, or a public repo.
Editorial note: Tools for Bettors publishes independent reviews and guides on betting tools and odds data.
Top comments (0)