I was able to get my local installation of Lean to build the default python algorithm, but now I need to download data from Interactive Brokers and it doesn't look like QuantConnect.ToolBox.exe wants to use the configuration in Lean's config.json. I've run it from the command line - should I be running it within the Visual Studio solution somehow? I'm not familiar with it.

config.json snippet:

// The port is what I found in TWS's API configuration. // I currently have TWS open. "data-provider": "QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider", "live-data-url": "ws://www.quantconnect.com/api/v2/live/data/", "live-data-port": 8020, "ib-account": "[redacted]", "ib-user-name": "[redacted]", "ib-password": "[redacted]", "ib-host": "127.0.0.1", "ib-port": "7497", "ib-agent-description": "Individual", "ib-tws-dir": "C:\\Jts", "ib-trading-mode": "paper", "ib-enable-delayed-streaming-data": true, ...

Command line execution:

QuantConnect.ToolBox.exe --app=IBDL --tickers=CRON --resolution=Daily --from-date=20180227-09:30:00 --to-date=20200317-16:00:00 20200318 14:46:59.255 Trace:: Config.Get(): Configuration key not found. Key: ib-account - Using default value: 20200318 14:46:59.255 Trace:: Config.Get(): Configuration key not found. Key: ib-host - Using default value: LOCALHOST 20200318 14:46:59.257 Trace:: Config.GetValue(): ib-port - Using default value: 4001 20200318 14:46:59.257 Trace:: Config.Get(): Configuration key not found. Key: ib-tws-dir - Using default value: 20200318 14:46:59.258 Trace:: Config.Get(): Configuration key not found. Key: ib-version - Using default value: 974 20200318 14:46:59.258 Trace:: Config.Get(): Configuration key not found. Key: ib-user-name - Using default value: 20200318 14:46:59.258 Trace:: Config.Get(): Configuration key not found. Key: ib-password - Using default value: 20200318 14:46:59.259 Trace:: Config.Get(): Configuration key not found. Key: ib-trading-mode - Using default value: 20200318 14:46:59.260 Trace:: Config.GetValue(): ib-agent-description - Using default value: I 20200318 14:46:59.419 Trace:: Config.GetValue(): ib-enable-delayed-streaming-data - Using default value: False 20200318 14:46:59.420 Trace:: InteractiveBrokersBrokerage.InteractiveBrokersBrokerage(): Starting IB Automater... 20200318 14:46:59.440 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): IBAutomater process started - Id:18276 20200318 14:46:59.668 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): Exception in thread "main" org.apache.commons.cli.MissingArgumentException: Missing argument for option: user 20200318 14:46:59.668 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at org.apache.commons.cli.DefaultParser.checkRequiredArgs(DefaultParser.java:211) 20200318 14:46:59.668 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at org.apache.commons.cli.DefaultParser.handleOption(DefaultParser.java:612) 20200318 14:46:59.669 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at org.apache.commons.cli.DefaultParser.handleShortAndLongOption(DefaultParser.java:505) 20200318 14:46:59.669 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at org.apache.commons.cli.DefaultParser.handleToken(DefaultParser.java:243) 20200318 14:46:59.669 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:120) 20200318 14:46:59.669 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76) 20200318 14:46:59.669 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60) 20200318 14:46:59.669 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): at ibautomater.IBAutomater.main(IBAutomater.java:40) 20200318 14:46:59.679 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterExited(): Exit code: 1 20200318 14:47:59.449 Trace:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): IB Automater initialization timeout. 20200318 14:47:59.449 Trace:: InteractiveBrokersBrokerage.InteractiveBrokersBrokerage(): Host: LOCALHOST, Port: 4001, Account: , AgentDescription: I 20200318 14:47:59.453 Trace:: InteractiveBrokersBrokerage.ResetHandler(): thread started. 20200318 14:47:59.460 Trace:: InteractiveBrokersBrokerage.Connect(): Attempting to connect (1/5) ... 20200318 14:48:05.994 Trace:: InteractiveBrokersBrokerage.HandleError(): RequestId: -1 ErrorCode: -1 - System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:4001. at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port). at IBApi.EClientSocket.createClientStream(String host, Int32 port). at IBApi.EClientSocket.eConnect(String host, Int32 port, Int32 clientId, Boolean extraAuth)

As you can see above, none of the config data is used. How does the Toolbox load its config?

Author