| Title: | Official R API for Fetching Data from 'EODHD' |
|---|---|
| Description: | Second and backward-incompatible version of R package 'eodhd' <https://eodhd.com/>, extended with a cache and quota system, also offering functions for cleaning and aggregating the financial data. |
| Authors: | Marcelo S. Perlin [aut, cre, ctr], Unicorn Data Services [cph] |
| Maintainer: | Marcelo S. Perlin <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.8 |
| Built: | 2026-10-22 11:29:28 UTC |
| Source: | https://github.com/eodhistoricaldata/r-library-for-financial-data-2024 |
Queries the bulk endpoint https://eodhd.com/financial-apis/bulk-api-eod-splits-dividends, which returns the last trading day of every ticker of an exchange (or of the tickers given in argument symbols).
get_bulk_eod( exchange = "US", date = NULL, type = "eod", symbols = NULL, cache_folder = get_default_cache(), check_quota = TRUE )get_bulk_eod( exchange = "US", date = NULL, type = "eod", symbols = NULL, cache_folder = get_default_cache(), check_quota = TRUE )
exchange |
A exchange symbol (e.g. US). You can find all tickers for a particular exchange with |
date |
an optional date. Default (NULL) is the last trading day. |
type |
one of "eod" (default), "splits" or "dividends" |
symbols |
an optional character vector of tickers, without the exchange (e.g. c("AAPL", "MSFT")) |
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. |
A dataframe with one row per ticker
## Not run: set_token("YOUR_VALID_TOKEN") df_bulk <- get_bulk_eod("US", symbols = c("AAPL", "MSFT")) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_bulk <- get_bulk_eod("US", symbols = c("AAPL", "MSFT")) ## End(Not run)
Queries the bulk fundamentals endpoint https://eodhd.com/financial-apis/bulk-api-eod-splits-dividends, which returns the fundamental data of many companies in a single call. Mind the cost: each company of the response is charged as a fundamentals call.
get_bulk_fundamentals( exchange = "US", symbols = NULL, limit = 10, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_bulk_fundamentals( exchange = "US", symbols = NULL, limit = 10, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
exchange |
the exchange code (e.g. "US") |
symbols |
an optional character vector of tickers (e.g. c("AAPL", "MSFT")). Default (NULL) returns the companies of the page. |
limit |
number of companies of the page (default 10, maximum 1000) |
offset |
pagination offset (default 0) |
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. |
A named list, one element per company, in the same shape as
get_fundamentals()
## Not run: set_token("YOUR_VALID_TOKEN") l_bulk <- get_bulk_fundamentals("US", symbols = c("AAPL", "MSFT")) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") l_bulk <- get_bulk_fundamentals("US", symbols = c("AAPL", "MSFT")) ## End(Not run)
Queries the credit risk endpoints of eodhd for the aggregated metrics of the credit default swap market, by dimension (sector, region, rating).
get_cds_market_aggregates( metric = NULL, dimension = NULL, value = NULL, region = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_cds_market_aggregates( metric = NULL, dimension = NULL, value = NULL, region = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
metric |
an optional metric to aggregate |
dimension |
an optional dimension of the aggregation (e.g. "sector") |
value |
an optional value of the dimension (e.g. "Energy") |
region |
an optional region |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the cds market aggregates
## Not run: set_token("YOUR_VALID_TOKEN") df_agg <- get_cds_market_aggregates() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_agg <- get_cds_market_aggregates() ## End(Not run)
Queries the commodities endpoint of eodhd, which serves the daily, weekly and monthly series of energy, metals and agricultural commodities.
get_commodities( code = "WTI", interval = "daily", first_date = NULL, last_date = NULL, cache_folder = get_default_cache(), check_quota = TRUE )get_commodities( code = "WTI", interval = "daily", first_date = NULL, last_date = NULL, cache_folder = get_default_cache(), check_quota = TRUE )
code |
the code of the commodity (e.g. "WTI", "BRENT", "GOLD") |
interval |
"daily" (default), "weekly" or "monthly" |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
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. |
A dataframe with the historical prices of the commodity
## Not run: set_token("YOUR_VALID_TOKEN") df_wti <- get_commodities("WTI") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_wti <- get_commodities("WTI") ## End(Not run)
Queries the credit risk endpoints of eodhd for the corporate market distress index, a daily measure of the stress of the corporate bond market.
get_corporate_cmdi( first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_corporate_cmdi( first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the cmdi series
## Not run: set_token("YOUR_VALID_TOKEN") df_cmdi <- get_corporate_cmdi() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_cmdi <- get_corporate_cmdi() ## End(Not run)
Queries the credit risk endpoints of eodhd for the hqm corporate yield curve, by tenor.
get_corporate_hqm_yields( tenor = NULL, type = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_corporate_hqm_yields( tenor = NULL, type = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
tenor |
an optional tenor in years (e.g. 10) |
type |
an optional curve type |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the hqm yields
## Not run: set_token("YOUR_VALID_TOKEN") df_hqm <- get_corporate_hqm_yields(tenor = 10) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_hqm <- get_corporate_hqm_yields(tenor = 10) ## End(Not run)
Queries the credit risk endpoints of eodhd for the spread over the risk free rate of each rating bucket.
get_default_spreads( rating = NULL, as_of = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_default_spreads( rating = NULL, as_of = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
rating |
an optional rating (e.g. "Baa2") |
as_of |
an optional reference date. Default (NULL) is the latest release. |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the default spreads
## Not run: set_token("YOUR_VALID_TOKEN") df_spreads <- get_default_spreads() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_spreads <- get_default_spreads() ## End(Not run)
Returns token for demonstration
get_demo_token()get_demo_token()
A string with token
get_demo_token()get_demo_token()
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
get_dividends( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )get_dividends( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )
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. |
A dataframe with dividend information
## Not run: set_token(get_demo_token()) df_div <- get_dividends(ticker = "AAPL", exchange = "US") df_div ## End(Not run)## Not run: set_token(get_demo_token()) df_div <- get_dividends(ticker = "AAPL", exchange = "US") df_div ## End(Not run)
Queries the dividend calendar endpoint of eodhd. The api requires either a symbol or a single date, so one of arguments symbol and date must be given.
get_dividends_calendar( symbol = NULL, date = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_dividends_calendar( symbol = NULL, date = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
symbol |
a ticker with exchange (e.g. "AAPL.US") |
date |
a single date. Used when symbol is NULL. |
first_date |
an optional first date, to narrow the output of a symbol query |
last_date |
an optional last date, to narrow the output of a symbol query |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the dividend calendar
## Not run: set_token("YOUR_VALID_TOKEN") df_div <- get_dividends_calendar(symbol = "AAPL.US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_div <- get_dividends_calendar(symbol = "AAPL.US") ## End(Not run)
Queries https://eodhd.com/financial-apis/calendar-upcoming-earnings-ipos-and-splits and returns reported and upcoming earnings, with estimate, actual value and surprise.
get_earnings( first_date = Sys.Date(), last_date = Sys.Date() + 30, symbols = NULL, cache_folder = get_default_cache(), check_quota = TRUE )get_earnings( first_date = Sys.Date(), last_date = Sys.Date() + 30, symbols = NULL, cache_folder = get_default_cache(), check_quota = TRUE )
first_date |
the first date of the window. Default is today. |
last_date |
the last date of the window. Default is in one month. |
symbols |
an optional character vector of tickers with exchange (e.g. c("AAPL.US", "MSFT.US")). Default (NULL) returns every company. |
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. |
A dataframe with the earnings calendar
## Not run: set_token("YOUR_VALID_TOKEN") df_earnings <- get_earnings(symbols = "AAPL.US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_earnings <- get_earnings(symbols = "AAPL.US") ## End(Not run)
Queries the earning trends endpoint https://eodhd.com/financial-apis/calendar-upcoming-earnings-ipos-and-splits, which returns, for each period, the average analyst estimate for earnings and revenue, together with the revisions of the last months.
get_earnings_trends( symbols = "AAPL.US", cache_folder = get_default_cache(), check_quota = TRUE )get_earnings_trends( symbols = "AAPL.US", cache_folder = get_default_cache(), check_quota = TRUE )
symbols |
a character vector of tickers with exchange (e.g. c("AAPL.US", "MSFT.US")) |
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. |
A dataframe with the analyst estimates
## Not run: set_token("YOUR_VALID_TOKEN") df_trends <- get_earnings_trends("AAPL.US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_trends <- get_earnings_trends("AAPL.US") ## End(Not run)
Queries https://eodhd.com/financial-apis/macroeconomics-data-and-macro-indicators-api for the scheduled and released macroeconomic events, with actual, estimate and previous values.
get_economic_events( first_date = Sys.Date(), last_date = Sys.Date() + 30, country = NULL, comparison = NULL, limit = 50, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_economic_events( first_date = Sys.Date(), last_date = Sys.Date() + 30, country = NULL, comparison = NULL, limit = 50, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
first_date |
the first date of the window. Default is today. |
last_date |
the last date of the window. Default is in one month. |
country |
an optional country code in ISO 3166-1 alpha 2 (e.g. "US") |
comparison |
an optional comparison period ("mom", "qoq" or "yoy") |
limit |
maximum number of events (default 50, maximum 1000) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the economic events
## Not run: set_token("YOUR_VALID_TOKEN") df_events <- get_economic_events(country = "US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_events <- get_economic_events(country = "US") ## End(Not run)
A low level escape hatch for the endpoints that do not (yet) have a dedicated function in the package. See https://eodhd.com/financial-apis/ for the full list of endpoints and their parameters. The api token is added for you.
get_eodhd( endpoint, params = list(), as_dataframe = TRUE, cache_folder = get_default_cache(), check_quota = TRUE )get_eodhd( endpoint, params = list(), as_dataframe = TRUE, cache_folder = get_default_cache(), check_quota = TRUE )
endpoint |
the endpoint path, without the base url and without the token (e.g. "eod/AAPL.US", "real-estate/US", "sanctions/entities") |
params |
a named list of query parameters (e.g. list(from = "2026-01-01")) |
as_dataframe |
if TRUE (default) the response is parsed into a dataframe. Set it to FALSE for endpoints that return a nested object (the raw list is returned instead). |
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. |
a dataframe (or a list, when as_dataframe = FALSE)
## Not run: set_token("YOUR_VALID_TOKEN") df_rates <- get_eodhd("ust/yield-rates", list(`filter[year]` = 2026)) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_rates <- get_eodhd("ust/yield-rates", list(`filter[year]` = 2026)) ## End(Not run)
Queries https://eodhd.com/financial-apis/exchanges-api-list-of-tickers-and-trading-hours and returns trading hours, holidays and the number of active tickers of an exchange.
get_exchange_details( exchange = "US", first_date = NULL, last_date = NULL, cache_folder = get_default_cache(), check_quota = TRUE )get_exchange_details( exchange = "US", first_date = NULL, last_date = NULL, cache_folder = get_default_cache(), check_quota = TRUE )
exchange |
A exchange symbol (e.g. US). You can find all tickers for a particular exchange with |
first_date |
optional first date of the holiday window |
last_date |
optional last date of the holiday window |
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. |
A list with the exchange details (including dataframes of trading hours and holidays)
## Not run: set_token("YOUR_VALID_TOKEN") l_details <- get_exchange_details("US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") l_details <- get_exchange_details("US") ## End(Not run)
Retrieves the list of available exchanges
get_exchanges(cache_folder = get_default_cache())get_exchanges(cache_folder = get_default_cache())
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. |
a dataframe with information about available exchanges
# you need a valid token (not test) for this to work ## Not run: set_token("YOUR_VALID_TOKEN") df_exc <- get_exchanges() ## End(Not run)# you need a valid token (not test) for this to work ## Not run: set_token("YOUR_VALID_TOKEN") df_exc <- get_exchanges() ## End(Not run)
This function will download raw data from the fundamental end point of eodhd https://eodhd.com/financial-apis/stock-etfs-fundamental-data-feeds and return a list. The raw data includes:
General information for the company (code, ISIN, currency, ..)
Financial highlights
Valuation
Raw financial data (see parse_financials() for parsing this data)
and many more (see example for more details regarding the output)
get_fundamentals( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )get_fundamentals( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )
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. |
a list with several fundamental information
## Not run: set_token(get_demo_token()) l_out <- get_fundamentals(ticker = "AAPL", exchange = "US") names(l_out) ## End(Not run)## Not run: set_token(get_demo_token()) l_out <- get_fundamentals(ticker = "AAPL", exchange = "US") names(l_out) ## End(Not run)
Queries the funding stress endpoint of eodhd, with the spreads used to monitor the stress of the money market.
get_funding_stress_spreads( code = NULL, first_date = NULL, last_date = NULL, cache_folder = get_default_cache(), check_quota = TRUE )get_funding_stress_spreads( code = NULL, first_date = NULL, last_date = NULL, cache_folder = get_default_cache(), check_quota = TRUE )
code |
an optional code of the spread |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
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. |
A dataframe with the funding stress spreads
## Not run: set_token("YOUR_VALID_TOKEN") df_spreads <- get_funding_stress_spreads() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_spreads <- get_funding_stress_spreads() ## End(Not run)
Queries https://eodhd.com/financial-apis/stock-etfs-fundamental-data-feeds (historical market capitalisation), which returns the daily market cap of a company. History is limited to the last year for most subscriptions.
get_historical_market_cap( ticker = "AAPL", exchange = "US", first_date = Sys.Date() - 365, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )get_historical_market_cap( ticker = "AAPL", exchange = "US", first_date = Sys.Date() - 365, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )
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 |
first_date |
the first date of the window. Default is one year ago. |
last_date |
the last date of the window. Default is today. |
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. |
A dataframe with columns date and value
## Not run: set_token("YOUR_VALID_TOKEN") df_cap <- get_historical_market_cap("AAPL", "US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_cap <- get_historical_market_cap("AAPL", "US") ## End(Not run)
Queries the id mapping endpoint of eodhd. Give it one identifier and it returns all the others.
get_id_mapping( symbol = NULL, exchange = NULL, isin = NULL, figi = NULL, lei = NULL, cusip = NULL, cik = NULL, limit = 50, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_id_mapping( symbol = NULL, exchange = NULL, isin = NULL, figi = NULL, lei = NULL, cusip = NULL, cik = NULL, limit = 50, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
symbol |
an optional ticker (e.g. "AAPL") |
exchange |
an optional exchange code, used together with symbol |
isin, figi, lei, cusip, cik
|
optional identifiers, one is enough |
limit |
maximum number of rows (default 50) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the matching identifiers
## Not run: set_token("YOUR_VALID_TOKEN") df_ids <- get_id_mapping(symbol = "AAPL") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_ids <- get_id_mapping(symbol = "AAPL") ## End(Not run)
Retrieves the current and historical components of a financial index from the EODHD API. Uses a caching system to avoid redundant API calls.
get_index_composition(index, cache_folder = get_default_cache())get_index_composition(index, cache_folder = get_default_cache())
index |
index to find composition (e.g. "GSPC.INDX") |
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. |
a list with three elements: info, current_components, historical_components
## Not run: l_out <- get_index_composition("GSPC.INDX") str(l_out) ## End(Not run)## Not run: l_out <- get_index_composition("GSPC.INDX") str(l_out) ## End(Not run)
Queries the S&P Global data of the eodhd marketplace and returns the indices
that have components available for get_index_composition().
get_index_list(cache_folder = get_default_cache(), check_quota = TRUE)get_index_list(cache_folder = get_default_cache(), check_quota = TRUE)
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. |
A dataframe with the available indices
## Not run: set_token("YOUR_VALID_TOKEN") df_indices <- get_index_list() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_indices <- get_index_list() ## End(Not run)
Queries https://eodhd.com/financial-apis/insider-transactions-api, with the purchases and sales reported by the insiders of US companies (SEC form 4).
get_insider_transactions( ticker = NULL, exchange = "US", first_date = Sys.Date() - 90, last_date = Sys.Date(), limit = 100, cache_folder = get_default_cache(), check_quota = TRUE )get_insider_transactions( ticker = NULL, exchange = "US", first_date = Sys.Date() - 90, last_date = Sys.Date(), limit = 100, cache_folder = get_default_cache(), check_quota = TRUE )
ticker |
an optional company ticker (e.g. "AAPL"). Default (NULL) returns the transactions of every company in the window. |
exchange |
the exchange of the ticker (default "US") |
first_date |
the first date of the window. Default is 90 days ago. |
last_date |
the last date of the window. Default is today. |
limit |
maximum number of rows (default 100, maximum 1000) |
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. |
A dataframe with the insider transactions
## Not run: set_token("YOUR_VALID_TOKEN") df_insider <- get_insider_transactions("AAPL") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_insider <- get_insider_transactions("AAPL") ## End(Not run)
This function will query the intraday endpoint of eodhd https://eodhd.com/financial-apis/intraday-historical-data-api and return all bars available within a user supplied time period. Since the api limits how far back a single query can reach, the function walks backwards in time, querying consecutive windows until the first date is covered.
get_intraday( ticker = "AAPL", exchange = "US", frequency = "5m", first_date = Sys.Date() - 7, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )get_intraday( ticker = "AAPL", exchange = "US", frequency = "5m", first_date = Sys.Date() - 7, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )
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 |
frequency |
The frequency of the intraday data. Available options: "1m"= 1 minute, "5m" = 5 minutes, "1h" = 1 hour |
first_date |
the first date of the query window. The function will keep querying the api until this date is reached. Default is previous week. |
last_date |
the last date of the query window. Default is today. |
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. |
A dataframe with intraday prices (datetime, open, high, low, close, volume)
## Not run: set_token(get_demo_token()) df_intraday <- get_intraday(ticker = "AAPL", exchange = "US") ## End(Not run)## Not run: set_token(get_demo_token()) df_intraday <- get_intraday(ticker = "AAPL", exchange = "US") ## End(Not run)
This function will query the IPO end point of eodhd and return all ipos for a user supplied time period.
get_ipos( first_date = Sys.Date() - 3 * 365, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )get_ipos( first_date = Sys.Date() - 3 * 365, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )
first_date |
the first date to fetch ipos information. Default is previous three years |
last_date |
the last date to fetch news. Default is today. |
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. |
A dataframe with news events and sentiments
## Not run: set_token("YOUR_VALID_TOKEN") df_news <- get_ipos() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_news <- get_ipos() ## End(Not run)
Queries https://eodhd.com/financial-apis/macroeconomics-data-and-macro-indicators-api, which serves the World Bank series (gdp, inflation, unemployment, population and 40 others) by country.
get_macro_indicator( country = "USA", indicator = "gdp_current_usd", cache_folder = get_default_cache(), check_quota = TRUE )get_macro_indicator( country = "USA", indicator = "gdp_current_usd", cache_folder = get_default_cache(), check_quota = TRUE )
country |
a country code in ISO 3166-1 alpha 3 (e.g. "USA", "DEU", "BRA") |
indicator |
the code of the indicator (default "gdp_current_usd"). The full list is at the endpoint documentation. |
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. |
A dataframe with the historical values of the indicator
## Not run: set_token("YOUR_VALID_TOKEN") df_gdp <- get_macro_indicator("USA", "gdp_current_usd") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_gdp <- get_macro_indicator("USA", "gdp_current_usd") ## End(Not run)
This function will query the news point of eodhd and return all news for a user supplied time period.
get_news( ticker = "AAPL", exchange = "US", first_date = Sys.Date() - 3 * 30, last_date = Sys.Date(), offset_delta = 500, cache_folder = get_default_cache(), check_quota = TRUE )get_news( ticker = "AAPL", exchange = "US", first_date = Sys.Date() - 3 * 30, last_date = Sys.Date(), offset_delta = 500, cache_folder = get_default_cache(), check_quota = TRUE )
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 |
first_date |
the first date to fetch news. The function will keep querying the api until this date is reached. Default is previous three months. |
last_date |
the last date to fetch news. Default is today. |
offset_delta |
how much to change offset in each iterations (higher values will result in more query time, but less queries). Default is 500. |
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. |
A dataframe with news events and sentiments
## Not run: set_token(get_demo_token()) df_news <- get_news(ticker = "AAPL", exchange = "US") ## End(Not run)## Not run: set_token(get_demo_token()) df_news <- get_news(ticker = "AAPL", exchange = "US") ## End(Not run)
Queries the news word weights endpoint of eodhd, which returns the keywords of the news of a ticker with their weight.
get_news_word_weights( ticker = "AAPL", exchange = "US", first_date = NULL, last_date = NULL, limit = 50, cache_folder = get_default_cache(), check_quota = TRUE )get_news_word_weights( ticker = "AAPL", exchange = "US", first_date = NULL, last_date = NULL, limit = 50, cache_folder = get_default_cache(), check_quota = TRUE )
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 |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
limit |
maximum number of words (default 50) |
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. |
A dataframe with columns word and weight
## Not run: set_token("YOUR_VALID_TOKEN") df_words <- get_news_word_weights("AAPL", "US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_words <- get_news_word_weights("AAPL", "US") ## End(Not run)
Queries the contracts of the Unicorn Bay options data https://eodhd.com/marketplace/unicornbay/options. Each row is one contract, with its strike, expiration, greeks and implied volatility.
get_options_contracts( underlying_symbol = "AAPL", contract = NULL, type = NULL, exp_date = NULL, first_exp_date = NULL, last_exp_date = NULL, first_strike = NULL, last_strike = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_options_contracts( underlying_symbol = "AAPL", contract = NULL, type = NULL, exp_date = NULL, first_exp_date = NULL, last_exp_date = NULL, first_strike = NULL, last_strike = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
underlying_symbol |
the underlying symbol, without the exchange (e.g. "AAPL"). This endpoint only covers US options, so a symbol given with its exchange ("AAPL.US") is trimmed for you. |
contract |
an optional single contract code (e.g. "AAPL270115C00200000"). When given, the underlying symbol is ignored by the api. |
type |
an optional type of contract ("call" or "put") |
exp_date |
a single expiration date, or NULL |
first_exp_date |
an optional first expiration date of the window |
last_exp_date |
an optional last expiration date of the window |
first_strike |
an optional lower bound of the strike |
last_strike |
an optional upper bound of the strike |
sort |
an optional sort expression (e.g. "-exp_date") |
limit |
maximum number of rows (default 100, maximum 1000) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the option contracts
## Not run: set_token("YOUR_VALID_TOKEN") df_contracts <- get_options_contracts("AAPL", type = "call") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_contracts <- get_options_contracts("AAPL", type = "call") ## End(Not run)
Queries the eod endpoint of the Unicorn Bay options data https://eodhd.com/marketplace/unicornbay/options, with one row per contract and trading day.
get_options_eod( underlying_symbol = "AAPL", contract = NULL, type = NULL, date = NULL, first_date = NULL, last_date = NULL, exp_date = NULL, first_exp_date = NULL, last_exp_date = NULL, first_strike = NULL, last_strike = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_options_eod( underlying_symbol = "AAPL", contract = NULL, type = NULL, date = NULL, first_date = NULL, last_date = NULL, exp_date = NULL, first_exp_date = NULL, last_exp_date = NULL, first_strike = NULL, last_strike = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
underlying_symbol |
the underlying symbol, without the exchange (e.g. "AAPL"). This endpoint only covers US options, so a symbol given with its exchange ("AAPL.US") is trimmed for you. |
contract |
an optional single contract code (e.g. "AAPL270115C00200000"). When given, the underlying symbol is ignored by the api. |
type |
an optional type of contract ("call" or "put") |
date |
a single trading date, or NULL |
first_date |
an optional first trading date of the window |
last_date |
an optional last trading date of the window |
exp_date |
a single expiration date, or NULL |
first_exp_date |
an optional first expiration date of the window |
last_exp_date |
an optional last expiration date of the window |
first_strike |
an optional lower bound of the strike |
last_strike |
an optional upper bound of the strike |
sort |
an optional sort expression (e.g. "-exp_date") |
limit |
maximum number of rows (default 100, maximum 1000) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the end of day prices of the contracts
## Not run: set_token("YOUR_VALID_TOKEN") df_eod <- get_options_eod("AAPL") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_eod <- get_options_eod("AAPL") ## End(Not run)
Queries the Unicorn Bay options data of the eodhd marketplace https://eodhd.com/marketplace/unicornbay/options, and returns the underlying symbols that have contracts available.
get_options_underlyings( limit = 1000, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_options_underlyings( limit = 1000, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
limit |
maximum number of rows (default 1000) |
offset |
pagination offset (default 0) |
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. |
A dataframe with one column, underlying_symbol
## Not run: set_token("YOUR_VALID_TOKEN") df_underlyings <- get_options_underlyings() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_underlyings <- get_options_underlyings() ## End(Not run)
Queries the policy rates endpoint of eodhd, with the historical decisions of the central banks (fed funds target, ecb deposit rate, and so on).
get_policy_rates( code = NULL, country = NULL, central_bank = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_policy_rates( code = NULL, country = NULL, central_bank = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
code |
an optional code of the rate (e.g. "FED_FUNDS_TARGET_UPPER") |
country |
an optional country code (e.g. "US") |
central_bank |
an optional central bank code (e.g. "FED", "ECB") |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the policy rates
## Not run: set_token("YOUR_VALID_TOKEN") df_policy <- get_policy_rates(central_bank = "FED") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_policy <- get_policy_rates(central_bank = "FED") ## End(Not run)
This function will query the price end point of eodhd and return daily stock price from a set of ticker and exchange. It also includes the daily stock return (percentage variation).
get_prices( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )get_prices( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )
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. |
A dataframe with prices
## Not run: set_token(get_demo_token()) df_prices <- get_prices(ticker = "AAPL", exchange = "US") ## End(Not run)## Not run: set_token(get_demo_token()) df_prices <- get_prices(ticker = "AAPL", exchange = "US") ## End(Not run)
Queries the real estate endpoints of eodhd for the headline indices of a country (house prices, rents and their real counterparts).
get_real_estate( code = "US", type = NULL, metric = NULL, first_date = NULL, last_date = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_real_estate( code = "US", type = NULL, metric = NULL, first_date = NULL, last_date = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
code |
the country code (e.g. "US"). See |
type |
an optional type of series |
metric |
an optional metric |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
sort |
an optional sort expression (e.g. "code") |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the real estate series
## Not run: set_token("YOUR_VALID_TOKEN") df_re <- get_real_estate("US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_re <- get_real_estate("US") ## End(Not run)
Queries the real estate endpoints of eodhd, which serve house price indices and rent series by country and region.
get_real_estate_countries( sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_real_estate_countries( sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
sort |
an optional sort expression (e.g. "code") |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the available countries
## Not run: set_token("YOUR_VALID_TOKEN") df_countries <- get_real_estate_countries() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_countries <- get_real_estate_countries() ## End(Not run)
Queries the detailed real estate endpoint of eodhd, which breaks the series of a country by area, property type and vintage.
get_real_estate_detailed( code = "US", area = NULL, property_type = NULL, vintage = NULL, freq = NULL, first_date = NULL, last_date = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_real_estate_detailed( code = "US", area = NULL, property_type = NULL, vintage = NULL, freq = NULL, first_date = NULL, last_date = NULL, sort = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
code |
the country code (e.g. "US"). See |
area |
an optional area (e.g. a metropolitan area) |
property_type |
an optional property type |
vintage |
an optional vintage of the series |
freq |
an optional frequency of the series |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
sort |
an optional sort expression (e.g. "code") |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the detailed real estate series
## Not run: set_token("YOUR_VALID_TOKEN") df_re <- get_real_estate_detailed("US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_re <- get_real_estate_detailed("US") ## End(Not run)
Lists the series available at get_real_estate_detailed() for a
country, with their area, property type and vintage.
get_real_estate_series( code = "US", cache_folder = get_default_cache(), check_quota = TRUE )get_real_estate_series( code = "US", cache_folder = get_default_cache(), check_quota = TRUE )
code |
the country code (e.g. "US"). See |
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. |
A dataframe with the available series
## Not run: set_token("YOUR_VALID_TOKEN") df_series <- get_real_estate_series("US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_series <- get_real_estate_series("US") ## End(Not run)
Queries the live/delayed endpoint https://eodhd.com/financial-apis/live-ohlcv-stocks-api for one or more tickers. The delay depends on the exchange and on your subscription. Live data is never cached.
get_real_time( ticker = "AAPL", exchange = "US", extra_tickers = NULL, check_quota = TRUE )get_real_time( ticker = "AAPL", exchange = "US", extra_tickers = NULL, check_quota = TRUE )
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 |
extra_tickers |
an optional character vector of additional tickers, with exchange included (e.g. c("TSLA.US", "VTI.US")). The api allows up to 15 extra tickers per call. |
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. |
A dataframe with one row per ticker
## Not run: set_token(get_demo_token()) df_live <- get_real_time(ticker = "AAPL", exchange = "US") ## End(Not run)## Not run: set_token(get_demo_token()) df_live <- get_real_time(ticker = "AAPL", exchange = "US") ## End(Not run)
Queries the reference rates endpoint of eodhd, with the benchmark overnight rates (SOFR, ESTR, SONIA and others).
get_reference_rates( code = NULL, currency = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_reference_rates( code = NULL, currency = NULL, first_date = NULL, last_date = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
code |
an optional code of the rate (e.g. "SOFR") |
currency |
an optional currency of the rate ("USD", "GBP" or "EUR") |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the reference rates
## Not run: set_token("YOUR_VALID_TOKEN") df_sofr <- get_reference_rates(code = "SOFR") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_sofr <- get_reference_rates(code = "SOFR") ## End(Not run)
Queries the sanctions endpoints of eodhd, which consolidate the lists of the main sanctioning bodies (OFAC, EU, UK and others).
get_sanctions_entities( source = NULL, type = NULL, program = NULL, country = NULL, query = NULL, active = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_sanctions_entities( source = NULL, type = NULL, program = NULL, country = NULL, query = NULL, active = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
source |
an optional source of the list (see |
type |
an optional type of entity (e.g. "individual", "entity") |
program |
an optional sanction program (see |
country |
an optional country code |
query |
an optional free text search |
active |
an optional flag (TRUE/FALSE) to keep only the active records |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the sanctioned entities
## Not run: set_token("YOUR_VALID_TOKEN") df_entities <- get_sanctions_entities(country = "RU", limit = 10) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_entities <- get_sanctions_entities(country = "RU", limit = 10) ## End(Not run)
Lists the programs that can be used to filter get_sanctions_entities().
get_sanctions_programs(cache_folder = get_default_cache(), check_quota = TRUE)get_sanctions_programs(cache_folder = get_default_cache(), check_quota = TRUE)
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. |
A dataframe with the sanction programs
## Not run: set_token("YOUR_VALID_TOKEN") df_programs <- get_sanctions_programs() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_programs <- get_sanctions_programs() ## End(Not run)
Lists the sanctioning bodies behind the consolidated data, with the date of their last update.
get_sanctions_sources(cache_folder = get_default_cache(), check_quota = TRUE)get_sanctions_sources(cache_folder = get_default_cache(), check_quota = TRUE)
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. |
A dataframe with the sources
## Not run: set_token("YOUR_VALID_TOKEN") df_sources <- get_sanctions_sources() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_sources <- get_sanctions_sources() ## End(Not run)
Queries the sanctions endpoints of eodhd for the vessels of the consolidated lists, searchable by IMO number and flag.
get_sanctions_vessels( source = NULL, imo = NULL, flag = NULL, vessel_type = NULL, query = NULL, program = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_sanctions_vessels( source = NULL, imo = NULL, flag = NULL, vessel_type = NULL, query = NULL, program = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
source |
an optional source of the list (see |
imo |
an optional IMO number of the vessel |
flag |
an optional flag (country) of the vessel |
vessel_type |
an optional type of vessel |
query |
an optional free text search |
program |
an optional sanction program (see |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the sanctioned vessels
## Not run: set_token("YOUR_VALID_TOKEN") df_vessels <- get_sanctions_vessels(limit = 10) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_vessels <- get_sanctions_vessels(limit = 10) ## End(Not run)
Queries the screener endpoint https://eodhd.com/financial-apis/stock-market-screener-api. Filters are given as a list of conditions, each one a list of field, operation and value – the function converts them to the json string the api expects.
get_screener( filters = NULL, signals = NULL, sort = NULL, limit = 50, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_screener( filters = NULL, signals = NULL, sort = NULL, limit = 50, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
filters |
a list of conditions, e.g. list(list("market_capitalization", ">", 1e12), list("exchange", "=", "us")). A character string with the json expected by the api is also accepted. |
signals |
an optional character vector of signals (e.g. "bookvalue_neg", "200d_new_lo") |
sort |
an optional sorting rule (e.g. "market_capitalization.desc") |
limit |
maximum number of rows (default 50, maximum 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the screened companies
## Not run: set_token("YOUR_VALID_TOKEN") df_screen <- get_screener( filters = list(list("market_capitalization", ">", 1e12)) ) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_screen <- get_screener( filters = list(list("market_capitalization", ">", 1e12)) ) ## End(Not run)
Queries the search endpoint https://eodhd.com/financial-apis/search-api-for-stocks-etfs-mutual-funds, which accepts a company name, a ticker or an isin and returns the matching instruments.
get_search( query, limit = 15, type = NULL, exchange = NULL, cache_folder = get_default_cache(), check_quota = TRUE )get_search( query, limit = 15, type = NULL, exchange = NULL, cache_folder = get_default_cache(), check_quota = TRUE )
query |
the text to search for (e.g. "apple", "AAPL", "US0378331005") |
limit |
maximum number of results (default 15, maximum 500) |
type |
an optional instrument type ("stock", "etf", "fund", "bonds", "index", "commodity", "crypto") |
exchange |
an optional exchange code, to restrict the search |
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. |
A dataframe with the matching instruments
## Not run: set_token("YOUR_VALID_TOKEN") df_search <- get_search("apple") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_search <- get_search("apple") ## End(Not run)
Queries the sentiment endpoint https://eodhd.com/financial-apis/stock-market-financial-news-api, which aggregates, by day, the number of news articles of a ticker and their normalised sentiment (from -1 to 1).
get_sentiments( symbols = "AAPL.US", first_date = Sys.Date() - 30, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )get_sentiments( symbols = "AAPL.US", first_date = Sys.Date() - 30, last_date = Sys.Date(), cache_folder = get_default_cache(), check_quota = TRUE )
symbols |
a character vector of tickers with exchange (e.g. c("AAPL.US", "BTC-USD.CC")) |
first_date |
the first date of the window. Default is 30 days ago. |
last_date |
the last date of the window. Default is today. |
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. |
A dataframe with columns symbol, date, count and normalized
## Not run: set_token("YOUR_VALID_TOKEN") df_sentiment <- get_sentiments("AAPL.US") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_sentiment <- get_sentiments("AAPL.US") ## End(Not run)
Queries the credit risk endpoints of eodhd for the credit default swap spreads of the sovereign issuers.
get_sovereign_cds_spreads( country = NULL, as_of = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_sovereign_cds_spreads( country = NULL, as_of = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
country |
an optional country code (e.g. "BR") |
as_of |
an optional reference date. Default (NULL) is the latest release. |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the sovereign cds spreads
## Not run: set_token("YOUR_VALID_TOKEN") df_cds <- get_sovereign_cds_spreads() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_cds <- get_sovereign_cds_spreads() ## End(Not run)
Queries the credit risk endpoints of eodhd for the ratings of the three major agencies by country.
get_sovereign_credit_ratings( country = NULL, as_of = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_sovereign_credit_ratings( country = NULL, as_of = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
country |
an optional country code (e.g. "BR") |
as_of |
an optional reference date. Default (NULL) is the latest release. |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the sovereign credit ratings
## Not run: set_token("YOUR_VALID_TOKEN") df_ratings <- get_sovereign_credit_ratings() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_ratings <- get_sovereign_credit_ratings() ## End(Not run)
This function will query the splits end point of eodhd and return all split information for a given stock/exchange.
get_splits( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )get_splits( ticker = "AAPL", exchange = "US", cache_folder = get_default_cache(), check_quota = TRUE )
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. |
A dataframe with split information
## Not run: # requires a subscription (paid) token df_split <- get_splits(ticker = "AAPL", exchange = "US") ## End(Not run)## Not run: # requires a subscription (paid) token df_split <- get_splits(ticker = "AAPL", exchange = "US") ## End(Not run)
Queries https://eodhd.com/financial-apis/calendar-upcoming-earnings-ipos-and-splits and returns the stock splits of a period, including the upcoming ones.
get_splits_calendar( first_date = Sys.Date(), last_date = Sys.Date() + 30, cache_folder = get_default_cache(), check_quota = TRUE )get_splits_calendar( first_date = Sys.Date(), last_date = Sys.Date() + 30, cache_folder = get_default_cache(), check_quota = TRUE )
first_date |
the first date of the window. Default is today. |
last_date |
the last date of the window. Default is in one month. |
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. |
A dataframe with the splits calendar
## Not run: set_token("YOUR_VALID_TOKEN") df_splits <- get_splits_calendar() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_splits <- get_splits_calendar() ## End(Not run)
Queries https://eodhd.com/financial-apis/exchanges-api-list-of-tickers-and-trading-hours (symbol change history) and returns the tickers that were renamed within a period. Useful for keeping a database of symbols in sync.
get_symbol_change_history( first_date = Sys.Date() - 30, last_date = Sys.Date(), exchange = NULL, cache_folder = get_default_cache(), check_quota = TRUE )get_symbol_change_history( first_date = Sys.Date() - 30, last_date = Sys.Date(), exchange = NULL, cache_folder = get_default_cache(), check_quota = TRUE )
first_date |
the first date of the window. Default is 30 days ago. |
last_date |
the last date of the window. Default is today. |
exchange |
an optional exchange code, to restrict the output |
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. |
A dataframe with old symbol, new symbol and effective date
## Not run: set_token("YOUR_VALID_TOKEN") df_changes <- get_symbol_change_history() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_changes <- get_symbol_change_history() ## End(Not run)
Queries the technical endpoint https://eodhd.com/financial-apis/technical-indicators-api, which computes an indicator (moving averages, rsi, macd, bollinger bands, beta, ..) on the server side. See the api documentation for the full list of indicators and of the parameters each one accepts.
get_technical( ticker = "AAPL", exchange = "US", indicator = "sma", period = 50, first_date = Sys.Date() - 365, last_date = Sys.Date(), order = "a", ..., cache_folder = get_default_cache(), check_quota = TRUE )get_technical( ticker = "AAPL", exchange = "US", indicator = "sma", period = 50, first_date = Sys.Date() - 365, last_date = Sys.Date(), order = "a", ..., cache_folder = get_default_cache(), check_quota = TRUE )
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 |
indicator |
the indicator to compute (api parameter "function"), e.g. "sma", "ema", "rsi", "macd", "bbands", "volatility", "stochastic" |
period |
the number of periods used by the indicator. Default is 50. |
first_date |
the first date of the output. Default is one year ago. Note that the api needs history before this date to compute the indicator, so ask for a window comfortably longer than the period. |
last_date |
the last date of the output. Default is today. |
order |
"d" for descending dates or "a" (default) for ascending |
... |
any other parameter accepted by the indicator (e.g. fast_period = 12) |
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. |
A dataframe with the indicator values
## Not run: set_token("YOUR_VALID_TOKEN") df_sma <- get_technical("AAPL", "US", indicator = "sma", period = 50) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_sma <- get_technical("AAPL", "US", indicator = "sma", period = 50) ## End(Not run)
Retrieves a list of tickers for a particular exchange
get_tickers(exchange = "US", cache_folder = get_default_cache())get_tickers(exchange = "US", cache_folder = get_default_cache())
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. |
A dataframe with a list of tickers
## Not run: # requires a subscription (paid) token df_tickers <- get_tickers("US") ## End(Not run)## Not run: # requires a subscription (paid) token df_tickers <- get_tickers("US") ## End(Not run)
Queries the tick endpoint https://eodhd.com/financial-apis/us-stock-market-tick-data-api, which returns every trade of a symbol within a time window. The window is given in unix timestamps (seconds), as required by the api.
get_ticks( ticker = "AAPL", exchange = "US", first_time = Sys.time() - 3600, last_time = Sys.time(), limit = 1000, cache_folder = get_default_cache(), check_quota = TRUE )get_ticks( ticker = "AAPL", exchange = "US", first_time = Sys.time() - 3600, last_time = Sys.time(), limit = 1000, cache_folder = get_default_cache(), check_quota = TRUE )
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 |
first_time |
the start of the window, as a POSIXct or as a unix timestamp |
last_time |
the end of the window, as a POSIXct or as a unix timestamp |
limit |
maximum number of ticks (api default is 1, maximum 10000) |
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. |
A dataframe with tick data
## Not run: set_token("YOUR_VALID_TOKEN") df_ticks <- get_ticks("AAPL", "US", first_time = Sys.time() - 3600, last_time = Sys.time()) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_ticks <- get_ticks("AAPL", "US", first_time = Sys.time() - 3600, last_time = Sys.time()) ## End(Not run)
Queries the delayed us quote endpoint
(https://eodhd.com/financial-apis/live-v2-for-us-stocks-extended-quotes-2025),
which returns a richer quote
(bid/ask, exchange, company name) than get_real_time(), for US
tickers only. Live data is never cached.
get_us_quote_delayed(tickers = "AAPL", fields = NULL, check_quota = TRUE)get_us_quote_delayed(tickers = "AAPL", fields = NULL, check_quota = TRUE)
tickers |
a character vector of US tickers (e.g. c("AAPL", "MSFT")) |
fields |
an optional character vector restricting the returned fields |
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. |
A dataframe with one row per ticker
## Not run: set_token("YOUR_VALID_TOKEN") df_quotes <- get_us_quote_delayed(c("AAPL", "MSFT")) ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_quotes <- get_us_quote_delayed(c("AAPL", "MSFT")) ## End(Not run)
Returns the information of the user api (https://eodhd.com/financial-apis/user-api): name, subscription, number of api calls used today and the daily limit.
get_user_info()get_user_info()
a dataframe with one row
## Not run: set_token("YOUR_VALID_TOKEN") get_user_info() ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") get_user_info() ## End(Not run)
Queries the US Treasury endpoints of eodhd: the daily par yield curve, the bill rates, the long term rates and the real yield curve.
get_ust_rates( type = "yield", first_date = NULL, last_date = NULL, year = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )get_ust_rates( type = "yield", first_date = NULL, last_date = NULL, year = NULL, limit = 100, offset = 0, cache_folder = get_default_cache(), check_quota = TRUE )
type |
one of "yield" (default, the par yield curve), "bill", "long-term" or "real-yield" |
first_date |
an optional first date of the window |
last_date |
an optional last date of the window |
year |
an optional single year (e.g. 2026), as an alternative to the dates |
limit |
maximum number of rows (default 100) |
offset |
pagination offset (default 0) |
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. |
A dataframe with the treasury rates
## Not run: set_token("YOUR_VALID_TOKEN") df_ust <- get_ust_rates("yield", first_date = "2026-01-01") ## End(Not run)## Not run: set_token("YOUR_VALID_TOKEN") df_ust <- get_ust_rates("yield", first_date = "2026-01-01") ## End(Not run)
This function will organize the raw financial data from get_fundamentals(),
aggregating all information into a single dataframe,
including quarterly and yearly data from the Balance_sheet,
Cashflow statement and Income statement. Whenever no financial data is found in
l_out, the function returns an empty dataframe.
parse_financials(l_out, type_table = "long")parse_financials(l_out, type_table = "long")
l_out |
A list with raw data (output from |
type_table |
Format of table in output ("wide" or "long"). A "wide" table is a typical Excel column-oriented table where each columns is a data/year. A long type of table row-oriented, where each each point of new information is a row of the table. The data is the same, it just changes the orientation of rows/columns. The default value is a "long" table. |
A dataframe with organized financial data in the wide or long format
## Not run: set_token(get_demo_token()) l_out <- get_fundamentals(ticker = "AAPL", exchange = "US") df_fin <- parse_financials(l_out, "long") df_fin ## End(Not run)## Not run: set_token(get_demo_token()) l_out <- get_fundamentals(ticker = "AAPL", exchange = "US") df_fin <- parse_financials(l_out, "long") df_fin ## End(Not run)
Uses the token from https://eodhd.com/cp/dashboard to authenticate your R session. You can find your own eodhd token from the website. Alternatively, a demo token is also available for testing purposes, with a limited supply of data.
set_token(token = get_demo_token())set_token(token = get_demo_token())
token |
the token from eodhd. The default value is a demo token "demo", which allows for partial access to the data.
See |
Nothing
## Not run: set_token() ## End(Not run)## Not run: set_token() ## End(Not run)