Back

Error - Lean configuration for Alpaca Paper Trading using IEX

Hello,

I am trying to configure lean to work with my alpaca paper account using IEX. I am using the following config 

// defines the 'live-alpaca-iex' environment with IEX data feed
"live-alpaca-iex": {
"live-mode": true,

// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "AlpacaBrokerage",
"data-queue-handler": "QuantConnect.ToolBox.IEX.IEXDataQueueHandler",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler",
"history-provider": "QuantConnect.ToolBox.IEX.IEXDataQueueHandler"
}

I receive the following error:

20200828 18:12:55.757 Trace:: LiveTradingDataFeed.GetDataQueueHandler(): will use QuantConnect.ToolBox.IEX.IEXDataQueueHandler
20200828 18:12:55.770 ERROR:: Engine.Run():  System.ComponentModel.Composition.Primitives.ComposablePartException: Cannot create an instance of type 'QuantConnect.ToolBox.IEX.IEXDataQueueHandler' because a constructor could not be selected for construction. Ensure that the type either has a default constructor, or a single constructor marked with the 'System.ComponentModel.Composition.ImportingConstructorAttribute'.

I'm just learning Lean and QuantConnect, so not sure if I've configured something wrong in config.json or in my python algo script. My script backtests fine, trying to move to testing in a paper account. 

Thanks in advance!

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.


Hi Josh,

The path is incorrect.

Replace

QuantConnect.ToolBox.IEX.IEXDataQueueHandler

with

QuantConnect.Lean.ToolBox.IEX.IEXDataQueueHandler

Best,
Derek Melchin

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.


Hi Derek, I have the updated settings and have the following error , any ideas ?

 

Engine.Run():  System.ArgumentException: Unable to locate any exports matching the requested typeName: QuantConnect.Lean.ToolBox.IEX.IEXDataQueueHandler

0

IEX is not a history provider - you will need to remove the final line of the config. 

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.


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