Retrieve Field Value for Chain Constituents using Refinitiv.Data Library under .Net

I want to know if as it’s the case when using get_data function for Eikon Library under Python, and as shown below, is it possible with Refinitv.Data Library under .Net (C#) to get when asking Chain not only Constituents but also fields value requested for each constituent.

Indeed, when using Chain function we are not able to define fields to request.

1671122446581.jpeg


1671122457435.jpeg

Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    Hi @anass.yazane.1

    The Chain interface only retrieves the constituents - it does not have the ability to retrieve prices for each constituent. You will have to do something like this:

    var chain = "0#FGBL:";
    var response = Chain.Definition(chain).GetStream().Streaming(false);
    response.Open();

    var results = Pricing.Definition(response.Constituents).Fields("BID", "EXPIR_DATE").GetData();

    foreach (var item in results.Data.Prices)
    Console.WriteLine($"Quote for item: {item.Key}\n{item.Value.Fields("BID", "EXPIR_DATE")}");

    ahs.png

Answers