# Odds alert Discord bot with a free odds API

Build an odds alert Discord bot in Python: poll the GetOdds dropping-odds feed and post line moves to a Discord webhook. Free key, standard library only.

Canonical page: https://getoddsapi.com/uses/odds-alert-discord-bot

## 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), and every GetOdds plan reads every source.

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/uses/odds-alert-discord-bot
Reviewed: 2026-11-22 UTC

**Answer:** An odds alert Discord bot polls an odds API, compares each price with the last one it saw, and posts to a Discord webhook when a line moves past your threshold.

Build an odds alert Discord bot in Python: poll the GetOdds dropping-odds feed and post line moves to a Discord webhook. Free key, standard library only.

| Fact | Value |
| --- | --- |
| Language | Python 3, standard library |
| Feed | /api/v1/dropping-odds |
| Poll | Every 15 minutes = 96 requests a day |
| Delivery | Discord webhook |

## The whole bot

Create a webhook in Discord (channel settings, Integrations, Webhooks) and a free GetOdds key with the draftkings source. Set DISCORD_WEBHOOK_URL and GETODDS_API_KEY, then run python3 bot.py. The bot posts each same-line price drop of 5% or more once.

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

KEY = os.environ["GETODDS_API_KEY"]
WEBHOOK = os.environ["DISCORD_WEBHOOK_URL"]
FEED = "https://getoddsapi.com/api/v1/dropping-odds?sport=NBA&min_drop_pct=5&limit=50"
seen = set()

def get_drops():
    req = urllib.request.Request(FEED, headers={"Authorization": "Bearer " + KEY})
    with urllib.request.urlopen(req, timeout=20) as res:
        return json.load(res)["data"]

def post(text):
    body = json.dumps({"content": text}).encode()
    req = urllib.request.Request(WEBHOOK, data=body, headers={
        "Content-Type": "application/json", "User-Agent": "odds-alert-bot/1.0"})
    urllib.request.urlopen(req, timeout=20).close()

while True:
    for row in get_drops():
        if (row["id"], row["changed_at"]) in seen:
            continue
        seen.add((row["id"], row["changed_at"]))
        line = "" if row["line"] is None else " " + str(row["line"])
        post(f"{row['away']} @ {row['home']} {row['market']} {row['side']}{line}: "
             f"{row['previous_decimal']:.2f} -> {row['decimal']:.2f} "
             f"(-{row['drop_pct']:.1f}%)")
    time.sleep(900)  # every 15 minutes = 96 requests a day
```

## Run it in production

Run the script as an always-on process (a small VM, a systemd service or a container) with both secrets in environment variables. If GetOdds returns 429, wait for the Retry-After header before the next poll; Discord also answers 429 with a retry_after value when a webhook posts too fast.

The seen set grows by one entry per alert. For a bot that runs for months, keep only entries from the last 24 hours, the same window the drop feed compares, or store them in SQLite so a restart does not repost old moves.

## How the alert works

/api/v1/dropping-odds compares the latest two retained price changes within 24 hours for the same event, market, side and line, and returns drops at or above min_drop_pct for upcoming games with a fresh capture. The bot keys each alert on the offer id and changed_at, so a move posts once.

Change sport to NFL, NHL, NCAAF or NCAAB, or raise min_drop_pct to post fewer alerts.

## Steam moves: watch the sharp book

A steam move is a fast, same-direction move across books. Pinnacle often moves first, so many bots compare a recreational book against Pinnacle’s line. Read /api/v1/pinnacle/markets on the same schedule and alert when DraftKings still shows the old number.

- [Line movement API](https://getoddsapi.com/answers/line-movement-api): Retained price changes and history.
- [Pinnacle API alternative](https://getoddsapi.com/pinnacle-api-alternative): Pinnacle lines on a free key.

## Push instead of poll

For alerts within seconds, replace the loop with the GetOdds WebSocket, which pushes game-line changes within about 15 seconds of storing them. It uses one credit per connected minute.

- [WebSocket reference](https://getoddsapi.com/docs/websocket): URL, messages and resume.
- [Telegram odds bot](https://getoddsapi.com/uses/telegram-odds-bot): The same idea in Telegram.
- [All use cases](https://getoddsapi.com/uses): Bots, apps, sheets and trackers.

## Questions

### How often can the bot poll on the free key?

Every 15 minutes uses 96 of the 100 free requests a day; a faster poll needs a paid plan.

### Does the bot need a Discord bot account?

No. A channel webhook is enough to post messages.

### Which books does the drop feed cover?

DraftKings game lines observed through ESPN: moneyline, spread and total for the leagues GetOdds stores.

## Sources

- [Discord developer docs: execute webhook](https://discord.com/developers/docs/resources/webhook#execute-webhook)
- [GetOdds OpenAPI contract](https://getoddsapi.com/openapi.json)
- [GetOdds API documentation](https://getoddsapi.com/docs)

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
