rd.get_data returning None

Options

Hello I have properly opened a session with rd.open_session (desktop session) but my code is not returning anything.

import refinitiv.data as rd
rd.open_session(app_key = MY_APP_KEY)

data = rd.get_data(universe = ['0#SPXW*.U'], fields = ['PUTCALLIND'])

On the other hand, the eikon api returns me data ek.get_data(instruments = ['0#SPXW*.U'], fields = ['PUTCALLIND']).

My problem with the eikon api is that i get so often a UDF Core request failed. Gateway Time-out error, and i was hoping the refinitiv.data api to be more stable.

Also notice my RIC is extremely big (chain of 20k options), and I am not sure if there is a way to slice the query or change the configuration to allow bigger retrieval. Would you please advice?

Answers

  • wasin.w
    wasin.w admin
    edited July 18

    Hello @claudio_cirillo

    Can you try the following code? I am using the Data Library version 2.1.1, but the config should be the same for the RD Library (Data Library version 1.x).

    config = ld.get_config()
    config.set_param("apis.data.datagrid.underlying-platform", "rdp") # set the library to call RDP backend for the real-time data
    ld.get_config()["http.request-timeout"] = 100 #set the library HTTP request timeout, you may adjust the value data = ld.get_data(universe = ['0#SPXW*.U'], fields = ['PUTCALLIND'])
    data
    data.png