question

Upvotes
Accepted
1 1 3 6

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 512.0 KiB each and 1.0 MiB total.

Hello @melarbi

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Upvotes
Accepted
17.4k 82 39 63

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 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 20

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 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 3 6

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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