Odds API for sportsbooks and trading desks
An odds API for sportsbooks and trading desks: every competitor’s price, sharp books and exchanges in real time, with line history, to price and manage risk.
Trading desks need the market, not a snapshot of it. PreciseAPI streams every change with sequence numbers, includes exchange liquidity, and keeps the line history to backtest against.
- Sequence-numbered deltas. Detect gaps and resync instantly — no silently missed price.
- Exchange liquidity. Novig, ProphetX, 4CX, Kalshi and Polymarket prices come with available size.
- Line history. Opening and current prices for every main market, for CLV and backtests.
- In-play on Syndicate. Syndicate adds live in-play odds, the WebSocket stream with 10 concurrent sockets and unlimited credits.
An odds API for sportsbooks serves a different reader from most odds products. The user isn't shopping for a price; they are setting one. Trading teams at new and regional books, sweepstakes and social operators, and market makers on exchanges all need the same input: what everyone else is offering right now, which of those prices are sharp, and how quickly they moved.
PreciseAPI is a market data feed for that job. It carries 23 sportsbooks, including sharp books such as Pinnacle, Circa and BookMaker, plus 7 exchanges, on one event and selection id. It is not an official league data feed, a trading platform or a risk system. It gives you other operators' posted prices and the game state, and your models and traders decide what to do with them.
How trading teams use an odds API for sportsbooks
- Opening and adjusting lines. Start from a sharp reference: de-vigged prices from low-margin books and exchanges, with exchange quotes weighed by the liquidity behind them.
- Out-of-line checks. Compare your price with the market every time either one changes, and flag markets where you are the best number on the board, because that is where sharp money arrives first.
- Following moves. See when the sharp books move and which books haven't followed yet.
- In-play reference. During games, other books' live prices next to the score and clock.
- Review. After the game, the open, the close and every recorded move for each book, to measure your lines against the market's.
The sportsbook odds feed, end to end
Most of what makes an odds API for trading desks useful is the stream. A pricing service opens a WebSocket on Syndicate, subscribes to the leagues, books, markets and periods it prices, and keeps a local copy of every market, keyed by market id. Score, clock and status changes arrive as event messages on the same connection.
REST fills in the rest. /v1/sportsbooks and /v1/status are free and tell you each source's type, tags, shared platform and health. /v1/history (3 credits) returns line history after the game, and /v1/scores (1 credit) returns live and final scores. Line-move rules can send signed webhooks to a separate channel for traders, independent of your pricing service. Give each service its own key: the key controls let you limit a key to the stream or to REST, restrict it to your IP ranges and cap its monthly credits.
Here is a reference price built from the stream: a no-vig moneyline from sharp books and exchanges, skipping thin exchange quotes.
import WebSocket from 'ws';
const SHARP = new Set(['pinnacle', 'circa', 'bookmaker', 'novig', 'prophetx']);
const MIN_LIQUIDITY = 250; // USD at the quoted price (exchange outcomes only)
const markets = new Map(); // market id -> { event_id, book, market }
const toProb = (a) => (a > 0 ? 100 / (a + 100) : -a / (-a + 100));
let lastSeq = 0;
const ws = new WebSocket('wss://api.preciseapi.com/v1/stream', {
headers: { Authorization: `Bearer ${process.env.PRECISEAPI_KEY}` },
});
ws.on('open', () => ws.send(JSON.stringify({
type: 'subscribe', leagues: ['nba'], markets: ['moneyline'], periods: ['full_game'],
books: [...SHARP, 'draftkings', 'fanduel', 'betmgm'],
})));
ws.on('message', (raw) => {
const msg = JSON.parse(raw);
if (msg.seq) {
const expected = msg.type === 'heartbeat' ? lastSeq : lastSeq + 1;
if (lastSeq && msg.seq !== expected) ws.send(JSON.stringify({ type: 'resync' }));
lastSeq = msg.seq;
}
if (msg.type === 'snapshot') markets.clear();
if (msg.type === 'snapshot' || msg.type === 'snapshot_part') {
for (const e of msg.data) for (const b of e.bookmakers ?? []) for (const m of b.markets) markets.set(m.id, { event_id: e.id, book: b.id, market: m });
}
if (msg.type === 'delta') {
for (const { market_id } of msg.removed) markets.delete(market_id);
for (const c of msg.changes) { markets.set(c.market.id, c); console.log(c.event_id, reference(c.event_id)); }
}
});
// Average no-vig probability per side across sharp sources with enough size.
function reference(eventId) {
const sides = {};
for (const { event_id, book, market } of markets.values()) {
if (event_id !== eventId || market.suspended || !SHARP.has(book) || market.outcomes.length < 2) continue;
if (market.outcomes.some((o) => o.liquidity !== undefined && o.liquidity < MIN_LIQUIDITY)) continue;
const p = market.outcomes.map((o) => toProb(o.price));
const sum = p.reduce((a, b) => a + b, 0);
market.outcomes.forEach((o, i) => (sides[o.side] ??= []).push(p[i] / sum));
}
return Object.fromEntries(Object.entries(sides).map(([s, v]) => [s, v.reduce((a, b) => a + b, 0) / v.length]));
}
A production service also handles reconnect messages and close codes, and runs reference on a queue rather than inside the message handler. The WebSocket odds API docs cover the protocol, and the no vig odds API page covers de-vig methods beyond this simple one.
The in-play odds feed and plan fit
In-play odds are part of Syndicate. Prices on games in progress update in under 500 ms, deltas are batched every 250 ms, and the plan includes 10 concurrent stream connections, 10 team seats, 3,000 requests a minute and unlimited credits. On Edge and Sharp, games leave odds responses when they start, and history for a game in progress is refused until it ends.
| Desk | Plan | Why |
|---|---|---|
| Live trading, in-play pricing | Syndicate, $249.99 | Stream, in-play prices, 10 connections |
| Pre-match and futures pricing only | Sharp, $199.99 | Unlimited REST at 1,200 requests a minute, no stream |
| Evaluating the feed, research | Edge, $49.99 | 100,000 credits, line history, pre-game only |
Every paid plan includes line history, player props and futures. A team evaluating an odds API for sportsbooks can start on Edge, test its reference against closing prices, and move to Syndicate when it trades live. The odds API pricing page lists the rest.
Pitfalls specific to trading
- Counting one price twice. Some books share a trading platform and post near-identical prices.
/v1/sportsbooksnames it inplatform: Kambi for BetRivers and BetParx, and one shared provider for BetOnline, SportsBetting, MyBookie, BUSR and BetNow. Count each platform once in a consensus. - Reading liquidity as depth.
liquidityis the size available at the quoted price, in USD. It says nothing about the price of the next dollar beyond it. - Measuring speed with the wrong clock.
updated_atis when PreciseAPI stored the price;source_changed_atis the source's own clock when the price was first seen. To measure which book moved first, usesource_changed_at.updated_attrails it by the collection delay, typically a few seconds and up to a minute on the slowest sources. - A slow reader. If your client falls more than 16 MB behind, the stream closes with code 4008. Keep the socket handler thin and do the pricing work elsewhere.
- Pricing off a suspended market. When a source stops reporting, its market is marked
suspended. Exclude it rather than holding the last price. - Settling from the feed. Scores and clocks come from the sources in the feed and are there for context. Settle bets against your official results provider.
Related reading
The live odds API and historical odds API pages summarize the endpoints a desk uses most. For the market side, read why Pinnacle odds matter, sharp vs square books and measuring sportsbook hold. The betting exchange odds API post covers exchange prices, and the Circa odds API, Novig API and ProphetX API pages describe three of the sharper sources, and league pages such as the NBA odds API show which sources price each league. If you are comparing more than one odds API for sportsbooks, the Sportradar API alternative page sets PreciseAPI next to an enterprise feed.
Frequently asked questions
Is PreciseAPI an official data feed?
No. It collects and normalizes the prices that sportsbooks and exchanges post, plus scores reported by those sources. It is not licensed league data, and it doesn't provide trading, risk management or settlement.
How fast is the in-play feed?
In-play prices refresh in under 500 ms and reach you over the WebSocket stream on Syndicate, batched every 250 ms with a sequence number on every message. Pre-match prices refresh in 1 to 2 seconds.
Can several services and traders share one account?
Yes. Syndicate allows 10 concurrent stream connections and 10 team seats, and an account can hold up to 10 active API keys, each with its own scope, IP allowlist and monthly credit cap.
Which sources are best as a pricing reference?
A common starting point is low-margin books such as Pinnacle, Circa and BookMaker plus exchanges such as Novig and ProphetX, weighed by liquidity. Which mix works best for your markets is something to test against closing prices with /v1/history.
Keeping a book in sync
The stream sends a snapshot of every subscribed market, then deltas that each carry a sequence number one higher than the last. A jump in the numbers means a missed message: send resync and the stream sends a fresh snapshot. Heartbeats repeat the latest number, so a quiet market is never mistaken for a dropped connection. Syndicate includes the stream, live in-play prices and 10 concurrent connections.
Exchange depth and history
Exchange prices come with the liquidity available at that price, so each quote can be weighed by the size behind it. For research, /v1/history returns the opening and current price of a main full-game market and every recorded change in between, for any book. That is the raw material for closing line value, for measuring how quickly each book follows a move, and for replaying a market against your own prices.
Example request
GET /v1/history?event_id=EVENT_ID&book=pinnacle&market=moneyline
Endpoints
- WebSocket stream: snapshots and deltas over one connection
- GET /v1/history: Line history
- GET /v1/odds: Get odds
Products
- Historical odds API: Historical odds API with timestamped line history for every market and book: opening prices, every move and the closing line, for backtests, CLV and research.
- Line movement API: Line movement API with every price change from the opening line to the close, per book, for line charts, steam alerts and closing line value tracking.
- Game odds API: Betting odds API for moneylines, spreads and totals from 36 sources, for every period, plus alternate lines and team totals in one normalized schema.
- Live odds API: Live odds API with in-play prices pushed in under 500 ms over WebSocket on Syndicate, plus live scores, the game clock and automatic suspension of stale prices.
Related reading
- Odds API Node.js Tutorial: Streaming Real-Time Odds with WebSockets: Build a reliable Node.js client for real-time odds with the ws package. Snapshots, deltas, sequence-gap detection, resync and reconnects with backoff.
More use cases
- Media & affiliates: An odds API for affiliates, media and tipsters: live odds tables, best-price widgets and deep links to each book’s bet slip, from one normalized feed.
- Models & data science: Sports betting model data: market prices, implied probabilities and line history with stable ids, to train, backtest and run betting models and research.
- Exchange trading tools: An exchange data API for trading tools: Kalshi, Polymarket and Novig prices next to sportsbook odds on one event id, with liquidity, in one format.
- Sports apps & scoreboards: An odds API for betting apps and sports apps: real-time odds, live scores and deep links to each sportsbook, in the format your users read.
Looking for a specific league or book? See the odds API directory, or compare plans.