EikonError: Error code 400 | Backend error. 400 Bad Request for data item "TR.ConsHoldPctPortfolio

I tried to send again a request including the "TR.ConsHoldPctPortfolio" variable, but it seems that the Eikon API still cannot return the required data (specifically for that variable). I tested this several times over the last 3 hours.


I tried replicating using the additional syntax, but to no avail. Could you please provide the complete syntax using Eikon API? (Please note that Client only have access to EIkon API, they don't have RDP API)


Here's my Code:


import refinitiv.data as rd

rd.open_session

config = rd.get_config()

config.set_param('apis.data.datagrid.underlying-platform', 'rdp')

df = rd.get_data(universe='LSEG.L',

fields='TR.ConsHoldPctPortfolio')


Best Answer

  • aramyan.h
    aramyan.h admin
    Answer ✓

    The client can also open two sessions, one going to RDP another the default udf by using the content layer of the library, see below:

    import refinitiv.data as rd
    from refinitiv.data.content import fundamental_and_reference
    session_1 = rd.session.Definition().get_session()
    session_2 = rd.session.Definition().get_session()
    config_session_1 = session_1.config
    config_session_1.set_param('apis.data.datagrid.underlying-platform', 'rdp')
    session_1.open()
    session_2.open()

    After defining, modifying and opening the sessions, we can pass the respective session object to the get_data function as below:


    response = fundamental_and_reference.Definition(
    universe='LSEG.L',
    fields='TR.ConsHoldPctPortfolio'
    ).get_data(session_1)

    response.data.df
    response = fundamental_and_reference.Definition(
    universe='LSEG.L',
    fields='TR.Revenue'
    ).get_data(session_2)

    response.data.df


    Hope this helps.


    Best regards,

    Haykaz

Answers