Skip to main content

Leaderboard

Returns the epoch cumulative points leaderboard. Data is read from a cached table refreshed periodically by the backend.

GET /points/leaderboard

No authentication required.

Query Parameters

ParameterTypeRequiredDefaultDescription
epochintegerNo1Epoch number. Defaults to epoch 1 — pass explicitly to query other epochs
type_stringNototalRanking type (see below)
limitintegerNo100Number of entries to return

The parameter name is type_ (with trailing underscore) because type is a reserved keyword in Rust.

Ranking Types

ValueRanked By
totalTotal points (default)
tradingTrading Points (TP)
pnlPnL Points (PP)
holdingHolding Points (HP)
referralReferral Points (RP)
stakingStaking Points (SP)

Response

{
"epoch_number": 3,
"rank_type": "total",
"entries": [
{
"rank": 1,
"user_address": "0xAbCd...1234",
"username": "TradingKing",
"points": "125680.50",
"tier": "T3"
},
{
"rank": 2,
"user_address": "0xEfGh...5678",
"username": null,
"points": "98450.20",
"tier": "T2"
}
],
"total": 1842,
"updated_at": "2026-04-15T12:00:00Z"
}

Response Fields

FieldTypeDescription
epoch_numberintEpoch the leaderboard covers
rank_typestringRanking type used
entriesarrayRanked entries
totalintTotal number of ranked users (not capped by limit)
updated_atstringLast cache refresh time (ISO 8601)

entries[]

FieldTypeDescription
rankintRank position
user_addressstringUser's wallet address
usernamestring | nullDisplay name; null if not set
pointsDecimalPoints total for the ranked type
tierstringUser's tier (T1 / T2 / T3)

Code Examples

Python

import requests

BASE_URL = "https://api.primit.io/api/v1"

resp = requests.get(
f"{BASE_URL}/points/leaderboard",
params={"epoch": 3, "type_": "total", "limit": 10},
)
data = resp.json()

print(f"Top {len(data['entries'])} of {data['total']} users (Epoch {data['epoch_number']})")
for e in data["entries"]:
name = e["username"] or e["user_address"][:10] + "..."
print(f" #{e['rank']} {name}: {e['points']} pts [{e['tier']}]")