Daily Leaderboard
Returns each user's points increment since UTC 00:00 today. The cache is refreshed every 5 minutes by a background worker.
GET /points/leaderboard/daily
No authentication required.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
epoch | integer | No | Current active epoch | Epoch number |
limit | integer | No | 10 | Number of entries, clamped to 1–50 |
offset | integer | No | 0 | Pagination offset (minimum 0) |
Response
{
"success": true,
"data": {
"date": "2026-04-16",
"epoch_number": 3,
"refreshed_at": "2026-04-16T08:35:00Z",
"total": 2840,
"entries": [
{
"rank": 1,
"user_address": "0xAbCd...1234",
"points_today": "4230.50",
"tier": "T3"
},
{
"rank": 2,
"user_address": "0xEfGh...5678",
"points_today": "3810.20",
"tier": "T2"
}
]
},
"error": null,
"timestamp": 1745280000
}
Response Fields
| Field | Type | Description |
|---|---|---|
date | string | UTC date (YYYY-MM-DD) |
epoch_number | int | Epoch the data belongs to |
refreshed_at | string | Last cache refresh time (minute-level precision) |
total | int | Total users with points today (not capped by limit) |
entries | array | Ranked entries |
entries[]
| Field | Type | Description |
|---|---|---|
rank | int | Rank position for today |
user_address | string | User's wallet address |
points_today | Decimal | Points earned since UTC 00:00 today |
tier | string | null | User's current tier; null if not set |
Refresh Mechanism
The read path queries the daily_points_leaderboard table directly. A background worker refreshes that table every 5 minutes (incremental within the day; full rebuild on the first run after UTC 00:00, when the previous day's rows are purged).
- This leaderboard shows today's increment only, not epoch cumulative totals. See Leaderboard for epoch totals.
- If the background worker has not completed its first run of the day, the endpoint may return an empty list.
- Use
offset+limitfor pagination, e.g., page 2:?limit=50&offset=50.
Code Examples
Python
import requests
BASE_URL = "https://api.prex.world/api/v1"
resp = requests.get(
f"{BASE_URL}/points/leaderboard/daily",
params={"limit": 10},
)
data = resp.json()["data"]
print(f"Daily leaderboard {data['date']} (refreshed {data['refreshed_at']})")
for e in data["entries"]:
print(f" #{e['rank']} {e['user_address'][:10]}...: {e['points_today']} pts today")