QuantConnect / Lean.Brokerages.InteractiveBrokers

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

Do Not Subscribe to Expired Options After Weekly Restart #118

Open AlexCatarino opened 4 days ago

AlexCatarino commented 4 days ago

Expected Behavior

Do not subscribe to expired options after weekly restart.

Actual Behavior

2024-06-30T22:00:52.0193833Z TRACE:: InteractiveBrokersBrokerage.Connect(): Restoring data subscriptions...
2024-06-30T22:00:52.0202073Z TRACE:: InteractiveBrokersBrokerage.Subscribe(): Subscribe Request: SPY   240628C00525000
2024-06-30T22:00:52.0204117Z TRACE:: InteractiveBrokersBrokerage.GetContractDetails(): SPY   240628C00525000 (OPT SPY USD Smart)
2024-06-30T22:00:52.6615085Z TRACE:: InteractiveBrokersBrokerage.HandleError(): RequestId: 4582 ErrorCode: 200 - No security definition has been found for the request. Origin: [Id=4582] GetContractDetails: SPY   240628C00525000 (OPT SPY USD Smart)
2024-06-30T22:00:52.6622856Z ERROR:: Brokerage.OnMessage(): Error - Code: 200 - No security definition has been found for the request. Origin: [Id=4582] GetContractDetails: SPY   240628C00525000 (OPT SPY USD Smart)
2024-06-30T22:00:52.6623584Z TRACE:: CloudLiveTradingResultHandler.BrokerageMessage(): Error - Code: 200 - No security definition has been found for the request. Origin: [Id=4582] GetContractDetails: SPY   240628C00525000 (OPT SPY USD Smart) - Brokerage: InteractiveBrokersBrokerage

Potential Solution

N/A

Reproducing the Problem

Hold options that expire on Friday.

Checklist