Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
36 4 4 11

Requesting certain fields using SDate and EDate returns multiple incomplete results

See below screenshot.

I want to request a historic value for 'TR.GR.RatingSPEquivalent', 'TR.GR.RatingSourceDescription' for a set of bonds. I do this by providing the same date to SDate and EDate.

Weirdly, I get multiple results for each bonds. Only one row per bond is actually complete, and the others only have the two fields listed above. I speculate that each row represents a distinct historic value for these fields. However, I only want the value at the provided SDate/EDate.


eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

Upvote
Accepted
18.2k 21 13 21

Hi @tr105

When you combined fields from different databases, date will not be aligned.

I would suggest that you separate them into 3 different requests to make it clear.

1. Realtime fields (Do no support SDate and EDate parameters)

rics = ['AU054379722=','AU054411928=']
fields = ['DSPLY_NAME', 'MATUR_DATE', 'ISSUE_DATE']
df, err = ek.get_data(rics, fields)
df


2. The TR.MIDYIELD

rics = ['AU054379722=','AU054411928=']
fields = ['TR.MIDYIELD.date','TR.MIDYIELD']
parameters={'SDate':'2019-08-13','EDate':'2019-08-13'}
df, err = ek.get_data(rics, fields,parameters)
df


3. The TR.GR.RatingSPEquivalent and TR.GR.RatingSourceDescription fields

rics = ['AU054379722=','AU054411928=']
fields = ['TR.GR.RatingSPEquivalent.date','TR.GR.RatingSPEquivalent','TR.GR.RatingSourceDescription.date','TR.GR.RatingSourceDescription']
parameters={'SDate':'2019-08-13','EDate':'2019-08-13'}
df, err = ek.get_data(rics, fields,parameters)
df


This is sample output:



ahs.png (65.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.

Thanks for your answer! That sort of makes sense. I can at least work around it.

However, looking at your example, it seems that when requesting TR.GR.RatingSPEquivalent.date etc. all historic values of these fields are returned. Not just the one I requested (the value at 2019-08-13). Does this mean the SDate and EDate parameters are simply ignored in this request? Why is that? Am I supposed to select the appropriate value myself?

Thanks!

Upvotes
18.2k 21 13 21

Hi @tr105

I think you can just use SDate.


ahs.png (37.1 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.

Ok, so if I understand correctly that means providing an SDate guarantees Eikon gives me the latest value before that SDate for a field?


Thanks again for your help.

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.