Coming soon. The Rewards API is not yet live. This documentation is a preview of what’s coming.
REST API for querying user rewards, Flashpoints, and leaderboard data.
Base URL
https://rewards.flashnet.xyz
Rewards
Get User Summary
Returns current balance, TWAB, 24h volume, rewards bracket, and projected rewards.
Response:
{
"pubkey": "02abc...def",
"balance": {
"raw": 10000000000,
"usdb": 10000.00
},
"twab": {
"today": {
"raw": 9500000000,
"usdb": 9500.00
}
},
"volume24h": {
"sats": 5000000,
"swapCount": 12
},
"apyBracket": 3,
"rewardsPercent": 5.0,
"satsPerDay": 1370
}
Rewards Brackets:
| Bracket | Volume Threshold | APY |
|---|
| 0 | $0 | 3.5% |
| 1 | $500 | 4.0% |
| 2 | $2,500 | 4.5% |
| 3 | $5,000 | 5.0% |
| 4 | $10,000 | 5.5% |
| 5 | $25,000 | 6.0% |
Get Payout History
Returns paginated list of rewards payouts for a user.
GET /rewards/:pubkey/payouts?limit=30&offset=0
Response:
{
"pubkey": "02abc...def",
"payouts": [
{
"day": "2025-12-29",
"twab": { "raw": 10000000000, "usdb": 10000.00 },
"volumeSats": 5000000,
"apyBracket": 3,
"rewardsBps": 500,
"payoutSats": 1370,
"status": "paid",
"txId": "abc123...",
"paidAt": "2025-12-30T00:05:00Z"
}
],
"pagination": { "total": 45, "limit": 30, "offset": 0 }
}
Leaderboard
Get Leaderboard
Returns ranked users by balance, volume, or points.
GET /leaderboard?limit=100&sortBy=balance
Parameters:
limit - Max results (default 100, max 500)
sortBy - balance, volume, or points
Response:
{
"leaderboard": [
{
"rank": 1,
"pubkey": "02abc...def",
"balance": { "raw": 150000000000, "usdb": 150000.00 },
"volume24h": { "sats": 25000000, "swapCount": 42 },
"apyBracket": 5,
"rewardsPercent": 6.0,
"satsPerDay": 24657,
"points": 4500000
}
],
"meta": { "total": 830, "limit": 100, "sortBy": "balance" }
}
Get User Rank
Returns a specific user’s rank and stats.
GET /leaderboard/rank/:pubkey
Response:
{
"pubkey": "02abc...def",
"found": true,
"balance": {
"raw": 10000000000,
"usdb": 10000.00,
"rank": 42,
"percentile": 95
},
"volume24h": { "sats": 5000000, "swapCount": 12, "rank": 28 },
"apyBracket": 3,
"rewardsPercent": 5.0,
"satsPerDay": 1370,
"points": 1250000,
"totalUsers": 830
}
Stats
Get Global Stats
Returns system-wide statistics.
Response:
{
"usdb": {
"totalHolders": 830,
"totalBalanceUsdb": 2500000.00
},
"volume24h": {
"activeTraders": 145,
"totalVolumeSats": 850000000,
"totalSwaps": 2340
},
"payouts": {
"pendingCount": 12,
"pendingSats": 140000,
"totalPaidSats": 5000000
}
}
Health Check
Response:
{
"status": "healthy",
"lastSyncAt": "2025-12-30T12:34:56Z",
"lastSyncAgeMs": 15000,
"errors": 0
}
Error Handling
All errors return a consistent format:
{
"error": {
"code": "NOT_FOUND",
"message": "User not found"
}
}