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.
- 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.
- Activate API
Once you're ready, click Activate API.
- 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.
Creating your first personal app
Manual authorization flow:
- In the API Centre, click Register a personal app.
- 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.
Authorizing your app to access the API
- In the personal applications page, click New manual authorization.
- Click Generate new token for manual authorization.
- A token is generated and appears in the authorization pop-up window. Click Copy token to copy it before clicking Close.
Use the token you copied to redeem it for an access token and the server or practice server URL using the following command:
https://login.questrade.com/oauth2/token?grant_type=refresh_token&refresh_token=
or
https://practicelogin.questrade.com/oauth2/token?grant_type=refresh_token&refresh_token=
Sample response:
{ “access_token”: “C3lTUKuNQrAAmSD/TPjuV/HI7aNrAwDp” , "token_type": "Bearer" , "expires_in": 300, "refresh_token": "aSBe7wAAdx88QTbwut0tiu3SYic3ox8F", "api_server": "https://api01.iq.questrade.com" }
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.
What's next?
Depending on your comfort level, you can either choose to explore Questrade's API methods directory to expand your knowledge.