Charts
Use this method to get the data for creating the Equity charts for client trading accounts.
GET[host]/api/v2/my/charts |
Get charts data
Use this method to get the data for creating the Equity charts for client trading accounts.
Request
Header parameters:
accept-language: <string>
Accept: application/json
Authorization: Bearer <access_token>
Query parameters:
The following filter parameters are available for this method:
- accountId
The identifier of a trading account for which you want to get data.
- startDate
The start date and time for which you want to get data.
- step
A period for tracking the movement of data points with the data recorded at regular intervals. Possible values:
Y
— yearm
— monthd
— dayH
— hour
Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.
GET[host]/api/v2/my/charts
curl --location --request GET 'https://host.name/api/v2/my/charts?filter[accountId]=5107&filter[startDate]=2022-01-01T00%3A00%3A00%2B00%3A00&filter[step]=Y' \
--header 'accept-language: <string>' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of objects providing the data for creating the Equity chart.
- accountId integer
The account identifier.
- timestamp integer
The timestamp used to provide the data for the time scale.
- point string
The data point corresponding to a timestamp.
{
"accountId": 5107,
"data": [
{
"timestamp": 1670234400,
"point": "6.000000000000000000"
},
{
"timestamp": 1670238000,
"point": "5.997410950000000000"
}
]
}