Tennis odds API
Tennis leagues, markets and prices through one REST API.
Tennis has the sport key tennis. Its events are between two competitors, competitor_1 and competitor_2, in the order the official fixture lists them.
Leagues
Request the leagues
curl -sS "https://api.sockodds.com/v1/leagues?sport=tennis" \
-H "Authorization: Bearer $SOCKODDS_API_KEY"const response = await fetch("https://api.sockodds.com/v1/leagues?sport=tennis", {
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/leagues?sport=tennis",
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": "atp",
"name": "ATP Tour",
"sport": "tennis",
"region": "intl",
"periods": [
"full",
"set_1",
"set_2",
"set_3",
"set_4",
"set_5"
]
},
{
"key": "wta",
"name": "WTA Tour",
"sport": "tennis",
"region": "intl",
"periods": [
"full",
"set_1",
"set_2",
"set_3"
]
}
],
"meta": {
"count": 2,
"cursor": null
},
"links": {
"next": null
}
}Markets
5 market types are defined for tennis: winner, handicap, total_games, total_sets and player_aces_over_under. Each league page lists the markets and periods that apply to it, and Markets lists them all.