question

Upvotes
Accepted
77 5 12 17

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


eikon-data-api#product#contentrefinitiv-data-platform-libraries
1687533933667.png (110.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@laurens

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@laurens

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvotes
Accepted
14.2k 30 5 10

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.


1687753929392.png (6.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
77 5 12 17

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.