Skip to content

Leaderboard of teams by ELO

GET
/api/leaderboard
curl --request GET \
--url https://foxleague.ai/api/leaderboard

Answers one page of teams ranked by ELO, highest first. Teams with no player cards come after all the others. Every row is a public profile. With window, the win, draw and loss counts cover only that period; ELO and league are always lifetime. total counts every team on the board, whatever the window.

places holds the place on the whole board of each row of users, in the same order. With search, only the teams that match are listed, total counts the matches and places still holds each match’s place on the whole board. With me, the answer also carries me: that wallet’s place and row, whatever page or search is asked for; me is null when the wallet has no team.

Who: anyone.

Refusals:

  • Invalid window '<window>'. Use one of: 7d, 30d, 90d, all: window is not one of the four values.
  • Invalid <parameter>: a NUL byte is not a character.: search or me held a NUL byte.
limit
integer format: int64

Rows per page, 1 to 500. Default 25; a value below 1 reads as 1.

offset
integer format: int64

Rows to skip from the top. Default 0; a negative value reads as 0.

window
string

Period of the win, draw and loss counts: 7d, 30d, 90d or all (the default). ELO and league are always lifetime.

search
string

Only teams whose team name, username or wallet address contains this text. Upper and lower case are the same.

me
string

A wallet address. The answer then carries me: that team’s place on the whole board and its row.

Success or a refusal: read success (the refusals are in the description).

Media type application/json
object
code

A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.

string | null
data

The answer. Present when success is true.

object
limit
required

Rows per page used for this answer.

integer format: int64
me
One of:

One team’s place on the leaderboard and its row.

object
place
required

The team’s place on the whole leaderboard; 1 is first.

integer format: int64
user
required

The team’s row.

object
active_title

The title shown on the profile, such as Tournament Champion; null when none.

string | null
badge

The team badge (see Team.badge); null without a team.

string | null
developer_team_name

The name of the player’s active developer team; null when none.

string | null
elo_rating
required

ELO rating, lifetime.

integer format: int32
id
required

User id.

integer format: int32
is_developer
required

true when the player has an active developer team.

boolean
league
required

Bronze, Silver, Gold, Platinum or Diamond.

string
matches_drawn
required

Matches drawn. On the leaderboard with a window, only within it.

integer format: int32
matches_lost
required

Matches lost. On the leaderboard with a window, only within it.

integer format: int32
matches_won
required

Matches won. On the leaderboard with a window, only within it.

integer format: int32
player_count
required

Player cards the wallet holds. 0 means the team cannot play.

integer format: int32
team_name

The team name; null for a wallet without a team.

string | null
tournament_wins
required

Tournaments won.

integer format: int32
username

Display name; null when none.

string | null
verified
required

true when the team carries the verified mark.

boolean
wallet_address
required

The wallet address.

string
offset
required

Rows skipped from the top.

integer format: int64
places

The place on the whole leaderboard of each row of users, in the same order; 1 is first.

Array<integer> | null
total
required

Teams on the leaderboard, whatever the window. With search, the teams that match.

integer format: int64
users
required

The rows, highest ELO first. Teams with no player cards come last.

Array<object>

A player’s public profile.

object
active_title

The title shown on the profile, such as Tournament Champion; null when none.

string | null
badge

The team badge (see Team.badge); null without a team.

string | null
developer_team_name

The name of the player’s active developer team; null when none.

string | null
elo_rating
required

ELO rating, lifetime.

integer format: int32
id
required

User id.

integer format: int32
is_developer
required

true when the player has an active developer team.

boolean
league
required

Bronze, Silver, Gold, Platinum or Diamond.

string
matches_drawn
required

Matches drawn. On the leaderboard with a window, only within it.

integer format: int32
matches_lost
required

Matches lost. On the leaderboard with a window, only within it.

integer format: int32
matches_won
required

Matches won. On the leaderboard with a window, only within it.

integer format: int32
player_count
required

Player cards the wallet holds. 0 means the team cannot play.

integer format: int32
team_name

The team name; null for a wallet without a team.

string | null
tournament_wins
required

Tournaments won.

integer format: int32
username

Display name; null when none.

string | null
verified
required

true when the team carries the verified mark.

boolean
wallet_address
required

The wallet address.

string
window
required

The period of the win, draw and loss counts: 7d, 30d, 90d or all.

string
error

Why the request was refused, in plain words. Present when success is false.

string | null
success
required

true when the request did what it asked. false is a refusal: read error.

boolean
Example
{
"data": {
"limit": 25,
"me": null,
"offset": 0,
"places": [
1,
2
],
"total": 1874,
"users": [
{
"active_title": "Tournament Champion",
"badge": "ipfs://bafybeihkoviema7g3gxyt6la7vd5ho32ictqbilu3wnlo3rs7ewhnp7lly",
"developer_team_name": null,
"elo_rating": 1734,
"id": 412,
"is_developer": false,
"league": "Gold",
"matches_drawn": 12,
"matches_lost": 31,
"matches_won": 58,
"player_count": 24,
"team_name": "Fox Rovers",
"tournament_wins": 2,
"username": null,
"verified": false,
"wallet_address": "erd15feryxhrdz9m6y09mr8wrerwzgj6f8ntxvhxyrdlm5aahn0t09nl4ujy86"
},
{
"active_title": null,
"badge": "ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi",
"developer_team_name": null,
"elo_rating": 1688,
"id": 1093,
"is_developer": false,
"league": "Gold",
"matches_drawn": 9,
"matches_lost": 29,
"matches_won": 44,
"player_count": 18,
"team_name": "Red Kites",
"tournament_wins": 0,
"username": null,
"verified": true,
"wallet_address": "erd124fl6zy54klay937yrnujckpak28lrdjg0eel92ue3gm36kcwf9tfwwqlt"
}
],
"window": "all"
},
"success": true
}