Every AFL Betting Market in the SockOdds API
Head to head, line, totals, team totals and player markets for the AFL and AFLW, with the keys to request each one.
The AFL is in SockOdds API v1 under the league key afl, with the AFL Women's competition under aflw. Both are Australian football (sport key australian_football), so they share one set of 16 market types: the game markets most punters know, team totals, and player markets for goal kickers, disposals, kicks, handballs, marks, hitouts and tackles.
This post lists every one of them, explains how a market is named, and shows how to ask for only the markets you use.
How an AFL market is named
Every price in v1 belongs to a market, and every market has a type. The type is a readable key such as winner, handicap or player_disposals_over_under. On top of the type, a market can carry:
- a subject:
nullfor a market on the whole game, the team for a team market, or the player for a player market; - a period:
fullfor the whole game,half_1andhalf_2, orquarter_1toquarter_4; - a line, on each outcome, for line and over/under markets.
The market's id is built from the event, the type, the subject, the period and the line, so the same market has the same id at every bookmaker that prices it. Each outcome has its own id as well, and results use the same outcome id. A response lists each market once, and each of its outcomes lists every bookmaker's price on it, best first. That is what makes comparing bookmakers and settling bets a matter of matching ids rather than names. Reading prices has the full field list.
Every AFL market type
The table comes from the API's own catalogue. A bookmaker quotes the markets it offers for each game, so a type being listed means you can ask for it, not that every bookmaker prices it every week.
Game markets
| Market | Key | Sides | Line | Periods |
|---|---|---|---|---|
| Winner | winner | home, away, competitor_1, competitor_2 | No | full, half_1, half_2, quarter_1, quarter_2, quarter_3, quarter_4 |
| Handicap | handicap | home, away, competitor_1, competitor_2 | Yes | full, half_1, half_2, quarter_1, quarter_2, quarter_3, quarter_4 |
| Total points | total_points | over, under | Yes | full, half_1, half_2, quarter_1, quarter_2, quarter_3, quarter_4 |
| Total goals | total_goals | over, under | Yes | full, half_1, half_2, quarter_1, quarter_2, quarter_3, quarter_4 |
Team markets
| Market | Key | Sides | Line | Periods |
|---|---|---|---|---|
| Team points over/under | team_points_over_under | over, under | Yes | full, half_1, half_2, quarter_1, quarter_2, quarter_3, quarter_4 |
| Team goals over/under | team_goals_over_under | over, under | Yes | full, half_1, half_2 |
Player markets
| Market | Key | Sides | Line | Periods |
|---|---|---|---|---|
| Anytime goal scorer | player_goals_anytime | yes | No | full |
| First goal scorer | player_goals_first | Each competitor | No | full |
| Last goal scorer | player_goals_last | Each competitor | No | full |
| Player goals over/under | player_goals_over_under | over, under | Yes | full |
| Player disposals over/under | player_disposals_over_under | over, under | Yes | full |
| Player kicks over/under | player_kicks_over_under | over, under | Yes | full |
| Player handballs over/under | player_handballs_over_under | over, under | Yes | full |
| Player marks over/under | player_marks_over_under | over, under | Yes | full |
| Player hitouts over/under | player_hitouts_over_under | over, under | Yes | full |
| Player tackles over/under | player_tackles_over_under | over, under | Yes | full |
The sides tell you what each outcome is. home and away are the two teams; over and under belong to totals; yes backs a player market such as an anytime goal kicker. Lines sit on the outcomes, from each outcome's own point of view: on a line market the home side might carry -12.5 and the away side 12.5.
Ask the API for the list
The same list is one request away, so your code can read it rather than hard-code it:
curl -sS "https://api.sockodds.com/v1/markets?league=afl&limit=3" \
-H "Authorization: Bearer $SOCKODDS_API_KEY"const response = await fetch("https://api.sockodds.com/v1/markets?league=afl&limit=3", {
headers: { Authorization: `Bearer ${process.env.SOCKODDS_API_KEY}` },
});
console.log(JSON.stringify(await response.json(), null, 2));import json, os, urllib.request
request = urllib.request.Request(
"https://api.sockodds.com/v1/markets?league=afl&limit=3",
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": [
{
"key": "winner",
"name": "Winner",
"subject": "event",
"bet": "winner",
"stat": null,
"has_line": false,
"sides": [
"home",
"away"
],
"sports": [
"australian_football",
"rugby_league",
"rugby_union",
"basketball",
"american_football",
"baseball",
"ice_hockey",
"tennis",
"mma",
"cricket",
"esports"
],
"periods": [
"full",
"half_1",
"half_2",
"quarter_1",
"quarter_2",
"quarter_3",
"quarter_4",
"innings_1_to_5",
"half_2_ot",
"period_1",
"period_2",
"period_3",
"set_1",
"set_2",
"set_3",
"set_4",
"set_5",
"map_1",
"map_2",
"map_3",
"map_4",
"map_5"
]
},
{
"key": "handicap",
"name": "Handicap",
"subject": "event",
"bet": "handicap",
"stat": null,
"has_line": true,
"sides": [
"home",
"away"
],
"sports": [
"australian_football",
"rugby_league",
"rugby_union",
"soccer",
"basketball",
"american_football",
"baseball",
"ice_hockey",
"tennis",
"esports"
],
"periods": [
"full",
"half_1",
"half_2",
"quarter_1",
"quarter_2",
"quarter_3",
"quarter_4",
"innings_1_to_5",
"half_2_ot",
"quarter_4_ot",
"period_1",
"period_2",
"period_3"
]
},
{
"key": "total_points",
"name": "Total points",
"subject": "event",
"bet": "total",
"stat": "points",
"has_line": true,
"sides": [
"over",
"under"
],
"sports": [
"australian_football",
"rugby_league",
"rugby_union",
"basketball",
"american_football"
],
"periods": [
"full",
"half_1",
"half_2",
"quarter_1",
"quarter_2",
"quarter_3",
"quarter_4",
"half_2_ot",
"quarter_4_ot"
]
}
],
"meta": {
"count": 3,
"cursor": "eyJuIjozLCJmIjoiNDIyNTNmOGM5NGYwOGFjNiJ9"
},
"links": {
"next": "https://api.sockodds.com/v1/markets?league=afl&limit=3&cursor=eyJuIjozLCJmIjoiNDIyNTNmOGM5NGYwOGFjNiJ9"
}
}Follow links.next for the rest of the list, as on every list route (pagination). Catalogue rows count towards your monthly objects like any other row, so read the list once and keep it.
Request only the markets you use
On GET /v1/odds?league=afl and GET /v1/events/{event_id}/odds, markets= takes up to 20 market keys. A head to head and line board for a round needs two:
GET /v1/odds?league=afl&markets=winner,handicap&bookmakers=sportsbet,tab
A disposals board for one game needs one, with the alternate lines if you show them:
GET /v1/events/{event_id}/odds?markets=player_disposals_over_under&alternates=true
Every event and every bookmaker price in a response counts as an object, so asking for the markets you show, at the bookmakers you show, keeps your allowance for the games that matter. Limits explains the counting.
When prices appear
AFL prices are delivered in season. Out of season the league and its markets stay in the catalogue, so you can build against the keys today, and prices arrive in the same responses once bookmakers are pricing games. The AFL league page lists the bookmakers delivering it now, and the AFLW page does the same for the women's competition.
The AFL is on the free Developer plan, which reads Sportsbet, TAB and Ladbrokes. The AFLW is on Rookie and Pro. Rookie and Pro read more bookmakers, and Pro adds recorded price history. See pricing.
Results
GET /v1/results grades the outcomes we quoted from official result sources, with the same outcome ids as the prices. A drawn AFL or AFLW head to head is graded as a dead heat with a dead_heat_factor of 0.5: half the stake is paid at the quoted price and the other half is lost. Results covers partial settlement and corrections.
Next
SockOdds provides data only. It does not offer tips or predictions on any game.