Issue when requesting timeseries for tweb intruments

I get a list of rics from chain_ric = '0#TWCORPERPS=', then I use this line of code :

rd.get_history(universe=tweb_rics[:100],,

fields=['MID_PRICE', 'MID_YLD_1'],

start='2024-10-16',

end='2024-10-17')

I only request the first 100 and I get an error message : "Error code -1 | 'headers".

Notice I dont get it when requesting only 10 rics or less.

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @kamel.irid1

    Thank you for reaching out to us.

    I don't have permission to access 0#TWCORPERPS= so I tested the code with 0#.SETI.

    The following code can run properly.

    seti = Chain("0#.SETI")
    df = rd.get_history(universe=seti.constituents[:100],
        fields=['TRDPRC_1', 'BID'],
        start='2024-10-16',
        end='2024-10-17')
    df

    Please check the version of RD library (rd.__version__) used by the application.

    You also need to enable the debug log by running the following code before rd.open_session():

    config = rd.get_config()
    config.set_param("logs.transports.console.enabled", True)
    config.set_param("logs.level", "debug")
     
    rd.open_session()

    This should produce the refinitiv-data-lib.log file.