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-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.

1 Answer

Upvote
Accepted
38.1k 71 35 53

@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 5.0 MiB each and 10.0 MiB total.

is there a way to use the get_data method without returning a tuple?
Click below to post an Idea Post Idea