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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
20 3 1 1

How to get historical Open Interest using eikon R api?

Hi,

To fetch parameters like Open Interest, I use get_data function in R but it only returns the latest value. How can I pull historical open interest in Eikon R?

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikoneikon-data-api-r
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.

Upvote
Accepted
7.4k 10 6 8

Hi @Niket - thanks for your question. You need to amend your field call to make a series instead of point request - you can do this by adding the date and frequency parameters - for more details please use the Data Item Browser App by typing DIB into eikon search bar. I hope this can help.

fields = list(TR_Field('TR.OPENINTEREST',list(SDate=0,EDate=-29,Frq=D).date),TR_Field('TR.OPENINTEREST',list(SDate=0,EDate=-29,Frq=D)))

data_frame = get_data(list("ESc1"),fields)
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.

Upvotes
20 3 1 1

Thank you for the answer @jason.ramchandani . This actually helped. One can also simply write and achieve similar results.

get_data(list("LCOc1"),fields = list('TR.OPENINTEREST.Date', 'TR.OPENINTEREST', '2000-01-01', '2020-05-25'))
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.