New and existing clients get up to $1,000 bonus at Questrade. New clients use code GET1000. Learn more.

(opens in a new tab)

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

Request parameters
ParameteridTypeintegerDescriptionInternal symbol identifier. Can occur in the ‘location’ header only.
ParameterstartTimeTypeDateTimeDescriptionBeginning of the candlestick range.
ParameterendTimeTypeDateTimeDescriptionEnd of the candlestick range.
ParameterintervalTypeEnumerationDescriptionInterval of a single candlestick. See Historical Data Granularity for all allowed values.

Response properties

Response properties
PropertycandlesTypeComplexDescriptionList of Candle records.
PropertyNested property, level 2. CandleTypeComplexDescription
PropertyNested property, level 3. startTypeDateTimeDescriptionCandlestick start timestamp (in ISO format).
PropertyNested property, level 3. endTypeDateTimeDescriptionCandlestick end timestamp (in ISO format).
PropertyNested property, level 3. openTypeDoubleDescriptionOpening price.
PropertyNested property, level 3. highTypeDoubleDescriptionHigh price.
PropertyNested property, level 3. lowTypeDoubleDescriptionLow price.
PropertyNested property, level 3. closeTypeDoubleDescriptionClosing price.
PropertyNested property, level 3. volumeTypeIntegerDescriptionTrading volume.

Sample request

HTTP
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:

JSON
{
     "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
         },
              ...
      ]
 }

Already a Questrade client?

Create your first application using your Questrade account.

Integrate your application with Questrade API

Support

Report an issue

Have questions about Questrade's API? Tell us how we can help, send us an email.

Request a feature

We want your ideas on how we can improve our API. If you have a suggestion for a minor tweak, a major overhaul, or something brand new, please share it with us.

If you are using an api app developed by a third party, you are required to read, understand and accept the end-user license agreement for application program interface. If you are utilizing api access for an api-enabled app you built, you are required to read, understand and accept the Questrade personal application program interface ("api") license agreement ("license agreement"). This agreement can be found below. You may be bound by both agreements.

See All