question

Upvotes
Accepted
5 4 2 5

Eikon .net API first subscription to retrieve latest quote

Hello,

I use the subscription method to retrieve real time prices as follow:

var realtime = DataServices.Instance.Realtime;
IRealtimeDataSubscriptionSetup setupSubscription = realtime.SetupDataSubscription()
  .WithFields(Properties.Settings.Default.ReutersFields.Cast<string>().ToArray())
  .WithRics(getSubscribedInstrumentsCodes())
  .OnDataUpdated(DataReceivedCallback)
  .OnStatusUpdated(StatusUpdatesCallback)
  .OnError(DataErrorCallback);

subscription = setupSubscription.CreateAndStart();

From what I see when running this (as I could not find any detailed documentation on how it works), the prices are updated when receiving quotes (only TRDPRC_1 field is asked).

My point is if I start this program when the market is opened on a stock with low volume, can I get the latest available price at the start of the subscription? If yes, how?

Thanks,

Gerald

eikoneikon-data-apieikon-com-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
39.3k 76 11 27

Yes. You don't see it through the interface exposed, but the mechanism is that when you start the subscription the subscription request is sent to the data distributor. The latter first responds with the real-time data record image containing the values of the fields you asked for that are available on the datafeed at that time. And then the distributor sends the updates to the fields in the subscription whenever those fields are updated on the datafeed. You can watch how this mechanism works in the Quote app in Eikon. When you call up a RIC in the Quote app you first see the app populated with the entire record image. And then you see the updates to the fields flashing when they are received.

From the perspective of the .NET interface you're using you'll see OnDataUpdated event raised first when the record image is received and then every time the update is sent by the distributor.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.