How to get data Open Interest for the following Options with the ROOT RIC

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.




Best Answer

  • aramyan.h
    aramyan.h admin
    Answer ✓

    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 rd
    from refinitiv.data.discovery import Chain
    rd.open_session()
    ric_list = Chain(name="0#SPXW*.U").constituents
    print(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'])


    screenshot-2024-09-23-at-113350.png

    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