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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
6 1 2 3

Get a list of all futures with first trading date trading on an country exchange code in eikon api python

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonfutures
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
23k 22 9 14

Hello @ravi_ranjan,

Understood and totally agree with you, that with the approach described, developers will not be able to identify the correct expression for a specific content full 100% of the time. Mostly, but not always. Sometimes, deeper content understanding is required, i.e. the help of a content expert, not API expert.

For the scenarios when you are not able to identify it yourself, please contact Refinitiv Content Helpdesk to identify the required content, to help you define the correct screener expression usable within your Eikon Excel, and then use it within your Eikon Data API to retrieve data via API.

I would prepare an example of a future you wish to round up (futures vary, there are different types, equity futures, foreign exchange futures, I would not know all available being on the API side). For example:

CME AUD future is published on RIC "0#AD:"

So we do:

req, err = ek.get_data(['0#AD:'], ['EXPIR_DATE']) req

to get

Instrument
EXPIR_DATE
0
ADV9
2019-10-11
1
ADX9
2019-11-18
2
ADZ9
2019-12-16
3
ADF0
2020-01-13
...


if this is what you are looking fore, you will need to identify the correct RICs for the futures you have in mind, which is why I suggested contacting content experts, who can help you best.

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
23k 22 9 14

Hello @ravi_ranjan,

I understand this question to be on content, on how to identify (and then retrieve) specific content, and I can offer two suggestions:

If one searches for this question on this forum, one of the first hits will be this discussion with the accepted answer discussing the user of Eikon Screener to identify the lists of instruments. Once Eikon screener is used to identify and export the formula, one has the expression to use with API, as discussed. One can use Screener to indentify, and then only focus on the desired expiration date similar to this answer.

However, in terms of rounding specific content, this forum is not the best approach. This forum is dedicated to the discussion of Refinitiv APIs and their usage, the moderators are experts on API, rather then on content. The best way to get content questions answered, if you are a customer of Refinitiv, is submitting the complete detailed question to Content Helpdesk.

Usually, if you register on this forum with your organization's email, we are able to identify you and submit the content inquiry on your behalf. With a personal email registration, we are unable to identify you and be of help in this way.

This is why I mention both approaches:

screener -> forumula -> drop the dates you do not require

or

contact Content Helpdesk to help identify the content

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.

Hello,

@zoya.farberov the second link you mentioned does partially solve the request, However it lists for certain underlying what I am trying to get is a universe of futures available for an exchange country code

A screener like the following but for futures.


screener_exp = 'SCREEN(U(IN(Equity(active or inactive,public,primary))),IN(TR.ExchangeCountryCode,IN))'

df, e = ek.get_data(screener_exp, ['TR.FirstTradeDate','TR.CommonName','TR.ISIN','TR.CUSIP','TR.InstrumentTypeCode','TR.ExchangeName'])


Hi @ravi_ranjan

I can suggest you some other approach which is not "fully API", but of course you can parse it as well.

Please have a look at RIC <FUTURES> and <FUTURET>. They contain country futures guides. Maybe that is sufficient for you?

Another option is RIC <0#FUTURES> where you have instruments sorted based on the underlying.

Click below to post an Idea Post Idea