The Questrade API allows developers to create their own fully featured trading and analytical applications trough their brokerate account.
Streaming services in Qiestrade API allows client applications to subscribe and receive push notifications on order status changes, executions and as well as subscribe to L1 market data and receive quotes in steaming mode.
Request notification port
Notifications endpoint does not accept JSON format messages. You can hardcode the mode as it’s unlikely you’ll change it within the same application.
Ports do not change on the same URL within the same day. On a different URL, however, they can be different.
You cannot connect to both RawSocket and WebSocket at the same time. When you create a second connection, it will disconnect the previous one.
- On RawSocket, within 5 seconds after the connection is established, send the access token and then ' ' as a delimiter (a space character)
- On WebSocket, send the access token as a message without any delimiters
Note: Do not use the word Bearer in sockets
If the token is recognized, the response message will be:
Notification response will include either:
Order Data structures (same as on GET orders endpoint) or
Execution Data structures (same as on GET executions endpoint)
Note: Executions always update orders so there cannot be executions without orders. Keeping a socket open does not extend your session. You need to send requests at least every 30 minutes otherwise your socket will get disconnected when the session expires.
Same as for notifications, you can use either WebSocket or RawSocket Ports for L1 are separate but still remain same for the same URL within the same day.
Note: If you use L1 Streaming in Trading API, then your market data will freeze in any other IQ Platform that you are using simultaneously.
You must specify stream=true (or '"stream": true' in JSON) and then the mode you want to use
true "RawSocket" "Call" 27426
true "RawSocket" 1 "Custom"27426
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
Start a free trial
Try out the features of your application in a simulated environment without affecting your real positions.Get Started