v1

latestOpenAPI 3.0.12026-07-26171200932.8 KB
User Stats

Get investor gain time-series

Rate limit: 60 requests per 60 seconds. This is the default shared quota — it is shared with every other endpoint that has no dedicated limit, so requests across those endpoints all draw from the same budget.


Returns a gain time-series scoped by date range, count, or a combination of one date and a count. Gain values are decimal fractions: 0.06 = 6%, -0.03 = -3%.

get/api/v2/portfolios/{username}/gain/{granularity}

Path parameters

usernamestring required
granularity'daily' | 'monthly' | 'yearly' required

Query parameters

minDatestring date
maxDatestring date
countinteger

Headers

x-request-idstring uuid required
Example:bd5e1d93-4e82-44f5-8378-aa11212aad64

A unique request identifier.

x-api-keystring password required
Example:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

API key for authentication.

x-user-keystring password required
Example:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

User-specific authentication key.

Response

Successful response

usernamestring required
granularity'daily' | 'monthly' | 'yearly' required
totalGainnumber nullable

Compound gain over the returned series as a decimal fraction. Null when gains is empty.