We're excited to share that we've shipped a complete integration with Alpaca! Alpaca is an API-driven, commission-free brokerage founded in 2015. Headquartered in California, Alpaca has quickly matured and expanded asset classes and offerings.
Through the integration with QuantConnect, Alpaca clients can now easily algorithmically trade to three primary asset classes: US Equities, US Equity Options, and Cryptocurrency. Cash and margin accounts have been added, along with live trading through to paper or live accounts.
To configure your algorithm to use Alpaca fees and account types, set the brokerage model as shown below:
# Alpaca Cash and Margin Account Models
self.set_brokerage_model(BrokerageName.ALPACA, AccountType.CASH)
self.set_brokerage_model(BrokerageName.ALPACA, AccountType.MARGIN)
We have implemented five order types, Market, Limit, Stop Market, Stop Limit, and Trailing Stops. For more information on the brokerage integration, see Alpaca Reality Models.
This integration was sponsored by Alpaca, enabling the QuantConnect team to open-source the plugin and commit to its maintenance for the next two years. As new order types and asset classes are added to Alpaca, QuantConnect will be able to expand the plugin's support. Additionally, the Alpaca integration has been rolled out to the LEAN CLI and Local Platform for on-premise trading. We’re grateful for the commercial partnerships like this that help drive the open-source community forward!
Happy Trading!
QuantConnect Team
Chetan Prabhu
This is great news, I was hoping Alpaca would be integrated some day. Quantconnect and Alpaca share a common mission of making algo trading more open source and accessible to all investors and traders, so I'm happy to hear about this integration and partnership! Keep up the great work!
Sikker Rosendal
This is really great news ! Thanks a lot for opening this opportunity again, Regards
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!