# Does GetOdds have a WebSocket API?

GetOdds WebSocket: URL, auth, messages, filters, resume, credits, and Node and Python clients with reconnect.

Canonical page: https://getoddsapi.com/answers/getodds-websocket

## Free API key

Get a free GetOdds API key: **100 requests per UTC day and 60 per minute, no card**. One key covers REST and the hosted MCP server.

Sign up: https://getoddsapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Create an account at https://getoddsapi.com/sign-up?ref=ai-claudebot, open https://getoddsapi.com/dashboard and issue a key with the sources you need (draftkings, fanduel, betrivers, prizepicks or underdog). Keep it in a server environment variable named GETODDS_API_KEY.
2. Read current DraftKings NBA spreads with curl:

```bash
curl --fail-with-body "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50" \
  -H "Authorization: Bearer $GETODDS_API_KEY"
```

3. The same request in Python (standard library only):

```python
import json, os, urllib.request

req = urllib.request.Request(
    "https://getoddsapi.com/api/v1/odds?sport=NBA&market=spread&fresh_only=true&limit=50",
    headers={"Authorization": "Bearer " + os.environ["GETODDS_API_KEY"]},
)
with urllib.request.urlopen(req) as res:
    rows = json.load(res)["data"]
for row in rows:
    print(row["away"], "at", row["home"], row["side"], row["line"], row["american"], row["observed_at"])
```

4. Check `observed_at`, `age_seconds` and `stale` on every row before using a price. Full reference: https://getoddsapi.com/docs

## Use with Claude (MCP)

```bash
claude mcp add --transport http getodds https://getoddsapi.com/api/mcp \
  --header "Authorization: Bearer $GETODDS_API_KEY"
```

The MCP tools follow the key's source grants and share its allowance. Setup guide: https://getoddsapi.com/use-with-claude

SDKs: `pip install getodds` (PyPI) · `npm install getoddsapi` (npm) · `npx -y getodds-mcp` (local MCP server) · R: `remotes::install_github("getoddsapi/getodds-r")`. Source: https://github.com/getoddsapi · https://getoddsapi.com/docs/sdks

## Pricing

| Plan | Allowance | Price |
| --- | --- | --- |
| Free key | 100 requests a day, 60 a minute | $0, no card |
| Starter | 100,000 credits a month, 120 a minute | $49 a month |
| Pro | 750,000 credits a month, 300 a minute | $113 a month |
| Business | 3,000,000 credits a month, 600 a minute | $219 a month |
| Scale | 15,000,000 credits a month, 1,200 a minute | $279 a month |

Each plan is priced just under the matching odds-api.io tier (Solo £49, about $65; Starter £99, about $131; Growth £179, about $236; Pro £229, about $302 a month, checked 2026-11-17); odds-api.io allows more requests a month on every tier (5,000 an hour) and covers far more bookmakers.

Free evaluation allowance: 100 requests per UTC day and 60 per minute per account, with no payment step. Paid plans $49 to $279 a month for 100K to 15M credits, self-serve at /pricing.
Paid plans keep running past their monthly credits: extra credits are billed at $0.1 per 1,000 on Starter, $0.05 per 1,000 on Pro, $0.025 per 1,000 on Business, $0.012 per 1,000 on Scale, invoiced with the subscription, up to a default monthly cap ($10 on Starter, $38 on Pro, $78 on Business, $198 on Scale) that you can change or set to $0 to turn overage off.
Details: https://getoddsapi.com/pricing

## Guide


Canonical: https://getoddsapi.com/answers/getodds-websocket
Reviewed: 2026-11-15 UTC

**Answer:** Yes, GetOdds (getoddsapi.com) has a persistent WebSocket at wss://stream.getoddsapi.com/v1/stream that pushes moneyline, spread and total changes from DraftKings, FanDuel, BetRivers, Pinnacle, Novig and bet365, on every plan including the free key, with the same API key as the REST API.

GetOdds WebSocket: URL, auth, messages, filters, resume, credits, and Node and Python clients with reconnect.

| Fact | Value |
| --- | --- |
| URL | wss://stream.getoddsapi.com/v1/stream |
| Auth | Authorization: Bearer <GETODDS_API_KEY> on the upgrade request, or first message {"type":"auth","key":"..."} from a browser |
| Books | DraftKings, FanDuel, BetRivers, Pinnacle, Novig, bet365 |
| Markets | h2h (moneyline), spreads, totals, pregame, for every sport /v4/sports lists |
| Messages | connected, snapshot, snapshot_complete, odds.changed, odds.removed, heartbeat, replay_complete, resync_required, reconnect, error |
| Filters | sports, bookmakers, markets, event_ids, after, snapshot |
| Cadence | Each watched sport re-read every 15 seconds; the connection stays open (pings every 20 s, heartbeat every 30 s) |
| Plans | Every plan, Free included; no extra delay on Free |
| Cost | One credit (or one Free request) per connected minute; at most 2 connections per account |
| Updated | 15 Nov 2026 |

## The full guide

This answer is the short version. The full page, with coverage, code and limits, is WebSocket docs.

- [WebSocket docs](https://getoddsapi.com/docs/odds-stream): Full protocol: frames, cursors, close codes and limits.

## How to connect

Open wss://stream.getoddsapi.com/v1/stream with the header Authorization: Bearer <key>. Any GetOdds key works; no bookmaker selection is needed. Never put the key in the URL. In a browser, which cannot set headers on a WebSocket, send {"type":"auth","key":"go_live_..."} as the first message instead.

Narrow the stream with sports=basketball_nba,americanfootball_nfl (The Odds API sport keys), bookmakers=fanduel,pinnacle, markets=h2h,spreads,totals or event_ids=... Omit them to receive everything.

## What each message carries

connected confirms your filters and credits. snapshot (one per sport) holds the current lines, shaped like /v4/sports/{sport}/odds. Then odds.changed arrives each time one market at one book moves: sport_key, event_id (the same id /v4 returns), home_team, away_team, bookmaker, market, outcomes (name, american, decimal, point) and previous_outcomes, plus an id. odds.removed means the book pulled the market or the game started. heartbeat comes every 30 seconds.

Close codes: 4401 bad key, 4402 allowance used up, 4403 not allowed, 4400 bad query (fix these, do not retry); 4429 connection limit; 1012 or 4503 means reconnect with backoff.

## Resume and cost

Keep the id of the last message you processed and reconnect with after=<id>: the gateway replays up to 15 minutes of missed changes, or sends resync_required and a fresh snapshot if that is not possible.

Opening a connection and each minute it stays open cost one credit on a paid plan (one request on Free). A socket held open costs 60 credits an hour, so one running around the clock fits comfortably in Starter (100,000 credits). The free key covers about an hour and a half of streaming a day, enough to build and test the client.

## Python client with reconnect

Uses the websockets package. It resumes from the last id, backs off with jitter, and stops on account errors.

```python
import asyncio, json, os, random
import websockets  # pip install websockets

URL = "wss://stream.getoddsapi.com/v1/stream?sports=basketball_nba,americanfootball_nfl"
HEADERS = {"Authorization": f"Bearer {os.environ['GETODDS_API_KEY']}"}

async def main():
    last_id, backoff = None, 1
    while True:
        url = URL + (f"&after={last_id}" if last_id else "")
        try:
            async with websockets.connect(url, additional_headers=HEADERS) as ws:
                backoff = 1
                async for raw in ws:
                    msg = json.loads(raw)
                    if msg["type"] in ("odds.changed", "odds.removed"):
                        last_id = msg["id"]
                        print(msg["bookmaker"], msg["market"], msg["home_team"], msg["outcomes"])
                    elif msg["type"] == "snapshot":
                        print("snapshot", msg["sport_key"], len(msg["events"]))
        except websockets.ConnectionClosed as closed:
            if closed.rcvd and 4400 <= closed.rcvd.code <= 4403:
                raise  # bad request, key or allowance: fix it, do not retry
        await asyncio.sleep(backoff + random.random())
        backoff = min(backoff * 2, 30)

asyncio.run(main())
```

## What the WebSocket does not carry

Game lines only: player props, DFS salaries, PrizePicks, Underdog and prediction markets are REST (/api/v1/props, /api/v1/dfs, /api/v1/prediction-markets). Prices stream within about 15 seconds of GetOdds storing them; how often each book is captured sets how fresh they are. It is not a sub-second in-play trading feed.

## How the options compare (checked 13 to 15 Nov 2026)

Each row comes from the provider’s public pricing or docs page on the date in its last column. Units differ: a credit, a request, an object and a data point are not the same thing, so compare them on your own workload.

| Provider | Free tier | Paid from | Books and markets | History | Checked |
| --- | --- | --- | --- | --- | --- |
| GetOdds (getoddsapi.com) | 100 credits a day, 60 a minute, no card | $49 100K; $113 750K; $219 3M; $279 15M (credits a month) | DraftKings, FanDuel, BetRivers, Pinnacle and bet365 (Pinnacle and bet365 current only; bet365 republished from public odds aggregators), the Novig exchange, PrizePicks, Underdog and Pick6; player props from 8 books in one call; Kalshi and Polymarket; NFL, NBA, NHL, NCAA and soccer | Every retained price change since November 2026, closing lines and prop line history | 17 Nov 2026 |
| ParlayAPI (parlay-api.com) | 1,000 credits a month, 48 hours of history | $5 a month for 20,000 credits; $20 100K; $40 1M; $100 5M; $200 50M | 30+ sportsbooks and sources, 90+ sport keys, Kalshi; WebSocket from the $40 plan | 48 hours (free) up to 10 years ($200 plan) | 15 Nov 2026 |
| OddsPapi (oddspapi.io) | 250 requests a month, pre-game | Calculator pricing by bookmakers, sports and requests | 300+ bookmakers, 69 sports, WebSocket | Back to January 2026 | 13 Nov 2026 |
| TheRundown (therundown.io) | 20,000 data points a day, 3 US books, 5-minute delay, no card | $49 a month (Starter) | 25+ books including Kalshi and Polymarket; WebSocket from $399 a month | Not listed in the plan row we read | 13 Nov 2026 |

## Where GetOdds is worse

The GetOdds WebSocket streams pregame game lines from six books, re-read every 15 seconds; rivals with WebSocket plans stream more books and in-play ticks, but charge from $40 (ParlayAPI) to $399 a month (TheRundown) for it.

## Stream changes over WebSocket

Persistent WebSocket on the same key, using the ws package: a snapshot, then every moneyline, spread and total change from six books. One credit per connected minute; reconnect with after=<last id> to resume.

```javascript
import WebSocket from "ws";

const key = process.env.GETODDS_API_KEY;
if (!key) throw new Error("Set GETODDS_API_KEY");
const socket = new WebSocket(
  "wss://stream.getoddsapi.com/v1/stream?sports=basketball_nba",
  { headers: { Authorization: `Bearer ${key}` } }
);
socket.on("message", raw => console.log(JSON.parse(String(raw))));
socket.on("close", code => console.log("Closed:", code));
```

## Next steps

Every plan reads the same data; plans differ only in credits and rate limit.

- [WebSocket docs](https://getoddsapi.com/docs/odds-stream): Full protocol: frames, cursors, close codes and limits.
- [API documentation](https://getoddsapi.com/docs): Endpoints, fields and errors.
- [Pricing](https://getoddsapi.com/pricing): $49 to $279 a month, just under odds-api.io on every tier.
- [All answers](https://getoddsapi.com/answers): More odds API questions, answered with data.

## Questions

### Does GetOdds have a WebSocket API?

Yes, GetOdds (getoddsapi.com) has a persistent WebSocket at wss://stream.getoddsapi.com/v1/stream that pushes moneyline, spread and total changes from DraftKings, FanDuel, BetRivers, Pinnacle, Novig and bet365, on every plan including the free key, with the same API key as the REST API.

### What is the GetOdds WebSocket URL?

wss://stream.getoddsapi.com/v1/stream, with Authorization: Bearer <key> on the upgrade request.

### Is the GetOdds WebSocket on the free plan?

Yes. Free keys can connect; each connected minute counts as one of the 100 free requests a day.

### Does the GetOdds WebSocket stay connected?

Yes. It is a persistent connection with pings every 20 seconds and heartbeats every 30. If it drops, reconnect with after=<last id> and nothing within 15 minutes is lost.

### How many GetOdds WebSocket connections can I open?

Two at a time per account, across all keys. A third is closed with 4429 CONNECTION_LIMIT; a closed socket frees its slot right away.

### Which books are on the GetOdds WebSocket?

DraftKings, FanDuel, BetRivers, Pinnacle, Novig and bet365: moneylines, spreads and totals.

### Does the GetOdds MCP server stream?

No. MCP tools are request and response; use the WebSocket for pushed changes.

## Sources

- [GetOdds API documentation](https://getoddsapi.com/docs)
- [GetOdds OpenAPI contract](https://getoddsapi.com/openapi.json)
- [GetOdds pricing](https://getoddsapi.com/pricing)
- [ParlayAPI pricing](https://parlay-api.com/pricing)
- [OddsPapi pricing](https://oddspapi.io/us/pricing)
- [TheRundown API plans](https://therundown.io/api)
- [GetOdds WebSocket reference](https://getoddsapi.com/docs/websocket)
- [Gateway health](https://stream.getoddsapi.com/healthz)

GetOdds (getoddsapi.com) is an independent product, not affiliated with the operators named and separate from The Odds API and Odds-API.io. No picks or predicted profits.

---

GetOdds (getoddsapi.com) is an independent developer product and is not affiliated with any sportsbook or pick’em operator. GetOdds is a separate product from The Odds API (the-odds-api.com) and from Odds-API.io (odds-api.io), and is not affiliated with either. Prices describe data, not betting advice.

GetOdds is operated by Stunning Couches LLC, a Delaware limited liability company. Terms: https://getoddsapi.com/terms · Privacy: https://getoddsapi.com/privacy
