eikonapir: how to get timeseries data for dividends field?

Hello,

I'm trying the R interface API using eikonrapi and I can successfully download timeseries of stock prices and volumes. I'd like to be able to get the dividend history of a stock but using the get_data() command gets me only the last instance and using the get_timeseries() only has these fields:

TIMESTAMP HIGH CLOSE LOW OPEN COUNT VOLUME N

as fields available (shown using "*"). How can I combine the 2 commands?

In Excel add-inn this is achieved through a TR commmand like:

=TR(XXX,"TR.DivExDate;TR.DivAdjustedGross;TR.DivCurr","DateType=XD
SDate=#XX EDate=XX",XX,XX,XX)

thanks,

Claudiu

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    Hi @claudiu

    The following function retrieves dividends for IBM between 1-Jan-2016 and today's date:

    get_data("IBM",list('TR.DivExDate','TR.DivAdjustedGross','TR.DivCurr'),list('DateType'='XD','SDate'='1D','EDate'='2016-01-01'))

    I hope it helps.

    Alex

Answers