{"format":"opendoc-document","version":1,"url":"https://docs.upscale.trade/developers/operations/getaccountequityhistory","title":"Get the equity history of the trader account","description":"GET /accounts/{accountId}/equity-history: Equity of the account sampled once per minute, oldest first. The window is set by timestamp and duration; with neither given it covers…","kind":"api-operation","locale":"en","inLanguage":"en","lastModified":"2026-09-28T19:22:49.100Z","revision":"25c86f549328fcff320805d5945f4c9804e3927950d831e601d6e3b18c170f66","section":{"title":"Developers","url":"https://docs.upscale.trade/developers"},"representations":{"html":"https://docs.upscale.trade/developers/operations/getaccountequityhistory","markdown":"https://docs.upscale.trade/developers/operations/getaccountequityhistory.md","json":"https://docs.upscale.trade/developers/operations/getaccountequityhistory.json"},"translations":{"en":"https://docs.upscale.trade/developers/operations/getaccountequityhistory","ru":"https://docs.upscale.trade/ru/developers/operations/getaccountequityhistory","es":"https://docs.upscale.trade/es/developers/operations/getaccountequityhistory"},"operation":{"id":"getAccountEquityHistory","method":"GET","path":"/accounts/{accountId}/equity-history","summary":"Get the equity history of the trader account","description":"Equity of the account sampled once per minute, oldest first.\n\n- 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.\n- On a failed account the window is anchored to the moment the account failed, so the series never runs past it.","tags":["Accounts"],"deprecated":false,"parameters":[{"name":"accountId","location":"path","schema":{"type":"string · uuid","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid"},"properties":[],"variants":[]},"type":"string · uuid","required":true,"description":"Trader account identifier. Must belong to the caller.","example":"00000000-0000-4000-8000-000000000000"},{"name":"timestamp","location":"query","schema":{"type":"number","types":["number"],"example":1767225599000,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"number","required":false,"description":"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"},{"name":"duration","location":"query","schema":{"type":"number","types":["number"],"example":-86400000,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"number","required":false,"description":"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"}],"bodies":[],"responses":[{"status":"200","description":"Response","mediaType":"application/json","properties":[],"schema":{"type":"object[]","types":["array"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"reference":"#/components/schemas/AccountsEquityHistoryResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"timestamp","type":"number","required":true,"description":"Minute the sample belongs to, unix timestamp in milliseconds.","example":"1767225599000","schema":{"type":"number","types":["number"],"description":"Minute the sample belongs to, unix timestamp in milliseconds.","example":1767225599000,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"volume","type":"string","required":true,"description":"Account equity at that minute — balance plus unrealised pnl of open positions, fp9 raw.","example":"10000000000000","schema":{"type":"string","types":["string"],"description":"Account equity at that minute — balance plus unrealised pnl of open positions, fp9 raw.","example":"10000000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"phaseIndex","type":"integer","required":true,"description":"Trading phase index the sample belongs to.","example":"1","schema":{"type":"integer","types":["integer"],"description":"Trading phase index the sample belongs to.","example":1,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":0,"maximum":9007199254740991},"properties":[],"variants":[]}},{"name":"phaseStartEquity","type":"string","required":true,"description":"Starting equity of the sample trading phase, fp9 raw.","example":"10000000000000","schema":{"type":"string","types":["string"],"description":"Starting equity of the sample trading phase, fp9 raw.","example":"10000000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"variants":[]},"example":"[\n  {\n    \"timestamp\": 1767225599000,\n    \"volume\": \"10000000000000\",\n    \"phaseIndex\": 1,\n    \"phaseStartEquity\": \"10000000000000\"\n  }\n]","headers":[]},{"status":"401","description":"Unauthorized","properties":[],"headers":[]},{"status":"403","description":"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`).","properties":[],"headers":[]},{"status":"404","description":"No account with this identifier.","properties":[],"headers":[]},{"status":"429","description":"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`.","properties":[],"headers":[]}],"security":[{"name":"bearer","type":"http · bearer","description":"Personal API key, prefixed with `usk_`.","required":true,"scopes":[]}],"codeSamples":[{"label":"cURL","language":"bash","source":"curl --request GET 'https://api.upscale.trade/accounts/{accountId}/equity-history' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'"},{"label":"JavaScript","language":"javascript","source":"const response = await fetch(\"https://api.upscale.trade/accounts/{accountId}/equity-history\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\"\n  },\n});\nconsole.log(response.status, await response.text());"},{"label":"Python","language":"python","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.upscale.trade/accounts/{accountId}/equity-history\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)"}]},"breadcrumbs":[{"title":"What is Prop Trading","url":"https://docs.upscale.trade"},{"title":"Developers","url":"https://docs.upscale.trade/developers"},{"title":"Get the equity history of the trader account","url":"https://docs.upscale.trade/developers/operations/getaccountequityhistory"}],"headings":[{"depth":2,"id":"authorization","title":"Authorization"},{"depth":2,"id":"parameters","title":"Parameters"},{"depth":2,"id":"examples","title":"Examples"},{"depth":2,"id":"responses","title":"Responses"}],"markdown":"# Get the equity history of the trader account\n\n`GET /accounts/{accountId}/equity-history`\n\nEquity of the account sampled once per minute, oldest first.\n\n- 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.\n- On a failed account the window is anchored to the moment the account failed, so the series never runs past it.\n\n## Authorization\n\nbearer: http · bearer (required). Personal API key, prefixed with `usk_`.\n\n## Parameters\n\n- path: accountId (string · uuid; required). Trader account identifier. Must belong to the caller.\n\nType: string · uuid\n\nformat: uuid\n\n- query: timestamp (number; optional). 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.\n\nType: number\n\nExample: 1767225599000\n\n- query: duration (number; optional). 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.\n\nType: number\n\nExample: -86400000\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.upscale.trade/accounts/{accountId}/equity-history' \\\n  --header 'Accept: application/json' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n```\n\n## Example · JavaScript\n\n```javascript\nconst response = await fetch(\"https://api.upscale.trade/accounts/{accountId}/equity-history\", {\n  method: \"GET\",\n  headers: {\n    \"Accept\": \"application/json\",\n    \"Authorization\": \"Bearer YOUR_API_KEY\"\n  },\n});\nconsole.log(response.status, await response.text());\n```\n\n## Example · Python\n\n```python\nimport requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://api.upscale.trade/accounts/{accountId}/equity-history\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\n```\n\n## Response 200 · AccountsEquityHistoryResponse\n\n**200** application/json — Response\n\nType: object[]\n\n[]Schema: AccountsEquityHistoryResponse\n\n[]Type: object\n\n[]Required fields: timestamp, volume, phaseIndex, phaseStartEquity\n\n[]Required field types: timestamp (number; required), volume (string; required), phaseIndex (integer; required), phaseStartEquity (string; required)\n\n- []timestamp (number; required)\n\n[]timestamp example: 1767225599000\n\n[]timestamp.Type: number\n\n[]timestamp.Minute the sample belongs to, unix timestamp in milliseconds.\n\n- []volume (string; required)\n\n[]volume example: 10000000000000\n\n[]volume.Type: string\n\n[]volume.Account equity at that minute — balance plus unrealised pnl of open positions, fp9 raw.\n\n- []phaseIndex (integer; required)\n\n[]phaseIndex example: 1\n\n[]phaseIndex.Type: integer\n\n[]phaseIndex.Trading phase index the sample belongs to.\n\n[]phaseIndex.minimum: 0\n\n[]phaseIndex.maximum: 9007199254740991\n\n- []phaseStartEquity (string; required)\n\n[]phaseStartEquity example: 10000000000000\n\n[]phaseStartEquity.Type: string\n\n[]phaseStartEquity.Starting equity of the sample trading phase, fp9 raw.\n\nExample\n\n\n\n```json\n[\n  {\n    \"timestamp\": 1767225599000,\n    \"volume\": \"10000000000000\",\n    \"phaseIndex\": 1,\n    \"phaseStartEquity\": \"10000000000000\"\n  }\n]\n```\n\n## Response 401\n\n**401**  — Unauthorized\n\n## Response 403\n\n**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`).\n\n## Response 404\n\n**404**  — No account with this identifier.\n\n## Response 429\n\n**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`.","text":"Get the equity history of the trader account 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. GET /accounts/{accountId}/equity-history Accounts accountId Trader account identifier. Must belong to the caller. string · uuid timestamp 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. number duration 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. number 200 Response 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`.","api":{"title":"Upscale Public API","version":"d796ac9","documentation":"https://docs.upscale.trade/developers","playgroundServer":"https://api.upscale.trade"}}