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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 0 0 1

use function to retrieve "settlement price", "open interest" and "open interest change" data in terms of a commodity futures contract

Hi there,

as pasted below, the Eikon_API hand book implies the available "OPEN, CLOSE, HIGH, VOLUME" etc arguments for "fields" parameter in <get_timeseries> function.

my question is am I able to retrieve the historical "settlement price, open interest, open interest change" data which are not listed for a commodity futures contract, and if yes, what are the arguments?

Thanks!

capture.png

eikon-data-apicommodities
capture.png (64.7 KiB)
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.

1 Answer

Upvotes
Accepted
5.8k 10 5 8

Hi @gtaxinstitute ,

You can use ek.get_data() to retrieve this data, for example

rics_list = ['VXc1']
fields = ['TR.SETTLEMENTPRICE.date','TR.SETTLEMENTPRICE','TR.OPENINTEREST.date','TR.OPENINTEREST']
df, err = ek.get_data(rics_list, fields, {'SDate': '2022-01-01', 'EDate': '2022-04-30', 'Frq': 'D'})
df

which TR.SETTLEMENTPRICE.date is the date of TR.SETTLEMENTPRICE field and TR.OPENINTEREST.date is the date of TR.OPENINTEREST field.

The data date range can be adjusted on SDate, EDate parameters along with Frq (Frequency) of the data, in this case, is D (Day)

1658730689241.png

To search for the field name, you can use Data Item Browser (DIB) whose video tutorial can be watched here Data Item Browser and Eikon Data API in Python

For example, 1658730915445.png

However, if you have any questions regarding the content like you cannot find the field you're looking for if you are not sure which one is the right field to be used, as the moderators in this forum aren't the content expert, you can contact the content expert team via MyRefinitiv (Product and Content > I need help using the product > Refinitiv Eikon) asking for the field name of what you're looking for, this way the content specialist can contact you and assist you on this.

Hope this helps


1658730689241.png (44.5 KiB)
1658730915445.png (85.6 KiB)
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.