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:
Authorization: Bearer <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 -g 'https://host.name/api/v2/my/charts?filter[accountId]=5107&filter[startDate]=2022-01-01T00%3A00%3A00%2B00%3A00&filter[step]=Y' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains an array of objects providing the data for creating the Equity chart.
- accountId string
The account identifier.
- timestamp string
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
}
]
}