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
37 3 2 3

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apieikon-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
10.2k 18 6 9

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
37 3 2 3

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.

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.