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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
20 2 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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythoneikon-data-api-r
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.

Upvote
Accepted
6.7k 8 6 7

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

Upvotes
20 2 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea