Subscribe to different fields per instrument in RDP Streaming.

Options
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.

Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    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.

Answers

  • zoya faberov
    zoya faberov ✭✭✭✭✭

    Hello @melarbi,

    Are you using RDP Libraries .Net ?

    Looking at Pricing - Streaming examples, I see

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

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

  • 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 ?