Eikon Api 1.8.4.0
Hi,
I have a function which tries to request the last 50 bars. It works fine most of the times, but sometimes when there is a new request, I get "Index was outside the bounds of the array" as error message back. Any idea why that is?
"INTU.O error with hist request:" System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at ThomsonReuters.Desktop.SDK.DataAccess.TimeSeries.Impl.RequestBase.RegisterCallbacks()
at ThomsonReuters.Desktop.SDK.DataAccess.TimeSeries.Impl.RequestBase.SendRequest()
at ThomsonReuters.Desktop.SDK.DataAccess.TimeSeries.Impl.DataRequest.Send()
Do I need to cancel something or reset something after I received the data back to clear the array again?
if(tSRequest == null)
tSRequest = DataServices.Instance.TimeSeries;
DateTime dt = DateTime.Now;
try
{
requestEikon = tSRequest.SetupDataRequest(ric)
.WithView("TRDPRC_1")
.WithAllFields()
.To(new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0))
.WithInterval(CommonInterval.Intraday1Minute)
.WithNumberOfPoints(50)
.OnDataReceived(TSDataReceivedCallback)
.WithTimeZone(TimezoneType.Instrument)
.CreateAndSend();
}
catch(Exception ex)
{
Console.WriteLine(ric + $" error with hist request: "+ ex);
return false;
}