question

Upvotes
Accepted
1 0 0 3

Subscribe to different fields per instrument in RDP Streaming.

Hi, I am using RDP C# desktop API.

I am streaming different fields for different instruments for example get BID and ASK for a currency but get the CF_LAST for a stock.
I would like to create a stream and specify on the fly the instruments and fields I want to subscribe to.

The default solution is to subscribe to all fields for all instruments but that seems like a brute force solution.

Ideally when I add items ( myStream.AddItems ( <myRIC> ) ) I should be able to specify which field ( BID, ASK or LAST ) that I want to get updated for.

Thanks

M.

rdp-apirefinitiv-data-platform
icon clock
10 |1500

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

Upvotes
Accepted
9.7k 49 38 60

Hi @melarbi,

The StreamingPrices interface does not currently provide the ability to dynamically add items using different fields. To do such a thing, you would have to manage multiple StreamingPrices objects.

It is an interesting idea that I will discuss with the design team. Thanks for you input.

icon clock
10 |1500

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

Upvotes
23k 22 9 14

Hello @melarbi,

Are you using RDP Libraries .Net ?

Looking at Pricing - Streaming examples, I see

                
  1. // Open the session
  2.             session.Open();
  3.  // Create a streaming price interface for a list of instruments and specify lambda expressions to capture real-time updates
  4.             using (var stream = Pricing.CreateStreamingPrices(
  5. new StreamingPrices.Params().Universe("EUR=", "CAD=", "GBP=")
  6. .WithFields("DSPLY_NAME", "BID", "ASK")
  7. .OnStatus((o, item, status) => Console.WriteLine(status))))
  8.             {

does this help, or are you looking at something different?

icon clock
10 |1500

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

Upvotes
1 0 0 3

Hi, I have done all of what you are saying and it is working nicely. However, I don't think you've understood my question. I would like to create a stream where I request specific Fields for a subset of RICs. Here is what I am thinking in pseudo-code :

stream = new StreamingPrices.Params().Universe( "EUR=").Fields("BID", "ASK);

later on the code :

stream.AddItems("VOD.L").Fields("CF_LAST");


Here I am creating a stream with EUR as instrument for which I am "listening" to updates on BID and ASK fields. Then on the same stream I am adding VOD.L as new subscription RIC for which I only want to have updated on CF_LAST and NOT on BID or ASK

How Can I do this ?
icon clock
10 |1500

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

Click below to post an Idea Post Idea