Build an odds price-alert bot in Python (free Australian odds API)
You want one thing: a ping when a selection hits your target price. A price-alert bot polls the market, compares each best price to your watchlist, and notifies you — without you staring at a screen. In this tutorial we'll build one in Python with the free PuntersEdge AU Odds API.
⚠️ 18+ only. This is an automation tutorial about market data, not a betting service or financial advice. Confirm prices live before acting; bet only what you can afford to lose. Gambling Help: 1800 858 858.
Get a free key
Free key at puntersedge.online/api-platform, passed in X-API-Key.
import requests, time
BASE = "https://api.puntersedge.online/v1"
HEADERS = {"X-API-Key": "YOUR_FREE_KEY"}
Step 1 — define a watchlist
A watchlist is just selections and the price you want at or above:
WATCH = [
{"sport": "afl", "team": "Brisbane", "target": 2.10},
{"sport": "nrl", "team": "Parramatta", "target": 2.50},
]
Step 2 — find the best current price for a selection
def best_price(sport, team):
evs = requests.get(f"{BASE}/best-odds/{sport}", headers=HEADERS, timeout=15).json()
for ev in evs:
for s in ev["selections"]:
if team.lower() in s["name"].lower():
return s["best_price"], s["best_bookmaker"]
return None, None
Step 3 — the alert loop (with state, so it pings once)
Track which alerts have already fired so you don't get spammed every cycle:
def notify(msg):
print("🔔", msg) # swap for Telegram/email/Slack/a webhook
fired = set()
def check():
for w in WATCH:
price, book = best_price(w["sport"], w["team"])
if price is None:
continue
key = (w["sport"], w["team"], w["target"])
if price >= w["target"] and key not in fired:
notify(f"{w['team']} is {price} @ {book} (target {w['target']})")
fired.add(key)
elif price < w["target"]:
fired.discard(key) # reset so it can re-fire if it crosses again
while True: # Ctrl-C to stop
check()
time.sleep(60) # 1 poll/min — well within the free tier
Step 4 — make the notification real
notify() is the only thing to swap. A Telegram bot is two lines:
def notify(msg):
requests.post(
f"https://api.telegram.org/bot{BOT_TOKEN}/sendMessage",
json={"chat_id": CHAT_ID, "text": f"🔔 {msg}"}, timeout=10)
…or post to a Slack/Discord webhook, send an email, or push to your own app.
Wrap up
That's a working price-alert bot: a watchlist, best-price lookup, dedup state, and a pluggable notifier — polling comfortably inside the free tier. Extend it with target *drops* (drift alerts), per-bookmaker targets, or a value threshold using /v1/arb/best-prices.
- Free key + docs: https://puntersedge.online/api-platform
- Also on RapidAPI: https://rapidapi.com/Propertyscout001/api/puntersedge-au-odds
- Endpoint:
/v1/best-odds/{sport}
(18+, gamble responsibly, Gambling Help 1800 858 858.)