Portfolio

Trader leaderboard

GET
/leaderboard

Authorization

appId
headerx-app-id<token>

Your application ID. Required on app-tier and user-tier routes. Omitted on routes that authenticate with x-app-api-key only.

Query Parameters

from?|
to?|
metric?string
Value in"realizedPnl""volume"
limit?integer
Range1 <= value <= 100
cursor?string
Lengthlength <= 200
userId?string
Length1 <= length
externalId?string
Length1 <= length
username?string
Length1 <= length
walletAddress?string
Length1 <= length
categoryIds?array<>|

Rank within one category (a Category.id, as /venue-events?categoryIds= takes). Includes its sub-categories: football covers NFL games. At most 1.

venueEventIds?array<>|

Rank traders on these events. Each id is expanded to the same event on every venue. At most 5. Cannot be combined with categoryIds, from or to.

userIds?array<>|

Return only these users' rows (sufwan-local-test user ids), unpaginated. At most 100, or 20 with a timestamp from/to. Requested users with no stats in the slice are omitted (the single-user lookups return a zero row instead). Cannot be combined with the single-user lookups or cursor.

Response Body

200

application/json
  1. response
data*array<>

This page of results.

nextCursor*string

Pass as cursor to fetch the next page; null on the last page.

hasMore*boolean

true when another page exists.

Example Request
curl -X GET 'https://api.t.sufwankhalid.com/leaderboard'
Example Response
{  "data": [    {      "rank": 1,      "userId": "string",      "username": "string",      "avatarUrl": "string",      "walletAddress": "string",      "orders": 0,      "volume": 0,      "spent": 0,      "realizedPnl": 0,      "wins": 0,      "losses": 0,      "winRate": 0    }  ],  "nextCursor": "string",  "hasMore": true}