GET /stats - List All Stats
Get a list of StatIDs
GET https://api.sockodds.com/v2/stats/
Retrieve all supported statistics with statID values. Filter by sportID and by the level (all, team, player) the stat is priced at.
Query parameters
| Parameter | Type | Description |
|---|---|---|
statID | string | StatID to get data for |
sportID | string | SportID to get StatIDs for |
statLevel | string | Level of the stat, must be used in combination with sportID. Must be one of all, player, or team. Shows stats that are applicable to that specified entity, defaults to all. |
Response
{ "success": true, "data": Stat[], "nextCursor": string | null }
Stat
Contains information on a statistic (statID)
| Field | Type | Description |
|---|---|---|
statID | string | |
supportedLevels | object | { all, team, player } — which statEntityID classes it is priced at |
displays | object | { short, long } |
isScoreStat | boolean | True for `points`, the stat that decides the event |
supportedSports | object | sportID → true |
Status codes
| Status | Body |
|---|---|
200 | Success |
400 | {"success":false,"error":"Invalid params"} |
401 | {"success":false,"error":"Invalid API key"} |
403 | {"success":false,"error":"Inactive API key"} |
429 | {"success":false,"error":"Rate limit exceeded"} (Retry-After header) |
Code samples
curl -X GET "https://api.sockodds.com/v2/stats/?sportID=CRICKET" \
-H "x-api-key: YOUR_API_KEY"const r = await fetch("https://api.sockodds.com/v2/stats/?sportID=CRICKET", { headers: { "x-api-key": "YOUR_API_KEY" } });
const { success, data, nextCursor, notice } = await r.json();import requests
r = requests.get("https://api.sockodds.com/v2/stats/", params=dict(sportID="CRICKET"), headers={"x-api-key": "YOUR_API_KEY"})
body = r.json()req, _ := http.NewRequest("GET", "https://api.sockodds.com/v2/stats/?sportID=CRICKET", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
res, err := http.DefaultClient.Do(req)HttpRequest req = HttpRequest.newBuilder().uri(URI.create("https://api.sockodds.com/v2/stats/?sportID=CRICKET"))
.header("x-api-key", "YOUR_API_KEY").GET().build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var body = await http.GetStringAsync("https://api.sockodds.com/v2/stats/?sportID=CRICKET");Try it
// the response appears here