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
23 0 0 3

List of relative sdate and edate formats

I am trying to do queries for dividends in C# using the Eikon Data API. I notice that if I supply exact dates, such as today through the end of the year:

sdate: 2023-05-27

edate: 2023-12-31


I get back empty results.

However, if I supply relative dates, they sometimes seem to work, such as:

sdate: 1D

edate: -1AY


My questions:

1) Why do absolute dates fail for dividend queries with the Eikon Data API?

2) Where can I find a listing of the various formats for relative dates, such as 1W,1Y etc...?

3) Is there any guidance for proper usage of dates, such as which should come first, which ones are better suited for dividend queries, etc?


For example, the fields I am querying are like:

"TR.TickerSymbol",
"TR.DivEventStatus",
"TR.DividendFrequency",
"TR.DivExDate",
"TR.DivPayDate",
"TR.DivRecordDate",
"TR.DivAnnouncementDate",
"TR.DivType",
"TR.DivPaymentType",
"TR.DivUnadjustedNet",
"TR.DivUnadjustedGross",
"TR.DivOriginalCurr"


Thanks.

eikon-data-apipython#technologydate
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.

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

Thanks,

AHS

Upvotes
Accepted
79.1k 250 52 74

@jiah

Thanks for reaching out to us.

You may need to specify "DateType" in the parameter.

Dictionary<string, string> parameters = new Dictionary<string, string> {
    { "SDate", "2023-05-27" },
    { "EDate","2023-12-31"},
    {"DateType","PD"}
};

 
var data = eikon.GetData(
    instruments,
    fields,
    parameters
    );

The possible values are:

1682643785097.png

For other parameters, please refer to the Data Item Browser tool.

I hope that this information is of help.


1682643785097.png (18.9 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
23 0 0 3

Using a date type of PED, start date of -1D and end date of 2CY seems to work now for me. You can close this ticket. Thank you.

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.