{"format":"opendoc-document","version":1,"url":"https://docs.upscale.trade/developers/operations/getchartevents","title":"Get position events for chart indicators by ticker","description":"GET /positions/{accountId}/{asset}/chart-events: Position events of the account on one market inside a time range, newest first — the markers a chart draws.","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/getchartevents","markdown":"https://docs.upscale.trade/developers/operations/getchartevents.md","json":"https://docs.upscale.trade/developers/operations/getchartevents.json"},"translations":{"en":"https://docs.upscale.trade/developers/operations/getchartevents","ru":"https://docs.upscale.trade/ru/developers/operations/getchartevents","es":"https://docs.upscale.trade/es/developers/operations/getchartevents"},"operation":{"id":"getChartEvents","method":"GET","path":"/positions/{accountId}/{asset}/chart-events","summary":"Get position events for chart indicators by ticker","description":"Position events of the account on one market inside a time range, newest first — the markers a chart draws.\n\n- Only increases, closes, force closes and liquidations are returned; funding and margin changes are not chart events.\n- The range is given in whole seconds through `executedFrom` and `executedTo`, both inclusive.\n- Limited to the phase the account is currently in.","tags":["Trading"],"deprecated":false,"parameters":[{"name":"accountId","location":"path","schema":{"type":"string · uuid","types":["string"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"properties":[],"variants":[]},"type":"string · uuid","required":true,"description":"Trader account identifier. Must belong to the caller.","example":"00000000-0000-4000-8000-000000000000"},{"name":"asset","location":"path","schema":{"type":"string","types":["string"],"example":"BTC","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minLength":1},"properties":[],"variants":[]},"type":"string","required":true,"description":"Base asset ticker of the market, as returned by `GET /v2/markets`.","example":"BTC"},{"name":"executedFrom","location":"query","schema":{"type":"number","types":["number"],"example":1735689600,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"number","required":true,"description":"Executed from, unix timestamp in seconds (inclusive)","example":"1735689600"},{"name":"executedTo","location":"query","schema":{"type":"number","types":["number"],"example":1767225599,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]},"type":"number","required":true,"description":"Executed to, unix timestamp in seconds (inclusive)","example":"1767225599"},{"name":"limit","location":"query","schema":{"type":"integer","types":["integer"],"example":20,"default":20,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":1,"maximum":1000},"properties":[],"variants":[]},"type":"integer","required":false,"description":"Page size: how many events to return.","example":"20"},{"name":"offset","location":"query","schema":{"type":"integer","types":["integer"],"example":0,"default":0,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"minimum":0,"maximum":9007199254740991},"properties":[],"variants":[]},"type":"integer","required":false,"description":"How many events to skip before the page.","example":"0"}],"bodies":[],"responses":[{"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, or no market for this ticker.","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":[]},{"status":"default","description":"Response","mediaType":"application/json","properties":[{"name":"data","type":"object[]","required":true,"description":"Requested page of chart markers, newest first.","example":"[\n  {\n    \"asset\": \"BTC\",\n    \"direction\": \"long\",\n    \"eventName\": \"open\",\n    \"executedAt\": 1767225599,\n    \"price\": \"1000000000\",\n    \"size\": \"1000000000\"\n  }\n]","schema":{"type":"object[]","types":["array"],"description":"Requested page of chart markers, newest first.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"title":"ChartEventResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"asset","type":"string","required":true,"description":"Base asset ticker of the market the event happened on.","example":"BTC","schema":{"type":"string","types":["string"],"description":"Base asset ticker of the market the event happened on.","example":"BTC","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"description":"Direction of the position the event belongs to.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Direction of the position the event belongs to.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"eventName","type":"string · enum","required":true,"description":"What the marker stands for: `open` for the first increase of a position, `increase` for later ones, `decrease` for a partial close, `close` for a full one and `liquidation` for a liquidation.","example":"open","schema":{"type":"string · enum","types":["string"],"description":"What the marker stands for: `open` for the first increase of a position, `increase` for later ones, `decrease` for a partial close, `close` for a full one and `liquidation` for a liquidation.","enum":["open","increase","decrease","close","liquidation"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"executedAt","type":"number","required":true,"description":"When the event happened, unix timestamp in seconds.","example":"1767225599","schema":{"type":"number","types":["number"],"description":"When the event happened, unix timestamp in seconds.","example":1767225599,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"price","type":"string · int32","required":true,"description":"Price the event executed at, fp9 raw — exchanged quote over exchanged base.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Price the event executed at, fp9 raw — exchanged quote over exchanged base.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"size","type":"string · int32","required":true,"description":"Absolute size the event moved, in base asset units, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Absolute size the event moved, in base asset units, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}}],"variants":[]},"variants":[]}},{"name":"totalCount","type":"number","required":true,"description":"Total number of events in the requested range, across all pages.","example":"0","schema":{"type":"number","types":["number"],"description":"Total number of events in the requested range, across all pages.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"schema":{"type":"object","types":["object"],"reference":"#/components/schemas/ChartEventsPaginatedResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"data","type":"object[]","required":true,"description":"Requested page of chart markers, newest first.","example":"[\n  {\n    \"asset\": \"BTC\",\n    \"direction\": \"long\",\n    \"eventName\": \"open\",\n    \"executedAt\": 1767225599,\n    \"price\": \"1000000000\",\n    \"size\": \"1000000000\"\n  }\n]","schema":{"type":"object[]","types":["array"],"description":"Requested page of chart markers, newest first.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"items":{"type":"object","types":["object"],"title":"ChartEventResponse","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[{"name":"asset","type":"string","required":true,"description":"Base asset ticker of the market the event happened on.","example":"BTC","schema":{"type":"string","types":["string"],"description":"Base asset ticker of the market the event happened on.","example":"BTC","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"direction","type":"string · enum","required":true,"description":"Direction of the position the event belongs to.","example":"long","schema":{"type":"string · enum","types":["string"],"description":"Direction of the position the event belongs to.","enum":["long","short"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"eventName","type":"string · enum","required":true,"description":"What the marker stands for: `open` for the first increase of a position, `increase` for later ones, `decrease` for a partial close, `close` for a full one and `liquidation` for a liquidation.","example":"open","schema":{"type":"string · enum","types":["string"],"description":"What the marker stands for: `open` for the first increase of a position, `increase` for later ones, `decrease` for a partial close, `close` for a full one and `liquidation` for a liquidation.","enum":["open","increase","decrease","close","liquidation"],"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"executedAt","type":"number","required":true,"description":"When the event happened, unix timestamp in seconds.","example":"1767225599","schema":{"type":"number","types":["number"],"description":"When the event happened, unix timestamp in seconds.","example":1767225599,"nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}},{"name":"price","type":"string · int32","required":true,"description":"Price the event executed at, fp9 raw — exchanged quote over exchanged base.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Price the event executed at, fp9 raw — exchanged quote over exchanged base.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}},{"name":"size","type":"string · int32","required":true,"description":"Absolute size the event moved, in base asset units, fp9 raw.","example":"1000000000","schema":{"type":"string · int32","types":["string"],"description":"Absolute size the event moved, in base asset units, fp9 raw.","example":"1000000000","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{"format":"int32","pattern":"^(?:-?[1-9][0-9]*|0)$"},"properties":[],"variants":[]}}],"variants":[]},"variants":[]}},{"name":"totalCount","type":"number","required":true,"description":"Total number of events in the requested range, across all pages.","example":"0","schema":{"type":"number","types":["number"],"description":"Total number of events in the requested range, across all pages.","nullable":false,"readOnly":false,"writeOnly":false,"constraints":{},"properties":[],"variants":[]}}],"variants":[]},"example":"{\n  \"data\": [\n    {\n      \"asset\": \"BTC\",\n      \"direction\": \"long\",\n      \"eventName\": \"open\",\n      \"executedAt\": 1767225599,\n      \"price\": \"1000000000\",\n      \"size\": \"1000000000\"\n    }\n  ],\n  \"totalCount\": 0\n}","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/positions/{accountId}/{asset}/chart-events' \\\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/positions/{accountId}/{asset}/chart-events\", {\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/positions/{accountId}/{asset}/chart-events\",\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 position events for chart indicators by ticker","url":"https://docs.upscale.trade/developers/operations/getchartevents"}],"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 position events for chart indicators by ticker\n\n`GET /positions/{accountId}/{asset}/chart-events`\n\nPosition events of the account on one market inside a time range, newest first — the markers a chart draws.\n\n- Only increases, closes, force closes and liquidations are returned; funding and margin changes are not chart events.\n- The range is given in whole seconds through `executedFrom` and `executedTo`, both inclusive.\n- Limited to the phase the account is currently in.\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\npattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$\n\n- path: asset (string; required). Base asset ticker of the market, as returned by `GET /v2/markets`.\n\nType: string\n\nExample: \"BTC\"\n\nminLength: 1\n\n- query: executedFrom (number; required). Executed from, unix timestamp in seconds (inclusive)\n\nType: number\n\nExample: 1735689600\n\n- query: executedTo (number; required). Executed to, unix timestamp in seconds (inclusive)\n\nType: number\n\nExample: 1767225599\n\n- query: limit (integer; optional). Page size: how many events to return.\n\nType: integer\n\nExample: 20\n\nDefault: 20\n\nminimum: 1\n\nmaximum: 1000\n\n- query: offset (integer; optional). How many events to skip before the page.\n\nType: integer\n\nExample: 0\n\nDefault: 0\n\nminimum: 0\n\nmaximum: 9007199254740991\n\n## Example · cURL\n\n```bash\ncurl --request GET 'https://api.upscale.trade/positions/{accountId}/{asset}/chart-events' \\\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/positions/{accountId}/{asset}/chart-events\", {\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/positions/{accountId}/{asset}/chart-events\",\n    headers={\"Accept\":\"application/json\",\"Authorization\":\"Bearer YOUR_API_KEY\"},\n    timeout=30,\n)\nprint(response.status_code, response.text)\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, or no market for this ticker.\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`.\n\n## Response default · ChartEventsPaginatedResponse\n\n**default** application/json — Response\n\nSchema: ChartEventsPaginatedResponse\n\nType: object\n\nRequired fields: data, totalCount\n\nRequired field types: data (object[]; required), totalCount (number; required)\n\n- data (object[]; required)\n\ndata example: [\n  {\n    \"asset\": \"BTC\",\n    \"direction\": \"long\",\n    \"eventName\": \"open\",\n    \"executedAt\": 1767225599,\n    \"price\": \"1000000000\",\n    \"size\": \"1000000000\"\n  }\n]\n\ndata.Type: object[]\n\ndata.Requested page of chart markers, newest first.\n\ndata.[]Type: object\n\ndata.[]Required fields: asset, direction, eventName, executedAt, price, size\n\ndata.[]Required field types: asset (string; required), direction (string · enum; required), eventName (string · enum; required), executedAt (number; required), price (string · int32; required), size (string · int32; required)\n\n- data.[]asset (string; required)\n\ndata.[]asset example: BTC\n\ndata.[]asset.Type: string\n\ndata.[]asset.Base asset ticker of the market the event happened on.\n\n- data.[]direction (string · enum; required)\n\ndata.[]direction example: long\n\ndata.[]direction.Type: string · enum\n\ndata.[]direction.Direction of the position the event belongs to.\n\ndata.[]direction.Allowed values: [\"long\",\"short\"]\n\n- data.[]eventName (string · enum; required)\n\ndata.[]eventName example: open\n\ndata.[]eventName.Type: string · enum\n\ndata.[]eventName.What the marker stands for: `open` for the first increase of a position, `increase` for later ones, `decrease` for a partial close, `close` for a full one and `liquidation` for a liquidation.\n\ndata.[]eventName.Allowed values: [\"open\",\"increase\",\"decrease\",\"close\",\"liquidation\"]\n\n- data.[]executedAt (number; required)\n\ndata.[]executedAt example: 1767225599\n\ndata.[]executedAt.Type: number\n\ndata.[]executedAt.When the event happened, unix timestamp in seconds.\n\n- data.[]price (string · int32; required)\n\ndata.[]price example: 1000000000\n\ndata.[]price.Type: string · int32\n\ndata.[]price.Price the event executed at, fp9 raw — exchanged quote over exchanged base.\n\ndata.[]price.format: int32\n\ndata.[]price.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- data.[]size (string · int32; required)\n\ndata.[]size example: 1000000000\n\ndata.[]size.Type: string · int32\n\ndata.[]size.Absolute size the event moved, in base asset units, fp9 raw.\n\ndata.[]size.format: int32\n\ndata.[]size.pattern: ^(?:-?[1-9][0-9]*|0)$\n\n- totalCount (number; required)\n\ntotalCount example: 0\n\ntotalCount.Type: number\n\ntotalCount.Total number of events in the requested range, across all pages.\n\nExample\n\n\n\n```json\n{\n  \"data\": [\n    {\n      \"asset\": \"BTC\",\n      \"direction\": \"long\",\n      \"eventName\": \"open\",\n      \"executedAt\": 1767225599,\n      \"price\": \"1000000000\",\n      \"size\": \"1000000000\"\n    }\n  ],\n  \"totalCount\": 0\n}\n```","text":"Get position events for chart indicators by ticker Position events of the account on one market inside a time range, newest first — the markers a chart draws. - Only increases, closes, force closes and liquidations are returned; funding and margin changes are not chart events. - The range is given in whole seconds through `executedFrom` and `executedTo`, both inclusive. - Limited to the phase the account is currently in. GET /positions/{accountId}/{asset}/chart-events Trading accountId Trader account identifier. Must belong to the caller. string · uuid asset Base asset ticker of the market, as returned by `GET /v2/markets`. string executedFrom Executed from, unix timestamp in seconds (inclusive) number executedTo Executed to, unix timestamp in seconds (inclusive) number limit Page size: how many events to return. integer offset How many events to skip before the page. integer 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, or no market for this ticker. 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`. default Response data Requested page of chart markers, newest first. object[] totalCount Total number of events in the requested range, across all pages. number","api":{"title":"Upscale Public API","version":"d796ac9","documentation":"https://docs.upscale.trade/developers","playgroundServer":"https://api.upscale.trade"}}