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.

Updated June 2026Built on the live SportsGameOdds feed
How it works
  1. 1
    Poll 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.

  2. 2
    Diff 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.

  3. 3
    Push 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 byBookmaker map with per-book odds, spread, overUnder, available, and lastUpdatedAt. 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) and bookOdds (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=true and each book returns openOdds/closeOdds and openOverUnder/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, its byBookmaker entry includes a deeplink to that market, and every event also exposes links.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 getEvents on a timer; the All-Star plan adds the /stream/events WebSocket 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 needSportsGameOddsScrape books + roll your own watcher
Books per snapshotAll 85+ in one byBookmaker objectOne scraper, login, and anti-bot fight per book
Normalized marketsShared oddID lines every book up to diffReconcile each book's market naming yourself
Move detection baselinefairOdds + bookOdds consensus includedCompute and maintain your own
Open vs currentOne flag: includeOpenCloseOdds=trueSnapshot and persist every poll yourself
Deeplinksdeeplink on supported books + links.bookmakersBuild and track deeplink formats per book
Push delivery/stream/events WebSocket on All-StarStand up your own change-detection infra
MaintenanceOne feed; we absorb book-side changesRe-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

Build your odds alert bot

Free plan available. Set up in 5 minutes. No credit card required.