How to get events time series via Python API?

Dear RDC team,I am trying to access the corporate events page via the Eikon API but I do not seem able to find the correct call to see, for instance, the equivalent of the AAPL.O EV page in the terminal. I am using Python and I have tried the functions eikon.get_timeseries, eikon.get_news_headlines and eikon.get_data. The get_data call seems to return the most recent event, but I am unable to get a list of historical events. I am looking specifically for events such as earnings announcements. Thanks

Best Answer

  • You can use Formula Builder in Eikon Excel to generate the formula and then apply it to eikon.get_data.

    For example, the formula in Eikon Excel to get historical events for AAPL.O is:

    =TR("AAPL.O","TR.EventStartDate;TR.EventType;TR.EventTitle","SDate=2015-08-01 EventType=ALL EDate=2017-11-20 CH=Fd RH=IN",C4)

    With the above formula, the parameters for eikon.get_data are:

    df = ek.get_data(["AAPL.O"], ["TR.EventStartDate", "TR.EventType", "TR.EventTitle"],{"SDate":"2015-08-01","EventType":"ALL", "EDate":"2017-11-20","CH":"Fd","RH":"IN"})

Answers