From 4164bec64a89dc64cef7e9288198b58d5c07ad89 Mon Sep 17 00:00:00 2001 From: Martin Molinero Date: Thu, 12 Nov 2026 13:09:35 -0300 Subject: [PATCH] Keep the first history point of a canonical download IQFeedDataDownloader.GetCanonicalSymbolHistory called Any() on the consuming enumerable of its BlockingCollection, which removed the first history point and dropped it. Return Lean's GetConsumingEnumerableOrNull() instead: null when no contract returned history, otherwise every point, the first one included. Co-Authored-By: Claude Opus 5.5 --- QuantConnect.IQFeed/IQFeedDataDownloader.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/QuantConnect.IQFeed/IQFeedDataDownloader.cs b/QuantConnect.IQFeed/IQFeedDataDownloader.cs index fed6e07..6b99fcd 100644 --- a/QuantConnect.IQFeed/IQFeedDataDownloader.cs +++ b/QuantConnect.IQFeed/IQFeedDataDownloader.cs @@ -171,15 +171,8 @@ public IQFeedDataDownloader() blockingCollection.CompleteAdding(); }); - var historyResponses = blockingCollection.GetConsumingEnumerable(); - - // Validate if the collection contains at least one successful response from history. - if (!historyResponses.Any()) - { - return null; - } - - return historyResponses; + // Null when no contract returned any history, otherwise every history point, the first one included. + return blockingCollection.GetConsumingEnumerableOrNull(); } ///