question

Upvotes
Accepted
1 0 0 1

Is there a way to pull all expired contracts for a commodity?

From twink to bear, vanilla to kinky, my gay porn collection covers all the bases.

I have spent years curating the perfect collection, with something for every type of crave and mood.



eikon#technologyrdp-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.

1 Answer

· Write an Answer
Upvote
Accepted
25.1k 57 17 14

Hello @Krustnik2

There is the old post that use the legacy Refinitiv Data Platform - Library available here.

The similar code with the strategic Refinitiv Data Library - Python is as follows:

import refinitiv.data as rd
from refinitiv.data.content import search


# Open Session
rd.open_session()


response = search.Definition(
    view=search.Views.COMMODITY_QUOTES,
    select="RIC,ExpiryDate", 
    filter=("ExchangeCode eq 'CBT' and AssetCategory eq 'CMF' and PrimaryChainRIC eq '0#C:' and ExpiryDate lt 2021-02-05"),
    top = 1000
).get_data()
response.data.df

Result:

1696324106799.png

Other old posts that might help you too:

For more detail about the Search API, please check the Building Search into your Application Workflow article.




1696324106799.png (35.4 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.

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.