Odds API for Betting Alert Bots
Poll, compare with the last snapshot, and post the moves.
An alert bot is a loop: fetch prices, compare them with the last snapshot, and post a message to Discord or Telegram when something crosses your threshold. SockOdds v1 suits that loop. One request returns a league's games with every bookmaker's prices, an outcome keeps the same id from one poll to the next, and every quote says when it was observed.
Why SockOdds
- A league in one request.
GET /odds?league=returns the league's games with every bookmaker's markets. Followlinks.nextfor the next page. - Ids to diff on. Key your snapshot on outcome
idplusbookmaker. A change indecimal_oddsorlineis a move. - A time on every quote.
observed_attells you whether a price was seen again or has actually changed. - Free to start. A free Developer key covers a set of leagues and bookmakers at 10 requests a minute, enough to prototype a bot. See pricing.
- Push instead of poll on Pro. The WebSocket stream sends a snapshot every 15 seconds, and a heartbeat when nothing changed. Heartbeats do not count towards your allowance.
What you can build
A line movement bot
Store each outcome's price per bookmaker, poll on a schedule that fits your plan's limits, and post when a price moves further than your threshold.
A best-price alert
Post when a bookmaker takes over as the best price for an outcome your users follow, with the price and its observed_at time.
A new market alert
Post the first time an outcome id shows up for a game you follow, so your channel hears about a new market without anyone checking by hand.
Try it
This request uses a free Developer key to ask for TAB's winner prices across the Rugby League World Cup.
curl -sS "https://api.sockodds.com/v1/odds?league=rlwc&markets=winner&bookmakers=tab&starts_after=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
-H "Authorization: Bearer $SOCKODDS_API_KEY"const response = await fetch(`https://api.sockodds.com/v1/odds?league=rlwc&markets=winner&bookmakers=tab&starts_after=${new Date().toISOString().slice(0, 19)}Z`, {
headers: { Authorization: `Bearer ${process.env.SOCKODDS_API_KEY}` },
});
console.log(JSON.stringify(await response.json(), null, 2));import json, os, urllib.request
from datetime import datetime, timezone
request = urllib.request.Request(
f"https://api.sockodds.com/v1/odds?league=rlwc&markets=winner&bookmakers=tab&starts_after={datetime.now(timezone.utc):%Y-%m-%dT%H:%M:%SZ}",
headers={"Authorization": "Bearer " + os.environ["SOCKODDS_API_KEY"]},
)
with urllib.request.urlopen(request) as response:
print(json.dumps(json.load(response), indent=2))Response from a local copy of the API with invented test prices
{
"data": [
{
"id": "ev_000ckk0zrx33",
"name": "Australia v New Zealand",
"league": {
"key": "rlwc",
"name": "Rugby League World Cup"
},
"scheduled_start": "2026-10-15T09:05:00.000Z",
"status": "scheduled",
"participants": [
{
"role": "away",
"identity": {
"key": "new_zealand_rugby_league",
"name": "New Zealand"
}
},
{
"role": "home",
"identity": {
"key": "australia_rugby_league",
"name": "Australia"
}
}
],
"markets": [
{
"id": "mk_pz0msgze2rqwwktb",
"key": "winner",
"name": "Winner",
"period": "full",
"subject": null,
"alternate": false,
"outcomes": [
{
"id": "oc_nncgcssmzjhyt5pe",
"name": "Australia",
"side": "home",
"line": null,
"prices": [
{
"bookmaker": "tab",
"decimal_odds": 1.77,
"implied_probability": 0.564972,
"available": true,
"observed_at": "2026-10-15T07:58:00.000Z"
}
]
},
{
"id": "oc_cwsr1gda0qcgf03j",
"name": "New Zealand",
"side": "away",
"line": null,
"prices": [
{
"bookmaker": "tab",
"decimal_odds": 2.18,
"implied_probability": 0.458716,
"available": true,
"observed_at": "2026-10-15T07:58:00.000Z"
}
]
}
]
}
]
}
],
"meta": {
"count": 1,
"cursor": null
},
"links": {
"next": null
}
}Each outcome's id and bookmaker form the key for your snapshot, and decimal_odds and observed_at are what you compare between polls. The live tracker example is a working skeleton for the loop, and best practices covers polling politely.