Odds API for Betting Alert Bots
Build a sports odds alert bot for Discord or Telegram: diff odds across 85+ books to detect line moves, stream changes on All-Star, and push deeplinks to users.
- 1Poll a snapshot and store it
On a timer, call getEvents with leagueID and oddsAvailable=true and store each book's odds, line, and lastUpdatedAt keyed by oddID and bookmakerID as your last-seen baseline.
- 2Diff successive snapshots to detect a move
Compare each book's new price to the stored value for the same oddID; a change is a line move, sized against fairOdds and bookOdds, and several books moving the same way at once signals steam.
- 3Push the alert with a deeplink
When a move clears your threshold, post the old price, new price, and marketName to a Discord webhook or the Telegram Bot API, attaching the book's deeplink or the event's links.bookmakers.
An odds alert bot API is the data layer behind a bot that watches sportsbook prices and pings users on Discord or Telegram the moment a line moves. SportsGameOdds is the feed behind it: a single /events call returns each market's byBookmaker prices across 85+ books, plus fairOdds and bookOdds consensus baselines. Your bot can diff successive snapshots, detect a move, and push an alert with a click-to-bet deeplink, and it never scrapes a single sportsbook.
Why build your odds alert bot on SportsGameOdds
- Every book in one snapshot to diff. A single call hydrates each market's
byBookmakermap with per-bookodds,spread,overUnder,available, andlastUpdatedAt. Detecting a line move then means comparing this snapshot's value to the last one you stored, with no per-book scraping in between. - Consensus baselines flag meaningful moves.
fairOdds(no-vig) andbookOdds(with vig) give a market-wide reference, so your bot can ignore noise and alert only when a book drifts away from the consensus, or toward it, by a threshold you set. - Open vs current is built in. Set
includeOpenCloseOdds=trueand each book returnsopenOdds/closeOddsandopenOverUnder/closeOverUnder, so a "moved off the open" alert needs no historical snapshotting of your own. - Supported books carry a
deeplink. Where a book provides one, itsbyBookmakerentry includes adeeplinkto that market, and every event also exposeslinks.bookmakers. A Discord embed or Telegram message can link the user straight to the book. - Poll on any tier, or stream on All-Star. Amateur, Rookie, and Pro bots poll
getEventson a timer; the All-Star plan adds the/stream/eventsWebSocket so changes are pushed to you instead. A free hobby bot runs entirely on polling. - Per-event-object pricing keeps a watcher cheap. One event is one object no matter how many books or markets you read, so polling a full league slate for moves doesn't multiply your bill.
How an odds alert bot works with our data
The Discord webhook and the Telegram message are the easy parts of an alert bot. The hard part is getting clean, normalized prices to diff. SportsGameOdds pre-assembles that for you: you poll one feed, every book is already aligned to a shared oddID, and your bot spends its cycles on detection logic instead of scraping.
Poll a snapshot and store it
On a timer, call getEvents with leagueID and oddsAvailable=true to pull the current slate. For each market under event.odds, read its byBookmaker map and keep the values you care about (odds, overUnder or spread, and lastUpdatedAt) keyed by oddID and bookmakerID. That stored map is your "last seen" baseline for the next cycle.
Diff successive snapshots to detect a move
On the next poll, compare each book's new price against your stored value for the same oddID. A changed odds or line is a line move; size it against fairOdds/bookOdds to decide if it crosses your alert threshold, and use lastUpdatedAt to confirm the book actually re-priced. To catch steam, look for the same market moving the same direction across several books in byBookmaker at once rather than a single outlier.
Push the alert with a deeplink
When a move clears your threshold, format the message with the old price, new price, the move size, and the marketName, then POST it to a Discord webhook or send it via the Telegram Bot API. Attach the book's deeplink (or the event's links.bookmakers entry) so the user taps straight through to that market on the sportsbook.
Example request
Poll an NBA slate with odds attached, then diff each book's price against your last snapshot:
curl "https://api.sportsgameodds.com/v2/events?leagueID=NBA&oddsAvailable=true" \
-H "x-api-key: YOUR_API_KEY"
A trimmed market shows the per-book prices your bot stores and compares between polls:
{
"eventID": "LAL_at_BOS_2026...",
"odds": {
"points-home-game-ml-home": {
"oddID": "points-home-game-ml-home",
"marketName": "Lakers Moneyline",
"bookOdds": "-140",
"fairOdds": "-134",
"byBookmaker": {
"draftkings": {
"odds": "-150",
"available": true,
"lastUpdatedAt": "2026-06-26T18:04:12Z",
"deeplink": "https://sportsbook.draftkings.com/..."
},
"fanduel": { "odds": "-142", "available": true }
}
}
}
}
If your previous snapshot had DraftKings at -135 and this poll returns -150, that 15-cent move clears a typical threshold, so push an alert with the deeplink and the user can act before the line settles. On the All-Star plan, /stream/events pushes changed eventIDs to you over a WebSocket and you re-fetch only those, instead of polling on a timer. See the docs and the real-time streaming API guide for the streaming path.
SportsGameOdds vs building it yourself
| What you need | SportsGameOdds | Scrape books + roll your own watcher |
|---|---|---|
| Books per snapshot | All 85+ in one byBookmaker object | One scraper, login, and anti-bot fight per book |
| Normalized markets | Shared oddID lines every book up to diff | Reconcile each book's market naming yourself |
| Move detection baseline | fairOdds + bookOdds consensus included | Compute and maintain your own |
| Open vs current | One flag: includeOpenCloseOdds=true | Snapshot and persist every poll yourself |
| Deeplinks | deeplink on supported books + links.bookmakers | Build and track deeplink formats per book |
| Push delivery | /stream/events WebSocket on All-Star | Stand up your own change-detection infra |
| Maintenance | One feed; we absorb book-side changes | Re-fix scrapers every time a book changes |
You can absolutely build the watcher yourself, and it's a reasonable call if you want full control over your sources. The real cost isn't the bot, though. It's scraping each book, normalizing a dozen market formats, and keeping all of it alive as books change. SportsGameOdds removes that layer so a side-project bot stays a side project.
Frequently asked questions
Related use cases
- Odds Comparison & Line Shopping API: surface the best price across every book from the same
byBookmakerfeed. - Odds API for Arbitrage Betting: detect arbitrage opportunities across the prices your bot already polls.
- Sports Odds API MCP for AI Agents: wire the feed into AI-assisted dev with the MCP server.
- Live & In-Play Odds API: track odds and scores as games unfold.
- Real-time streaming API guide: the All-Star WebSocket push path for alerts.
- Pricing: per-event-object plans, including a free Amateur tier to run a hobby bot.
Build your odds alert bot
Free plan available. Set up in 5 minutes. No credit card required.