If you've tried to get Australian racing odds into code, you've probably hit the same wall I did: the global odds APIs cover US sportsbooks and the Premier League well, and treat Australian racing as an afterthought. A few bookmakers, no next-to-go endpoint, and race names that don't match what you see on the TAB.
This walkthrough uses the PuntersEdge odds API, which prices Australian and New Zealand racing across 13 Australian bookmakers. Step 1 needs no key at all, so you can see real data before you sign up for anything.
Step 1: real prices, no key
There's a free demo endpoint that returns a small live sample: the next 3 races, 5 runners each, with the top 3 bookmaker prices per runner.
import requests
r = requests.get("https://api.puntersedge.online/v1/demo/racing/next-to-go", timeout=20)
races = r.json()["races"]
for race in races:
print(f"{race['venue']} R{race['race_number']} ({race['category']}), "
f"{race['books_quoting']} books quoting")
for runner in race["runners"]:
prices = ", ".join(f"{b['key']} ${b['win_price']:.2f}" for b in runner["bookmakers"])
print(f" {runner['number']:>2} {runner['name']:<20} {prices}")
When I ran it on a Saturday night it printed three greyhound races, starting with:
Q2 Parklands R8 (greyhound), 10 books quoting
1 Unique Reward neds $1.45, ladbrokes_au $1.45, playup $1.45
Every race has a race_id, and every price says which bookmaker it came from. Times are UTC.
Step 2: a free key and the full feed
The demo is a teaser. The real endpoint, GET /v1/racing/next-to-go, returns every runner and every bookmaker. A free key needs no card and gives you 3,000 credits a month. A next-to-go call costs 2 credits for up to 20 races.
Put the key in an environment variable rather than in your code:
export PUNTERSEDGE_API_KEY="your-key-here"
pip install puntersedge
The official client reads that variable for you:
from puntersedge import PuntersEdge
pe = PuntersEdge()
races = pe.racing_next_to_go(categories="horse", country="AU", num_races=3)
The response shape is the same as the demo, just complete: a list of races, each with runners, each runner with a list of bookmakers carrying key and win_price. That means anything you write against the demo keeps working.
Step 3: the best price per runner
This is the bit people actually want. Take the highest win price across the books for each runner, and add up the implied probabilities to get the market percentage on best prices:
for race in races:
print(f"\n{race['venue']} R{race['race_number']} ({len(race['runners'])} runners)")
market = 0.0
for runner in race["runners"]:
quotes = [b for b in runner["bookmakers"] if b.get("win_price")]
if not quotes:
continue
best = max(quotes, key=lambda b: b["win_price"])
market += 1 / best["win_price"]
print(f" {runner['number']:>2} {runner['name']:<20} ${best['win_price']:>6.2f} {best['key']}")
print(f" best-price market: {market * 100:.1f}%")
If you only want the answer and not the per-book detail, there's an endpoint that does this server-side, pe.racing_best_odds(...). Here's real output from a weekday afternoon:
Gawler R1: 10 books, market 115.61%
4 Nunya $ 1.50 betright
3 Mizzen Jib $ 5.50 tabtouch
1 Ateyate $ 7.00 unibet
5 Mohatu $ 11.00 pointsbetau
Notice how the best price for each runner sits at a different bookmaker. That's the whole reason to compare.
Step 4: don't fall over on the free plan
The free plan allows 30 requests a minute. The client raises a typed error for each failure, so you can back off properly:
import time
from puntersedge.exceptions import PuntersEdgeError, RateLimitError
def next_races(retries=3):
for attempt in range(retries):
try:
return pe.racing_next_to_go(categories="horse", country="AU", num_races=3)
except RateLimitError:
time.sleep(60)
raise RuntimeError("still rate limited")
print("credits left this month:", pe.usage()["credits_remaining"])
Where to go next
- A Telegram bot that alerts you when one bookie is out of line (part 2 of this series, next week)
- Runnable examples on GitHub: next-to-go, best odds, price movement
- API docs
The API returns bookmakers' prices, not tips. Always check a price on the bookmaker's own site before you act on it. 18+. Gambling Help Online: 1800 858 858.
Top comments (0)