Get Candles and Indicators for a Security
Fetch candles and indicators for a particular security
Last updated
Fetch candles and indicators for a particular security
Last updated
This PUT endpoint enables you to retrieve candles and indicators for a particular security. This data includes price ranges, candles, and various other non-market data. It can de used to draw regular charts with various technical indicators.
There are four required parameters that must be provided in the request:
Et-App-Key (header). This is the unique key of your app that identifies your app when communicating with our service. Contact your administrator to get this key.
API version (path). Unless necessary, leave it at "1.0".
model (body). This is a JSON dictionary that contains information about the enquired security.
Here's an example of the request body with the information about the enquired security.
where:
Parameter
Description
Securities
This is an array with the enquired securities.
Symbol
This is the ticker symbol of the security under which it is listed on the exchange.
Exchange (optional)
This is the exchange on which the enquired security is listed.
Currency (optional)
This is the currency in which the enquired security is denominated. Possible values: "USD".
Id
StartDate
EndDate
CandlesCount
This is the number of reference points for the chart. For example, if this parameter is set to 5, that chart will be drawn using five values.
Period
This is the preferred time frame for the chart. Possible values:
"1m";
"2m";
"3m";
"5m";
"10m";
"15m";
"30m";
"1h";
"2h";
"4h";
"1D";
"1W";
"1M";
"3M";
"6M";
"1Y".
Interval
This is the required time period for the specified time period. Possible values:
Candles = 0,
All = -1,
YearToDate = -2,
Custom = -3,
Day1 = -4,
Week1 = -5,
Month1 = -6,
Month3 = -7,
Month6 = -8,
Year1 = -9,
Year3 = -10,
CustomCandles = -11,
Day3 = -12,
Today = -13
Offset
This is the number of data points by which the technical indicator will be offset.
IndicatorsHistorySettings
This is a string that contains information about the required technical indicator.
All parameters must be provided in the body JSON; otherwise the chart data will not be retrieved.
Here's the final template for this API request:
In response to this API request, you'll receive the chart data for the specified security. Some of the response data was omitted so as to preserve space.
where:
Parameter
Description
IsMarket
This field indicates if the candle is positioned during the regular trading hours. If so, the value will be set to true; if not, the value will be set to false.
Volume
This is the trading volume for the specified period.
OpenInterest
This is the total number of outstanding derivative contracts that have not been settled yet (only applicable for derivatives).
Time
This is the date and time (in ticks) at which this particular candle was registered.
DateTime
This is the date and time (in UTC time) at which this particular candle was registered.
Open
This is the opening price of the security.
Close
This is the closing price of the security.
High
This is the highest price point for the security during the specified time period.
Low
This is the lowest price point for the security during the specified time period.
Here are some of the common mistakes that developers make when attempting to retrieve trading data for a particular security.
If you specify the wrong Et-App-Key parameter or fail to include it in the header altogether, you'll get the following error:
Another common mistake when attempting to retrieve the chart data for a particular security is incorrectly structuring the request body. It's critical that you follow the template provided above and specify all of the required parameters. Otherwise you'll receive the 500 status code and the following error message:
The following article covers the syntax for this API request in detail.
Authorization (header). This is the authorization token from the very first .
This is the internal ID of the security in Autoshares Trader. You can retrieve this ID with .
This is the beginning of the period for which the data will be retrieved. The value must be provided in .
This is the end of the period for which the data will be retrieved. The value must be provided in .