How can I retrieve a list of instruments form a monitor using Python?

Dear Refinitiv team,

I have created a Monitor in the Eikon frontend which itself contains a list of instruments. Is there a possibility to specify that Monitor and retrieve a list of all RICs corresponding to the instruments in the Monitor by using Python and CodeBook?

Furthermore, I want to ask whether there is a possibility to specify an Index or similar and retrieve all RICs corresponding to the Instruments in it?

Thank you very much in advance.

Jakob

Best Answer

  • @jakob.neu Yes its really simple - to get all RICs from a monitor simply refer to it the instrument section of the API call as follows:

    df,err = ek.get_data('Monitor("Monitor 18")', ['CF_CLOSE'])
    df


    1624607375168.png

    For the second part of your question thats really easy as well - all indices should start with a . for example .FTSE, .SPX etc to get the constituents simply put a 0# before them eg 0#.FTSE or 0#.SPX and this will return the index constituents:

    df,err = ek.get_data(['0#.FTSE'], ['CF_CLOSE'])
    df