I do not receive any RealTime data - OnDataUpdated() is never called.

I'm trying to get realtime data using an IRealTimeDataSubscription. I get called in the OnDataServicesCreated() method (see the code below). But then I'm never called neither in the OnDataUpdated() callback nor the OnError() callback. What did I do wrong?

private void OnDataServicesCreated(IDataServices dataServices)
{
this.dataServices = dataServices;
this.realtime = dataServices.Realtime;

subscription = realtime.SetupDataSubscription("EUR=")
.WithFields("BID", "ASK")
.OnDataUpdated(OnDataUpdated)
.OnError(OnError)
.CreateAndStart();
}

Best Answer

  • There is a variety of reason why you may not be called in the data update callback.

    To progress, I recommend adding the OnStatus callback to your subscription setup. This callback is mandatory for any production code since it allows the App to handle very common cases, such as Stale, Closed, Delayed, and Not Permissioned RICs.

    On of the API issue (version 0.9.3) that will be fixed in the next release is that the default feed was set to "IDN_RDF" instead of "Q". Please try to add a .WithFeed("Q") in your subscription setup.

    Assuming your are consuming the API in a standalone application, another way to troubleshoot problems is to look at the log files located in the same folder as your .exe.

Answers

  • I added .WithFeed("Q") to the subscription creation (see the code below), it works like a charm now.

    subscription = realtime.SetupDataSubscription("EUR=")
    .WithFeed("Q") // <== This made the trick
    .WithFields("BID", "ASK")
    .OnDataUpdated(OnDataUpdated)
    .OnError(OnError)
    .CreateAndStart();
  • Ported to External Eikon Dev QA Portal