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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 0 1 0

Python command to get RICs associated with a chain of contracts

I am using the following command in the Refinitiv-Excel interface in order to get all the RICs associated with a certain set of contracts.

=@TR("0#LCOG1+";"";"CH=Fd RH=IN";$A$1)

How would this command look like in Phyton (is it possible to get the result applying the "get_data" function)?

Or more generally, is there a way to translate commands from one "language" to the other?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvotes
Accepted
6.7k 8 6 7

@Peter.Winkler3 Yes you can try this which will give you the RICs in the chain:

df, err = ek.get_data('0#LCOG1+', 'BID')
df

In terms of general translation - the python functions eg get_data generally involve some kind of instrument(s), then some kind of field(s) and perhaps a set of parameters (such as date and/or field specific settings.

The best way to familiarise yourself is to use either the Data Item Browser app (type DIB into the eikon search bar) or by using the Code Creator app (type codecr into eikon search bar). The you can add an instrument and select fields and have the app create the correct field/parameter settings for you (in the case of DIB app) or create the whole python code for you including the full API call which you can launch in a codebook instance or copy and paste into your Jupyter notebook or similar.

I hope this can help.


1608118874023.png (52.2 KiB)
icon clock
10 |1500

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

Many thanks for the hint, Jason! Worked perfectly!

Upvote
16 0 1 0

@jason.ramchandani Many thanks for the hint, Jason! Worked perfectly!

icon clock
10 |1500

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

Click below to post an Idea Post Idea