fields missing from rd.get_history but available in ek.get_data

If I run the below code using get_history the field DSPLY_NAME is not returned while when I run it using eikon I get the field value returned. Is it therefore in get_history not possible to mix up date and non date related items in a single api call?

import refinitiv.data as rd

# open session
rd.open_session()

df = rd.get_history(
universe=["AAPL.O"],
fields=["TR.Revenue.date","TR.Revenue","TR.GrossProfit","DSPLY_NAME"],
parameters={"Scale" : 6,"SDate" : 0,"EDate" : -3,"FRQ" : "FY", "Curn" : "EUR"}
)

df2 = rd.get_history(
universe=["AAPL.O"],
fields=["DSPLY_NAME]
)


image from code book (also a call to DSPLY_NAME only fails):

1687533933667.png


Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @laurens ,

    The DSPLY_NAME field is available in rd.get_data function. Hence, you could retrieve non-date related items with get_data then merge it with the date-related data retrieved from get_history

    rd.get_data(
    universe=["AAPL.O"],
    fields=["DSPLY_NAME"]
    )

    1687753929392.png

    Hope this helps and please let me know in case you have any further questions.

Answers

  • Hi @laurens ,

    The DSPLY_NAME field is available in rd.get_data function. Hence, you could retrieve non-date related items with get_data then merge it with the date-related data retrieved from get_history

    rd.get_data(
    universe=["AAPL.O"],
    fields=["DSPLY_NAME"]
    )

    1687753929392.png

    Hope this helps and please let me know in case you have any further questions.

  • thanks for the answer, off course I know I can make two requests and then merge. But I find it very strange that no error is presented that a field is requested but not delivered