How to setup live trading with Alpaca?

Back

Hello,

I recently started using QuantConnect so apologies if this question is dumb.

I'd like to start live trading on Alpaca. My current python algorithm is using self.AddEquity() to pull symbol data and self.MarketOrder() function to execute trades in backtesting. Will this function execute live trades via Alpaca once I subscribe/setup a QuantConnect Live server? Or do I need to implement the Alpaca REST.API commands into my code?

 

self.SetBrokerageModel(BrokerageName.Alpaca, AccountType.Cash)

self.Securities["AAPL"].FeeModel = ConstantFeeModel(0.0)

Also, I am unsure if there are recommended best practices from those live trading with Alpaca, such as where to pull market data from? Slippage/Fees considerations? I am setting the brokerage to Alpaca and setting fees to zero as shown above but looking for additional recommendations on how to setup my backtesting to be as realistic to Alpaca as possible.

Update Backtest







 
0

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.


Unfortunately I am also a newbie here but I linked it to Alpaca for paper trading and will soon make the move to real trading once I am confident in the algo on paper.

0

Hi CAPOCAPITAL - you're correct that's all you need to do. We are broker agnostic so when you send a market order it'll route to whatever brokerage you configure on deploying the algorithm live.

You can see a demonstration of live deployments here.

1

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.


Update Backtest





0

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.


Loading...

This discussion is closed