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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 3

Contract expiry - python api

Is there a published list of fields that can be used with ek.get_data()? I am trying to query the contract expiry that appears on the quote screen in Eikon for a specific futures contract.

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.

@Paul.Vosper

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

1 Answer

Upvotes
Accepted
4.6k 26 7 22

You can use Data Item Browser (or, simply, DIB) app on Thomson Reuters Eikon for reference.


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.

Hi Zhenya, Thank you, DIB suggests EXPIR_DATE, which works for non-expired contracts (e.g ATWMZ8) but not for expired contracts (ATWMZ7^1) Is there a way to retrieve the expiry of expired futures contracts? Maybe the only other option is to query the timeseries & assume the last datapoint is correct...

I'm afraid the only option other than to retrieve the last datapoint from the timeseries, which for liquid future contracts is pretty much guaranteed to be the expiry date, is to calculate the expiry date using exchange rules from the expiry month and year. You can get the expiry month and year from the last 3 characters of the RIC, e.g. Z in ATWMZ7^1 stands for December and 7^1 stands for 2017. For this future the expiry date is the last Friday of the expiry month. Eikon provides functions that can help with this type of date calculation, but getting the last date from timeseries is easier.

Click below to post an Idea Post Idea