Skip to main content
GET
/
exchange
/
getLeagues
Get leagues
curl --request GET \
  --url https://api.4casters.io/exchange/getLeagues \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "availableLeagues": [
      "NBA",
      "NHL",
      "PREMIER-LEAGUE",
      "PGA"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.4casters.io/llms.txt

Use this file to discover all available pages before exploring further.

Returns every league with active markets on the exchange. Use league codes from this endpoint to fetch games (/exchange/v2/getGames) and orderbooks (/exchange/v2/getOrderbook). If the response contains a league name with LIVE in it (other than the per-sport live leagues NFL-LIVE, NBA-LIVE, NCAAF-LIVE, NCAAB-LIVE), the value "LIVE" is appended as an alias for “all in-play games”.

Request

GET /exchange/getLeagues
sport
string
Optional sport filter (basketball, baseball, hockey, football, soccer, golf, tennis, mma, etc.). When sport=soccer or sport=golf, the value "all" is appended to the list.
curl https://api.4casters.io/exchange/getLeagues \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

data.availableLeagues
array
Array of league codes.

Example

{
  "data": {
    "availableLeagues": [
      "CHAMPIONS-LEAGUE",
      "NBA",
      "NHL",
      "BUNDESLIGA",
      "PREMIER-LEAGUE",
      "PGA",
      "LA-LIGA",
      "NON-UFC",
      "SERIE-A",
      "MLS",
      "UFCMMA"
    ]
  }
}

Authorizations

Authorization
string
header
required

Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.

Query Parameters

sport
string

Optional sport filter (e.g. basketball, soccer, golf). When sport=soccer or sport=golf, all is appended to the list.

Response

Available leagues

data
object