The data feed for alternative sports betting — odds, events, futures for 31 leagues
Project description
AltSportsData SDK
Alternative sports odds & data for sportsbooks, DFS platforms, and prediction markets.
One SDK. 30 leagues. Every market type. Moneylines, matchups, props, podiums, futures, and parlays — from surfing to Supercross to Formula Drift.
pip install altsportsdata
Example 1 — Pre-Event Moneylines
from altsportsdata import AltSportsData
client = AltSportsData(api_key="your_key", league="spr") # Supercross
events = client.list_events(status="upcoming")
odds = client.get_moneylines(events[0].id)
for o in sorted(odds["eventWinner"], key=lambda x: x["odds"])[:5]:
ath = o["athlete"]
print(f'{ath["firstName"]} {ath["lastName"]:20} {o["probability"]:6.2f}% ({o["odds"]:.2f})')
Eli Tomac 49.42% (2.02)
Hunter Lawrence 37.57% (2.66)
Ken Roczen 23.49% (4.26)
Cooper Webb 14.62% (6.84)
Joey Savatgy 6.17% (16.20)
Example 2 — Head-to-Head Matchups
matchups = client.get_matchups(events[0].id)
for m in matchups["headToHead"]:
p1, p2 = m["eventParticipant1"], m["eventParticipant2"]
a1, a2 = p1["athlete"], p2["athlete"]
print(f'{a1["firstName"]} {a1["lastName"]} ({p1["odds"]:.2f})'
f' vs {a2["firstName"]} {a2["lastName"]} ({p2["odds"]:.2f})')
Cooper Webb (2.31) vs Ken Roczen (1.57)
Eli Tomac (1.66) vs Hunter Lawrence (2.13)
Example 3 — Podium Probabilities
podiums = client.get_podiums(events[0].id)
for o in sorted(podiums["podiums"], key=lambda x: x["odds"])[:5]:
ath = o["athlete"]
print(f'{ath["firstName"]} {ath["lastName"]:20} {o["probability"]:5.1f}% ({o["odds"]:.2f})')
Eli Tomac 87.7% (1.14)
Hunter Lawrence 77.5% (1.29)
Ken Roczen 63.7% (1.57)
Cooper Webb 49.6% (2.02)
Joey Savatgy 23.3% (4.28)
Example 4 — Historical Results & Settlement
wsl = AltSportsData(api_key="your_key", league="wsl") # World Surf League
completed = wsl.list_events(status="completed")
odds = wsl.get_moneylines(completed[0].id)
for o in sorted(odds["eventWinner"], key=lambda x: x["odds"])[:5]:
ath = o["athlete"]
tag = "✅" if o["settlement"] == "WIN" else " "
print(f'{tag} {ath["firstName"]} {ath["lastName"]:20} odds {o["odds"]:5.2f} → {o["settlement"]}')
Molly Picklum odds 3.50 → LOSE
Caitlin Simmers odds 3.88 → LOSE
Erin Brooks odds 5.49 → LOSE
✅ Gabriela Bryan odds 6.46 → WIN
Bettylou Johnson odds 9.90 → LOSE
All Market Types
# Sportsbook — traditional markets
client.get_moneylines("event_id") # event winner
client.get_matchups("event_id") # head-to-head
client.get_totals("event_id") # over/under
client.get_exactas("event_id", n=2) # exacta (2, 3, or 4)
client.get_podiums("event_id") # top-3 finish
client.get_shows("event_id") # shows
client.get_heat_winners("event_id") # heat winner
client.get_fastest_lap("event_id") # fastest lap
client.get_dream_team("event_id") # dream team
# DFS — player-level markets
client.get_player_props("event_id") # prop bets
client.get_player_matchups("event_id") # pick'em matchups
client.get_player_totals("event_id") # over/under by stat
# Prediction markets — probability-first
client.get_market_probabilities("event_id") # win probabilities
client.get_podium_probabilities("event_id") # top-3 probabilities
client.get_top_finish_probabilities("event_id", top_n=5) # top-N probabilities
# Same Game Parlay
client.calculate_parlay("event_id", picks=["odd_id_1", "odd_id_2"])
# Generic — any market by name or alias
client.get_odds("event_id", "moneyline") # aliases: "h2h", "props", "totals", etc.
Events
client.list_events(status="upcoming") # pre-event
client.list_events(status="live") # in-progress
client.list_events(status="completed") # historical + settlement
client.list_events(status=["live", "upcoming"]) # combine filters
client.list_events(league="f1", status="upcoming") # filter by league
client.get_event("event_id") # full detail with rounds/heats
client.get_participants("event_id") # athletes / roster
client.get_heat_scores("event_id", "heat_id") # scores / lap times
Futures
client.list_futures() # all available futures
client.get_futures(tour="tour_id", type="winner") # season winner odds
Setup
from altsportsdata import AltSportsData
# All leagues
client = AltSportsData(api_key="your_key")
# Lock to a league — auto-filters every query
wsl = AltSportsData(api_key="your_key", league="wsl")
f1 = AltSportsData(api_key="your_key", league="f1")
spr = AltSportsData(api_key="your_key", league="spr")
Google Colab
!pip install altsportsdata
from altsportsdata import AltSportsData
from google.colab import userdata
client = AltSportsData(api_key=userdata.get("ALTSPORTSDATA_API_KEY"))
for lg in client.list_leagues():
print(f"{lg.key:15} {lg.name}")
30 Leagues
| Code | League | Code | League |
|---|---|---|---|
wsl |
World Surf League | pbr |
Professional Bull Riders |
sls |
Street League Skateboarding | bkfc |
Bare Knuckle FC |
f1 |
Formula 1 | motogp |
MotoGP |
spr |
Supercross | mxgp |
MXGP |
nrx |
Nitrocross | jaialai |
Jai Alai |
fdrift |
Formula Drift | nll |
National Lacrosse League |
masl |
Major Arena Soccer | nhra |
NHRA Drag Racing |
powerslap |
Power Slap | dgpt |
Disc Golf Pro Tour |
worldoutlaws |
World of Outlaws | usac |
USAC Racing |
xgame |
X Games | motoamerica |
MotoAmerica |
hlrs |
High Limit Racing | byb |
BYB Extreme Fighting |
athletesunlimited |
Athletes Unlimited | lux |
LUX Fight League |
raf |
Real American Freestyle | mltt |
Major League Table Tennis |
motocrs |
Motocross | spectation |
Spectation |
gsoc |
Global Soccer | sprmtcrs |
Supermotocross |
Links
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file altsportsdata-2.1.4.tar.gz.
File metadata
- Download URL: altsportsdata-2.1.4.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ba4d3543824b857b5eb4ba16707c7e0f4dfa1b56e9297e8173653ac118a401d
|
|
| MD5 |
bac5dd9d2053bf9e8b01987fd9f04256
|
|
| BLAKE2b-256 |
db7c31857334eda91573fdc92023864ac0038be2ce1951abeeebab2fb3b98088
|
File details
Details for the file altsportsdata-2.1.4-py3-none-any.whl.
File metadata
- Download URL: altsportsdata-2.1.4-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e28004b5267c970fbf5d2f3e418ee3fa88a2974d60b6c296be49de3ea4f8cb0e
|
|
| MD5 |
267600df3290d7fa03e894e1cff28fc5
|
|
| BLAKE2b-256 |
b562959c2402162278989b3fdacb65b3aaed7b03cbb682eaf1c1c7facd766ed8
|