Hi Team,
lean just failed to place an live MOC order to IB on live accounts but was successful with paper trading account.
I have called IB, they didn't see the order being placed on their side for the live account
I checked the log and observed the unusual rapid multiple request for two-factor authentication verification:
2024-04-30 19:45:27 Launching analysis for L-XXXXX with LEAN Engine v2.5.0.0
2024-04-30 19:45:29 Interactive Brokers Brokerage account base currency: USD
2024-04-30 19:45:29 Changing account currency from USD to USD...
2024-04-30 19:45:29 2024-04-30 15:45:26.341316 QQQ in instName, cutoff time: 5
2024-04-30 19:45:31 Brokerage Info: Requested market data is not subscribed. Displaying delayed market data.. Origin: [Id=2] Subscribe: QQQ (STK QQQ USD Smart NASDAQ 0 )
2024-04-30 19:52:03 Logging into account. Check phone for two-factor authentication verification...
2024-04-30 19:52:04 Logging into account. Check phone for two-factor authentication verification...
2024-04-30 19:53:02 New Order Event: Time: 04/30/2024 19:53:02 OrderID: 1 EventID: 1 Symbol: QQQ Status: Invalid Quantity: 175 Message: Brokerage failed to place orders: [1]
2024-04-30 19:53:03 Brokerage Warning: Orders cannot be submitted when disconnected.
2024-04-30 19:53:03 Brokerage failed to place orders: [1]
2024-04-30 19:55:16 Logging into account. Check phone for two-factor authentication verification...
2024-04-30 19:55:16 Logging into account. Check phone for two-factor authentication verification...
2024-04-30 19:59:16 Logging into account. Check phone for two-factor authentication verification...
2024-04-30 19:59:16 Logging into account. Check phone for two-factor authentication verification...
2024-04-30 20:02:21 Algorithm Stopped
I used the same code for execution last month without issue.
Did the PEP8 migration break something?
Kubid
Actually, in another VM, i run the same code but it connects to a paper trading account instead of live account and that works.
The issue seems to be connectivity between lean/QC and live accounts.
Ethan Hammond
I had a live algo disconnect from Interactive Brokers around 8:00 pm on 4/29/24. I could not find the reason for the error. Thankfully, it did not disconnect today. I'm not sure what the issue was/is.
"2024-04-29 23:48:01 : Runtime Error: System.TimeoutException: InteractiveBrokersBrokerage.Connect(): DownloadAccount failed."
Shaohua Lu
Dear All,
I have been facing the problem for the last two weeks, the IBAutomater keeps quitting and restarting, and IBGateway did the same thing, keeps quitting and restarting, so I need to do 2FA every few minutes. The log is shown below:
"
InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): /Lean/Launcher/bin/Debug/IBAutomater.sh: line 16: 182 Killed Xvfb :1 -screen 0 1024x768x24 2>&1 > /dev/null
InteractiveBrokersBrokerage.OnIbAutomaterErrorDataReceived(): /Lean/Launcher/bin/Debug/IBAutomater.sh: line 16: 183 Killed $1/ibgateway
InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): IBGateway process exited
InteractiveBrokersBrokerage.OnIbAutomaterExited(): Exit code: 0
InteractiveBrokersBrokerage.OnIbAutomaterExited(): IBGateway close detected, restarting IBAutomater...
InteractiveBrokersBrokerage.Connect(): IB message processing thread ended: #23
InteractiveBrokersBrokerage.HandleConnectionClosed(): API client disconnected [Server Version: 0].
"
Martin Molinero
Hey Shaohua Lu!
We've released a fix related for IB live trading using the lean cli. Please update your version to the latest 1.0.192, ‘pip install --upgrade lean’. If the issue persist, please contact support with detailed logs (--verbose) so we can solve the issue ASAP.
Thank you
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.
Kubid
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!