Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 1

historical open interest in eikon python api

Your Question: How do I pull historical open interest in eikon python api? I found the code in excel NDA_RAW.Nda_open_interest. But this field does not work in python

ek.get_timeseries([TYH8^1],[NDA_RAW.Nda_open_interest],start_date = '2018-01-01',end_date = '2018-04-01')

returns NaN

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

@dionchu
Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
-AHS

1 Answer

· Write an Answer
Upvote
Accepted
78.8k 250 52 74

@dionchu

The ek.get_timeseries method supports the following fields: 'TIMESTAMP', 'VALUE', 'VOLUME', 'HIGH', 'LOW', 'OPEN', 'CLOSE', 'COUNT'. For more information, please refer to Eikon Data APIs for Python - Reference Guide.

To get historical open interest, you can use the ek.get_data method.

df, e = ek.get_data('TYH8^1', ['TR.OPENINTEREST.Date', 'TR.OPENINTEREST'], {'SDate':'2018-01-01','EDate':'2018-04-01'})
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.

is there a way to use the get_data method without returning a tuple?

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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