Upscale
Menu
On this page

Get the equity history of the trader account

Try it out ↓
GET/accounts/{accountId}/equity-history
Get the equity history of the trader accountAccounts

Equity of the account sampled once per minute, oldest first.

  • The window is set by timestamp and duration; with neither given it covers the last 5 days and ends with the live balance appended as the final point.
  • On a failed account the window is anchored to the moment the account failed, so the series never runs past it.
Base URL https://api.upscale.trade

Authorization

bearerhttp · bearerrequired

Personal API key, prefixed with usk_.

Parameters

Path
accountIdstring · uuidrequired

Trader account identifier. Must belong to the caller.

Example: 00000000-0000-4000-8000-000000000000
Query
timestampnumberoptional

Anchor of the window, unix timestamp in milliseconds. Omitted: the window ends at the current moment (or at the moment the account failed) and the live balance is appended as the last point.

Example: 1767225599000
durationnumberoptional

Window length in milliseconds, 5 days by default. Positive: the window starts at timestamp and spans forward. Negative: the window ends at timestamp (or now) and spans backward. Zero is rejected.

Example: -86400000

Examples

curl --request GET 'https://api.upscale.trade/accounts/{accountId}/equity-history' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Responses

200Responseapplication/json

Array of AccountsEquityHistoryResponse

timestampnumberrequired

Minute the sample belongs to, unix timestamp in milliseconds.

Example: 1767225599000
volumestringrequired

Account equity at that minute — balance plus unrealised pnl of open positions, fp9 raw.

Example: 10000000000000
phaseIndexintegerrequired

Trading phase index the sample belongs to.

minimum
0
maximum
9007199254740991
Example: 1
phaseStartEquitystringrequired

Starting equity of the sample trading phase, fp9 raw.

Example: 10000000000000
401

Unauthorized

403

The account belongs to another user (account_access_denied), or the request is authenticated with an API key while api_trading is disabled on the account (api_trading_not_enabled).

404

No account with this identifier.

429

Rate limit of the API key exceeded (api_key_rate_limit_exceeded). Retry-After says when to come back; the body carries the bucket (read / write), the window that tripped, its limit and retryAt.