How to get data Open Interest for the following Options with the ROOT RIC. Similar case get_data for all RIC based on an option roots - Forum | Refinitiv Developer Community but the code seems to be outdated.
RIC: '0#SPXW*.U is what we are using.
Hi @marceugene.belen ,
To get the Open Interest on option ric chain constituent's, you will need to first expand the chain and then make the get data request. Please se below an example using RD Libraries for Python.
import refinitiv.data as rdfrom refinitiv.data.discovery import Chainrd.open_session()
ric_list = Chain(name="0#SPXW*.U").constituentsprint(len(ric_list))#17220
Since we have around 17220 RICs, it is best to make the request in batches, (e.g 500):
rd.get_data(universe=ric_list[:500], fields=['OPINT_1'])
If you are interested in more fields, you can skip the fields parameter and the output will contain all available fields for the given instrument.
Hope it helps.
Best regards,
Haykaz