# Odds API for Betting Alert Bots
URL: https://sockodds.com/use-cases/odds-alert-bot-api/

> Build a sports odds alert bot for Discord or Telegram: diff odds across every AU book to detect line moves and push deeplinks to users.

Build a sports odds alert bot for Discord or Telegram: diff odds across every AU book to detect line moves and push deeplinks to users.

An alert bot is a diff loop: fetch, compare with the last snapshot, notify when a price crosses a threshold, and hand the user a link. SockOdds gives the loop 21 Australian books in one object, a consensus to measure moves against, and deeplinks to put in the message.

## Why build your alert bot on SockOdds

- **All books per snapshot.** One `byBookmaker` object.
- **Normalised markets.** Diff on `oddID`.
- **Consensus baseline.** `bookOdds` and `fairOdds`.
- **Deeplinks.** `links.bookmakers` for the message.
- **Free tier for a Discord bot.** AFL and NRL from three books.

## How an odds alert bot works with our data

### Poll a snapshot and store it

Every 2–5 minutes; [the live odds tracker example](https://sockodds.com/docs/examples/live-odds-tracker/) is the skeleton.

### Diff successive snapshots

Compare `decimal` per book per `oddID`.

### Push the alert with a deeplink

Discord or Telegram webhook with the event link.

## Example request

```bash
curl "https://api.sockodds.com/v2/events/?leagueID=AFL&oddID=points-home-game-ml-home&includeOpposingOdds=true" \
  -H "x-api-key: YOUR_API_KEY"
```

The head-to-head on every AFL event, every book — small enough to poll on the free plan:

```json
{
  "eventID": "afl_2026-09-03_fremantle_vs_hawthorn",
  "leagueID": "AFL",
  "odds": {
    "points-all-game-eo-odd": {
      "oddID": "points-all-game-eo-odd",
      "opposingOddID": "points-all-game-eo-even",
      "marketName": "Odd/Even Total Points",
      "statID": "points",
      "statEntityID": "all",
      "periodID": "game",
      "betTypeID": "eo",
      "sideID": "odd",
      "fairOdds": null,
      "bookOdds": "-116",
      "byBookmaker": {
        "unibet": {
          "odds": "-115",
          "decimal": 1.87,
          "available": true
        },
        "tabtouch": {
          "odds": "-118",
          "decimal": 1.85,
          "available": true
        }
      }
    }
  }
}
```

## SockOdds vs building it yourself

| Capability | SockOdds | building it yourself |
| --- | --- | --- |
| Books per snapshot | All 25 | One scraper per book |
| Normalised markets | Shared `oddID` | Reconcile naming |
| Baseline | `bookOdds` + `fairOdds` | Compute your own |
| Deeplinks | On the event | Build per book |
| Push delivery | Poll (~2 min) | Your own change detection |

## Frequently asked questions

### What is an odds alert bot API?

A feed you can diff on a schedule to detect price moves.

### How do I detect line movement or steam?

A move across several books between snapshots.

### Do I need WebSockets, or can I poll?

Poll; the feed refreshes every ~2 minutes.

### Can I build a free Discord betting bot?

Yes, on the Lite plan.

### Can alerts deeplink to the bookmaker?

Yes.

### Which sports and books are covered?

34 leagues, 25 books.

## Related use cases

- [Live & In-Play Betting Odds API](https://sockodds.com/use-cases/live-in-play-odds-api/): Pre-match lines and live event status across every Australian book, refreshed every couple of minutes, with the honest flags a live product needs..
- [Odds Comparison & Line Shopping API](https://sockodds.com/use-cases/odds-comparison-api/): Compare bookmaker odds with one API call.
- [Sports Odds API for AI Agents & MCP](https://sockodds.com/use-cases/sports-odds-api-mcp-ai-agents/): Add live Australian odds to AI agents with the SportsGameOdds MCP server pointed at SockOdds, the five SGO SDKs, and LLM-ready docs..
- [Pricing](https://sockodds.com/pricing/): plans priced on request rate and scope, including a free Lite tier with no card.

## Start building today

Free plan available. Set up in 5 minutes. Scale when you're ready.
