Young man smiling

Documentation

The Questrade API allows developers to create their own fully featured trading and analytical applications through their brokerage account.

Getting started

What can I do with the Questrade API

The Questrade API enables you to develop live or practice applications that can access your account data and retrieve market data. If you are a Questrade partner developer, you can also use the API to place trades.

If you're interested in partnering with Questrade as a company or a developer, email us at apisupport@questrade.com with details about your platform.

Activating IQ API centre

Using your login credentials, log in to Questrade.

  1. API welcome page

    In the top right corner where you see your login name, select API centre from the drop-down menu. You will be redirected to the API welcome page providing you with more information about the API.

  2. Activate API

    Once you're ready, click Activate API.

  3. API access agreement

    The API access agreement appears. You need to read and agree to the terms listed in the agreement to proceed. After clicking Agree, you will be one step closer to getting access to Questrade's API.

If you disagree to the terms, access to Questrade API will be denied.

Creating your first personal app

Manual authorization flow:

  1. In the API Centre, click Register a personal app.
  2. In the create personal app section, under basic information, enter a name for your application including a brief description and click Save. The personal app is visible under personal applications.
Questrade uses the OAuth 2.0 authorization framework for the APIs. We recommend that you familiarize yourself with this framework before proceeding.

Authorizing your app to access the API

  1. In the personal applications page, click New manual authorization.
  2. Click Generate new token for manual authorization.
  3. A token is generated and appears in the authorization pop-up window. Click Copy token to copy it before clicking Close.
  4. For security reasons, Questrade does not store the token information in a decrypted format after it is presented. If you forget to copy the token, you must generate a new token, or follow the revoke authorization process. The generated tokens have a limited time span and expire in 7 days from the date and time the token is generated. The time to expiry can be reviewed from the authorization section on the personal applications page.
  5. Use the token you copied to redeem it for an access token and the server or practice server URL using the following command:

    or

    Sample response:

     
         {
           “access_token”: “C3lTUKuNQrAAmSD/TPjuV/HI7aNrAwDp”  ,
           "token_type": "Bearer" ,
            "expires_in": 300,
           "refresh_token": "aSBe7wAAdx88QTbwut0tiu3SYic3ox8F",
            "api_server": "https://api01.iq.questrade.com"
         }           
             
  6. Attempt your first API call. Use the access token and server URL with the following command to make an authorized call:

    Sample request command:

     
    GET /v1/accounts HTTP/1.1
    Host: https://api01.iq.questrade.com
    Authorization: Bearer C3lTUKuNQrAAmSD/TPjuV/HI7aNrAwDp
    

    Sample response:

      {
    	"accounts": [
    		{
    		    "type": "Margin"
                "number":"26598145",
    		    "status": "Active",
    		    "isPrimary": true,
    		    "isBilling": true,
    		    "clientAccountType: "Individual"
    		},
    		...
    	],
    	"userId": 3000124
    }   
       

That’s it! You are now ready to start making requests to Questrade’s IQ platform using your personal access token.

While you are getting accustomed to Questrade's API, you can control API access by going to Security settings in the API centre and setting the General API access option to On or Off as per your preference.

What's next?

Depending on your comfort level, you can either choose to explore Questrade's API methods directory to expand your knowledge.

Downloads

C plus plus

C ++

Dec 18, 2015Version 1.1.0
Release notesDownload API
C sharp

C #/Active X

Dec 18, 2015Version 1.1.0
Release notesDownload API

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.

Get Started

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.

Get Started
See All