diff --git a/QuantConnect.DataBento/DataBentoHistoryProivder.cs b/QuantConnect.DataBento/DataBentoHistoryProivder.cs index eed5697..e9c6095 100644 --- a/QuantConnect.DataBento/DataBentoHistoryProivder.cs +++ b/QuantConnect.DataBento/DataBentoHistoryProivder.cs @@ -73,7 +73,7 @@ public override void Initialize(HistoryProviderInitializeParameters parameters) { _invalidSecurityTypeWarningFired = true; Log.Trace($"{nameof(DataBentoProvider)}.{nameof(GetHistory)}:" + - $"Unsupported SecurityType '{historyRequest.Symbol.SecurityType}' for symbol '{historyRequest.Symbol}'."); + $"History request not supported for symbol '{historyRequest.Symbol}' (SecurityType: {historyRequest.Symbol.SecurityType}, Canonical: {historyRequest.Symbol.IsCanonical()})."); } return null; } diff --git a/QuantConnect.DataBento/Models/DataSetSpecifications.cs b/QuantConnect.DataBento/Models/DataSetSpecifications.cs index 1782043..e0d0866 100644 --- a/QuantConnect.DataBento/Models/DataSetSpecifications.cs +++ b/QuantConnect.DataBento/Models/DataSetSpecifications.cs @@ -56,6 +56,7 @@ public static class PredefinedDataSets /// public class DataSetSpecifications { + private static readonly Lock _lock = new(); /// /// Internal flag to ensure the delay warning message is only generated once. /// @@ -117,13 +118,21 @@ public bool TryGetDelayWarningMessage(out string? message) { return false; } - message = $"Dataset [{DataSetID}] historical data information:\n" + + lock (_lock) + { + if (_delayWarningFired) + { + return false; + } + + message = $"Dataset [{DataSetID}] historical data information:\n" + $"- Users with a live license: delayed by approximately {HistoricalDelayWithLicense}." + $"For access to more recent data, use the intraday replay feature of the live data client.\n" + $"- Users without a license: delayed by {HistoricalDelayWithoutLicense}.\n" + $"- More information: {Link} (go to the 'Specifications' tab)"; - _delayWarningFired = true; - return true; + _delayWarningFired = true; + return true; + } } }