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.