Pull related RICs

Hello,

I am looking to use RDP's get data to pull all related RICs and contributor prices for a list of bonds. The documentation of get_data says you can use legacy TR_fields in the fields section, but when I query these bonds I get None as a result.


bond_list = ['XS2351304246','83368RBS0','683483AA9','30015DAA9','NO0011129579']

response_results = rd.content.get_data(universe=bond_list,fields ['TR.RICS','TR.RICSContributor','Isin'])

print(response_results)

Am I using the wrong fields?


Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @david.blanco

    You can use the following code to retrieve all available fields in the SearchAll view.

    from refinitiv.data.content import search
    response = search.metadata.Definition(
        view = search.Views.SEARCH_ALL  
    ).get_data()


    response.data.df

    1675215838067.png

    I found the BidPrice and AskPrice fields but those fields are null for those items.

    Another option is using the rd.content.pricing.Definition method to get the latest values of real-time fields.

    response = rd.content.pricing.Definition(
    df["RIC"].unique(),
    fields=["BID_YIELD","ASK_YIELD", "BID", "ASK"]
    ).get_data()
    response.data.df

    However, from my test, most values are N/A.

    1675216672959.png

    These real-time fields are the same fields as displayed in the Quote App. You may need to contact the content support team directly via MyRefinitiv and ask for real-time fields which can be used to retrieve the required data.



Answers

  • Hi @david.blanco ,

    Is this what you're looking for? In case you'd like to search for available fields, the video How to use the Data Item Browser in Refinitiv's Workspace can be used.

    bond_list = ['XS2351304246','83368RBS0','683483AA9','30015DAA9','NO0011129579']
    response_results = rd.get_data(universe=bond_list,fields=['TR.RICS','TR.RICSContributor','Isin'])
    #print(response_results)
    display(response_results)

    1675138720551.png

    Plus, regarding the field name for getting ISIN data, the field 'Isin' seems not valid. However, this forum is dedicated to an API usage question hence,
    the moderators on this forum do not have deep expertise in every type of
    content available through Refinitiv products. Such expertise is available
    through Refinitiv Helpdesk, which can be reached via MyRefinitiv.

    I hope this helps and please let me know if you have any further questions.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @david.blanco

    I checked and tested with the rd.get_data method.

    bond_list = ['XS2351304246','83368RBS0','683483AA9','30015DAA9','NO0011129579']
    response_results = rd.get_data(universe=bond_list,fields=['TR.RICS','TR.RICSContributor','TR.Isin'])
    #print(response_results)
    display(response_results)

    The code works with the desktop session but it does not work with the platform.rdp session.

    You can try the search endpoint instead.

    df = rd.discovery.search(
        view=rd.discovery.Views.SEARCH_ALL,
        select="CUSIP, RIC, ContributorCommonName, IssueISIN", 
        filter="IssueISIN in ('NO0011129579') or CUSIP in ('XS2351304246' '83368RBS0' '683483AA9' '30015DAA9')",
        top=10000
    )
    df

    The output is:

    1675142213187.png

  • Hi Jiraponse,

    Thank you so much for this answer! Works like a charm and is exactly what I needed. I greatly appreciate you taking the time to answer this question.

    kind regards,

    David


  • Jiraponse,


    I am also looking to pull the Bid Quote for each contributor. I tried filling in the select lines with the following: Bid, Price, Quote Bid_price, Yield, Best_Bid, BestBid, to no avail. Is it possible to use this search function to also pull the bid and ask for specific RICs?


    Thanks,

    David

  • Hi Jirapose,


    That's exactly what I'm looking for! Do you mind me asking what version of rdp do you have? I ask because my module is not recognizing pricing or definition as atributes of content. I have version 1.0.0a20 and I fear I have an outdated version.



  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @david.blanco

    You can try Refinitiv Data Library (refinitiv-data 1.1.0) instead. The examples are available on GitHub.

    The latest version of the Refinitiv Data Platform library is 1.0.0a20.