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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
27 2 1 5

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvote
Accepted
18k 21 12 20

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 5.0 MiB each and 10.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
18k 21 12 20

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 5.0 MiB each and 10.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.

Click below to post an Idea Post Idea