Leaderboard
The competition board. Public. Live while a round is ACTIVE, and while it is ENDING before the freeze. Otherwise the newest frozen board. Subscribe to leaderboard for leaderboard_update. The frame’s leaderboard is this response.
Entries carry points, not volume or PnL.
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /api/leaderboard | Public | The board |
GET | /api/leaderboard/card | Privy JWT | JPEG of your row |
The board is cached briefly. The card is Cache-Control: private, no-store.
Board
GET /api/leaderboard
curl 'https://api.loafmarkets.com/api/leaderboard'{
"roundNumber": 3,
"roundName": "Round 3",
"roundRules": "…",
"roundStatus": "ACTIVE",
"bottomCullPercent": 20,
"volumeMultiplierTiers": [{ "minVolume": 0, "multiplier": 1 }],
"volumeExponent": 0.5,
"pnlMultiplier": 1,
"entries": [
{ "rank": 1, "handle": "ada", "walletAddress": "0xabc…", "points": 120.5 }
],
"totalParticipants": 48,
"newAssetMarket": null
}Accounts that traded in the round come first, ordered by points descending. Accounts that did not trade come last. entries can hold only the top of the board. totalParticipants counts every account on the board, including any not in entries. newAssetMarket is a market list row or null. On a frozen board, that market’s status, isHalted, tradingStartsAt, and hasL2Market are current. Its other fields are as of the freeze. A halt updates isHalted on the next leaderboard_update without waiting for a trade.
How points are computed is on Competition.
| Status | code | Meaning |
|---|---|---|
404 | { "error": "No active competition round" }. No live round and no frozen board | |
500 | { "error": "Failed to fetch leaderboard" } |
Card
GET /api/leaderboard/card
Privy JWT. JPEG of the caller’s row.
| Status | code | Meaning |
|---|---|---|
401 | UNAUTHENTICATED | A missing, invalid, or expired Privy JWT, or a login token |
404 | { "error": "No competition leaderboard available" } or { "error": "You are not ranked in this competition" } | |
409 | { "error": "Leaderboard round data is unavailable" } | |
429 | RATE_LIMITED | Too many requests, or too many share cards, for this account. Retry after the Retry-After seconds |
503 | { "error": "Share cards are busy. Please try again shortly." }. Retry after the Retry-After seconds | |
500 | INTERNAL_ERROR | { "error": "Failed to authenticate request" }. Authentication failed on the server, not because of the JWT. Try again in a moment |
500 | { "error": "Failed to generate leaderboard card" } |