[ API reference ]
Trader ranking
Returns a trader's overall, 24-hour, 7-day and 30-day leaderboard position and PnL.
GET
/api/users/{userId}/leaderboardThis endpoint requires an API key using X-API-Key or Bearer authorization.
01
Request
curl
curl "https://getfomoapi.fun/api/users/{userId}/leaderboard" \
-H "X-API-Key: YOUR_API_KEY"02
Parameters
NameLocationTypeDescription
userIdpathUUIDUnique trader ID returned by the resolve trader endpoint.03
Response fields
FieldTypeDescription
successbooleanIndicates whether the request succeeded.responseObject.idstringUnique trader identifier.responseObject.rankobjectOverall leaderboard rank and PnL.responseObject.rank24hobject24-hour leaderboard rank and PnL.responseObject.rank7dobject7-day leaderboard rank and PnL.responseObject.rank30dobject30-day leaderboard rank and PnL.responseObject.rankCampaignsobjectCampaign-specific leaderboard rankings.statusCodeintegerHTTP status represented in the response.04
JSON response
A successful request returns the following response structure.
response.json
{
"success": true,
"message": "Leaderboard ranking found",
"responseObject": {
"id": "6d8c0bf3-5d42-506c-a0ea-9e1e75ff38af",
"rank": {
"rank": 10,
"pnl": 125930.21
},
"rank24h": {
"rank": 3,
"pnl": 28440.12
},
"rank7d": {
"rank": 8,
"pnl": 98100.45
},
"rank30d": {
"rank": 12,
"pnl": 125930.21
},
"rankCampaigns": {}
},
"statusCode": 200
}Rate limits and retry
Pro keys allow 5 requests per second. On a 429 response, wait for the Retry-After value before retrying.