get_dividends {eodhdR2} | R Documentation |
Retrieves dividend data from the api
Description
This function will query the dividend end point https://eodhd.com/financial-apis/api-splits-dividends and return:
dates (declaration, record, payment)
value of dividend (adjusted and unajusted)
currency of dividend
Usage
get_dividends(
ticker = "AAPL",
exchange = "US",
cache_folder = get_default_cache(),
check_quota = TRUE
)
Arguments
ticker |
A company ticker (e.g. AAPL). You can find all tickers for a particular exchange with |
exchange |
A exchange symbol (e.g. US). You can find all tickers for a particular exchange with |
cache_folder |
A local directory to store cache files. By default, all functions use a temporary path, meaning that the caching system is session persistent (it will remove all files when you exit your R session). If you want a persistent caching system, simply point argument cache_folder to a local directory in your filesystem. Be aware, however, that a persistent cache will not refresh your data for new api queries. |
check_quota |
A flag (TRUE/FALSE) for whether to check the current quota status from the api. This option implies a small cost of execution time. If you need speed, just set it to FALSE. |
Value
A dataframe with dividend information
Examples
## Not run:
set_token(get_demo_token())
df_div <- get_dividends(ticker = "AAPL", exchange = "US")
df_div
## End(Not run)