For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

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

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apicodebook
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvote
Accepted
8.6k 13 6 9

@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

1624607375168.png (44.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.