QuantConnect / Lean.Brokerages.InteractiveBrokers

InteractiveBrokers Brokerage Plugin
Apache License 2.0
27 stars 17 forks source link

Improve Data Connection Logic #80

Open AlexCatarino opened 9 months ago

AlexCatarino commented 9 months ago

Expected Behavior

If the data connection is lost, LEAN recovers it. No need to restart the deployment.

Actual Behavior

Apparently the algorithm trading SPX options fails because the algorithm stops receiving SPX (index data), so it didn't trigger the option universe filter. The latest "Market data farm connection" says

2023-08-08T05:07:28.4818118Z TRACE:: InteractiveBrokersBrokerage.HandleError(): RequestId: -1 ErrorCode: 2108 - Market data farm connection is inactive but should be available upon demand.usopt

but it refers to usopt, not index. When the user restarted the algorithm, it received the data.

Potential Solution

N/A

Checklist