Portfolio

Trader leaderboard series

GET
/leaderboard/series

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?|
interval?string

day (default): one point per UTC day, from/to are days. hour: one point per hour from from, from/to are timestamps, at most 31 days.

Value in"day""hour"
userId?string
Length1 <= length
externalId?string
Length1 <= length
username?string
Length1 <= length
walletAddress?string
Length1 <= length
categoryIds?array<>|

Limit the series to one category (a Category.id). At most 1.

Response Body

200

application/json
  1. response
userId*string

sufwan-local-test user id; null when no user was given (app-wide series).

from*string

First day of the series (UTC, inclusive); for interval=hour, the start timestamp (ISO-8601 UTC).

to*string

Last day of the series (UTC, inclusive), never after today; for interval=hour, the exclusive end timestamp, never after now.

totals*
points*array<>

One point per UTC day in [from, to] (or per hour in [from, to) for interval=hour), oldest first. Points without activity are 0.

Itemsitems <= 744
Example Request
curl -X GET 'https://api.t.sufwankhalid.com/leaderboard/series'
Example Response
{  "userId": "string",  "from": "string",  "to": "string",  "totals": {    "orders": 0,    "volume": 0,    "spent": 0,    "realizedPnl": 0,    "wins": 0,    "losses": 0,    "winRate": 0  },  "points": [    {      "day": "string",      "start": "string",      "orders": 0,      "volume": 0,      "spent": 0,      "realizedPnl": 0,      "cumulativeRealizedPnl": 0,      "wins": 0,      "losses": 0,      "winRate": 0,      "cumulativeWinRate": 0    }  ]}