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
12 4 4 8

Cumulative volume and Open Interest of futures

I'd like to download cumulative volume and Open Interest (i.e. across all the maturities) for LCO, CL, RB , HO and LGO futures and the respective exchange traded pairs. I know that for LCO and LGO there are the rics LCOTOT and LGOTOT exactly for that purpose, but I'd like to find a way to download :


1) Cumulative volume for:

- HO

- RB

- CL

- all the pairs (e.g. LCOc1-LCOc2 + LCOc2-LCOc3 + etc..)


2) Cumulative Open Interest for:

- HO

- RB

-CL

- all the pairs (e.g. LCOc1-LCOc2 + LCOc2-LCOc3 + etc..)



thank you very much

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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
Accepted
3.8k 4 4 6

Hi @davide.costanzo

For futures you can always try to add suffix "TOT" to the RIC root to check whether there are RIC codes with that summarization:

ek.get_data(['HOTOT','RBTOT','CLTOT'],['OPINT_1','HST_VOL'])

For future spread RICs we don't have them but you can easily do the summary in pandas. However it seems that there is only volume for those contracts available.

df, e = ek.get_data('0#LCO-:','ACVOL_1')
df['ACVOL_1'].sum()



tot.jpg (15.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.

Upvotes
78.1k 246 52 72

@davide.costanzo

Please directly contact the Eikon support team via MyRefinitiv and ask for the formula (=TR) that can be used in the Eikon Excel to get the required data.

If the formula is available, it can be applied to the get_data method in the Eikon Data API to retrieve the same data.

Otherwise, you can use the Data Item Browser tool to find the required data. To use the Data Item Browser, please refer to this article.

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.