Documentation
The Questrade API allows developers to create their own fully featured trading and analytical applications through their brokerage account.
GET markets/candles/:id
Retrieves historical market data in the form of OHLC candlesticks for a specified symbol.
This call is limited to returning 2,000 candlesticks in a single response.
Request parameters
Parameter | Type | Description |
---|---|---|
id | integer | Internal symbol identifier. Can occur in the ‘location’ header only. |
startTime | DateTime | Beginning of the candlestick range. |
endTime | DateTime | End of the candlestick range. |
interval | Enumeration | Interval of a single candlestick. See Historical Data Granularity for all allowed values. |
Response properties
Property | Type | Description |
---|---|---|
candles | Complex | List of Candle records. |
Candle | Complex | |
start | DateTime | Candlestick start timestamp (in ISO format). |
end | DateTime | Candlestick end timestamp (in ISO format). |
open | Double | Opening price. |
high | Double | High price. |
low | Double | Low price. |
close | Double | Closing price. |
volume | Integer | Trading volume. |
Sample request
GET https://api01.iq.questrade.com/v1/markets/candles/38738?startTime=2014-10-01T00:00:00-05:00&endTime=2014-10-20T23:59:59-05:00&interval=OneDay
Sample JSON response:
{ "candles": [ { "start": "2014-01-02T00:00:00.000000-05:00", "end": "2014-01-03T00:00:00.000000-05:00", "low": 70.3, "high": 70.78, "open": 70.68, "close": 70.73, "volume": 983609 }, ... ] }