Get user leaderboard
Overview
Returns the leaderboard of affiliated onboarded users for a given range and affiliate username.
Endpoint
GET /affiliate/leaderboard
Query Parameters
Summary Table
| Parameter | Type | Required | Constraints | Description |
|---|---|---|---|---|
from | Date | No | ≥ 2020-01-01 | Start date for filtering the leaderboard. |
limit | Number | Yes | 1–50 | Maximum number of results to return. |
to | Date | No | ≥ 2020-01-01 | End date for filtering the leaderboard. |
username | String | No | — | Filters results to a specific username. |
Parameters
from (optional)
- Type:
Date - Description: Start date for leaderboard data filtering.
- Constraints: Cannot be earlier than January 1st, 2020.
limit (required)
- Type:
number - Description: Maximum number of leaderboard entries to return.
- Constraints: Minimum 1, maximum 50.
to (optional)
- Type:
Date - Description: End date for leaderboard data filtering.
- Constraints: Cannot be earlier than January 1st, 2020.
username (optional)
- Type:
string - Description: Filter leaderboard results to a specific username.
Notes
- If both
fromandtoare omitted, the leaderboard will return results based on all available data. - Providing a
usernamewill restrict results to only that affiliate, while still respecting date and limit filters.
Example request
GET /affiliate/leaderboard?from=2025-09-01T00:00:00.000Z&to=2025-09-30T00:00:00.000Z&username=<AFFILIATE_USERNAME>&limit=2
Responses
200 OK
{
"items": [
{
"username": "FO**AR",
"total_wager": 100
},
{
"username": "BI**AR",
"total_wager": 90
}
],
"limit": 2
}
400 Bad request
Bad date
{
"message": "Validation failed (invalid date format)",
"error": "Bad Request",
"statusCode": 400
}
Limit too big
{
"message": "Validation failed",
"error": {
"errors": [],
"properties": {
"limit": {
"errors": ["Too big: expected number to be <=50"]
}
}
},
"statusCode": 400
}
403 Forbidden
{
"message": "You are not authorized to access this resource.",
"error": "Forbidden",
"statusCode": 403
}
Changelog
- v1.0.0 – Initial release of the leaderboard endpoint.