Quick answer
Questrade’s REST API gives Canadian investors accounts, positions, balances, quotes, candles and option chains for Canadian and US listings. You generate a manual refresh token in the App Hub; each refresh returns a new access token, a new refresh token and the API server to call. Order placement is restricted to approved partner apps, so personal scripts are mostly read-only.
Questrade API at a glance
- Pricing
- API free; order placement limited to partner apps
- Availability
- Canadian residents
- Paper trading
- Practice account
- Integration type
- OAuth login
- In AlgoGP
- Design and backtest in AlgoGP, connect the exported code
- Auth
- OAuth2; manual refresh token from the App Hub
- Rotation
- Each refresh invalidates the old refresh token
- Orders
- Partner apps only; personal apps read data
- Practice
- Practice account via
practicelogin.questrade.com
Handling rotating refresh tokens
Call https://login.questrade.com/oauth2/token?grant_type=refresh_token&refresh_token=…. The response includes access_token, a new refresh_token and api_server. Persist the new refresh token immediately, or the next run fails and you must generate one again in the App Hub.
Build a Questrade strategy with AlgoGP
AlgoGP does not connect to Questrade natively yet. Questrade authenticates with a browser OAuth login and refreshable tokens, so it needs a one-time manual login step that generated code cannot do on its own.
- 1
Design and backtest in AlgoGP
Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.
- 2
Export the Python project
Every project exports
strategy.py,market_data.py,brokers.pyandlive.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format. - 3
Plug in Questrade
Implement the four adapter methods (
account,positions,submit_market_orderand a candle fetcher) with Questrade’s SDK, or keep a built-in platform for paper trading and add Questrade when you go live.
Built-in brokers for the same markets: Alpaca, Tradier, Interactive Brokers, OKX.
Questrade API: frequently asked questions
Can I place trades with the Questrade API?
Order entry is limited to Questrade-approved partners; individual apps get account and market data.
For automated trading in Canada, what should I use?
Interactive Brokers Canada offers full order entry through its APIs.
Design and backtest your Questrade strategy first
AlgoGP turns an idea into Python and tests it on years of history before you connect it to Questrade. The exported code keeps the broker behind four small adapter methods.
- AI copilot writes and revises the rules
- Backtests with realistic costs
- Exported Python ready to wire to Questrade
Free plan, no card required.
Questrade alternatives
- Interactive Brokers API Built into AlgoGPThe broadest multi-asset broker API: stocks, options, futures, FX and bonds on 150+ markets, through TWS or IB Gateway.
- Wealthsimple API GuideWealthsimple Trade has no public API. What exists for Canadian algo traders instead: Questrade and Interactive Brokers.
- Alpaca API Built into AlgoGPCommission-free API-first broker for US stocks, ETFs and crypto, with a free paper-trading account.
- TradeStation API GuideUS broker with a v3 REST and streaming API for stocks, options and futures, OAuth 2.0 and a simulated account.
Independent guide. AlgoGP is not affiliated with Questrade. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.