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.

Best Answer

  • Jirapongse
    Answer ✓

    @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.

Answers

  • 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.