Dear Community,

An essential part of live trading is keeping your algorithms' internal state intact for as long as possible. If you’ve configured indicators or loaded data into memory, restarting the process from scratch can be painful and potentially result in losing valuable state. 

Unfortunately, some brokers require weekly re-authentication. If you miss the authentication window, you’re disconnected from the brokerage, and historically, we’ve terminated the algorithms as a precaution.

We returned to the drawing board and devised a smoother way to handle these misses. Now, when you miss the re-authentication request, your algorithm will hang in limbo - alive with its state intact, but disconnected from the brokerage. You will have until the market opens to restore the brokerage connection. 

Your algorithm will now send you an email allowing you to restart the authentication process. With Interactive Brokers, this will restart the 2FA process - driving a push notification to your phone as usual. Soon, with Charles Schwab, it will send you an email to restart the OAuth connection. 

This lets you start the connection process when you’re already on your phone or computer and paying attention. We scan your portfolio and determine the latest safe time possible, keeping the algorithm online until then. For US Equities strategies, this will be 9.15 a.m. ET on Monday.

This is a universal and safe way to keep your algorithm online as long as possible. It's available from LEAN version v17339 onward, through our Cloud Platform. If you have a current live trading algorithm, you will need to stop and redeploy it to take advantage of this new feature.

Happy Coding!

QuantConnect Team