We’re excited to announce our new integration with Charles Schwab—one of the most requested brokerages on QuantConnect! Schwab’s recent release of a robust API has allowed us to deliver this integration, expanding your algorithmic trading options on the QuantConnect platform. Charles Schwab manages several trillion dollars in client assets, placing it among the global leaders in brokerage services.
Trade Equities, Options, and Index Options
Currently, Schwab accounts on QuantConnect support the trading of Equities, Options, and Index Options. You can submit Market, Limit, and Stop Market orders, with Combo Market and Combo Limit orders on the way to further enhance options trading. We’re also adding Futures trading in February. As Schwab does not provide a paper trading feature, you’ll need to use QuantConnect’s built-in paper modeling for testing and refinement.
Seamless Integration with QuantConnect Cloud and Local Platforms
The Schwab integration is available in the QuantConnect Cloud, Local Platforms, and via the LEAN CLI—so you can trade effortlessly in our fully managed cloud or self-host the integration on your own servers. Our brokerage models accurately reflect Schwab fees by asset class, providing transparency and realism in your backtesting and live strategies.
Configuring your strategies to take advantage of Schwab’s fee and brokerage models is straightforward. For example, to switch between Cash and Margin accounts, simply add the following lines in your algorithm:
# Charles Schwab Cash and Margin Account Models
self.set_brokerage_model(BrokerageName.CHARLES_SCHWAB, AccountType.CASH)
self.set_brokerage_model(BrokerageName.CHARLES_SCHWAB, AccountType.MARGIN)
Weekly Token Renewal
Because the Schwab API requires weekly re-authentication, you’ll receive a reminder email from QuantConnect to renew your OAuth tokens. Thanks to careful engineering, your live algorithms remain securely online during the token refresh process, maintaining their long-term deployment state with minimal interruptions.
Let us know your thoughts in the comments,
Happy trading!
Jared Broad
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!