What is a "universe" in the rdp.steamingPrices API for news headlines

streaming_prices = rdp.StreamingPrices(

universe = ['NFCP_UBMS'],

on_update = lambda streaming_price, instrument_name, fields :

display_news_headline(streaming_prices, instrument_name, fields)

)


So the code block above has a universe. And I'm not sure what it means and what values it takes in. Could someone help me out please?


Thank you!

Best Answer

  • Hi @bregarious,

    The universe parameter in the rdp.StreamingPrices() refers to the list of instruments or RICs that provide real-time, streaming updates. In your case, you are specifying a streaming news headline RIC ('NFCP_UBMS') which will return headlines and some other metadata fields.

    If you simply want to use the 'NFCP_UBMS' streaming RIC to retrieve streaming headlines, try this:

    sp = rdp.StreamingPrices(universe = ['NFCP_UBMS'], 
    on_update = lambda streaming_price, instrument_name, fields :
    print(f'Headline => {fields["HEADLINE1"]}'))

Answers

  • Hi,

    Thank you for the answer. Is there any documentation on what values can be populated with the universe? And what data those values will provide?

  • Hi @bregarious,

    The universe represents an identifier that describes what data you are looking for. If you want to understand what values you can use, I would start with the RIC Search utility: https://developers.refinitiv.com/en/tools-catalog/ric-search. You can find this link from the home page of the Developer Community. Additionally, you can navigate within your Refinitiv Workspace/Eikon desktop to discover the nature of the items you can use within the APIs. For example, typing in an expression such as "Apple" will pull up the RIC AAPL.O.