/accounts/{accountId}/equity-historyEquity of the account sampled once per minute, oldest first.
- The window is set by
timestampandduration; 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.
https://api.upscale.tradeParameters
accountIdstring · uuidrequiredTrader account identifier. Must belong to the caller.
00000000-0000-4000-8000-000000000000timestampnumberoptionalAnchor 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.
1767225599000durationnumberoptionalWindow 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.
-86400000Examples
curl --request GET 'https://api.upscale.trade/accounts/{accountId}/equity-history' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY'const response = await fetch("https://api.upscale.trade/accounts/{accountId}/equity-history", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
});
console.log(response.status, await response.text());import requests
response = requests.request(
"GET",
"https://api.upscale.trade/accounts/{accountId}/equity-history",
headers={"Accept":"application/json","Authorization":"Bearer YOUR_API_KEY"},
timeout=30,
)
print(response.status_code, response.text)Responses
200Responseapplication/json
Array of AccountsEquityHistoryResponse
timestampnumberrequiredMinute the sample belongs to, unix timestamp in milliseconds.
1767225599000volumestringrequiredAccount equity at that minute — balance plus unrealised pnl of open positions, fp9 raw.
10000000000000phaseIndexintegerrequiredTrading phase index the sample belongs to.
- minimum
- 0
- maximum
- 9007199254740991
1phaseStartEquitystringrequiredStarting equity of the sample trading phase, fp9 raw.
10000000000000[
{
"timestamp": 1767225599000,
"volume": "10000000000000",
"phaseIndex": 1,
"phaseStartEquity": "10000000000000"
}
]Unauthorized
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).
No account with this identifier.
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.