diff --git a/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs b/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs index e281acd..b9ae72c 100644 --- a/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs +++ b/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs @@ -3634,6 +3634,13 @@ private bool Subscribe(IEnumerable symbols) continue; } + // Skip subscribing to expired option contracts + if (OptionSymbol.IsOptionContractExpired(symbol, DateTime.UtcNow)) + { + Log.Trace($"InteractiveBrokersBrokerage.Subscribe(): Skipping subscription for {symbol} because the contract has expired."); + continue; + } + var id = GetNextId(); var contract = CreateContract(subscribeSymbol, includeExpired: false); var symbolProperties = _symbolPropertiesDatabase.GetSymbolProperties(subscribeSymbol.ID.Market, subscribeSymbol, subscribeSymbol.SecurityType, Currencies.USD);