sfa_get_prices: Get price data

View source: R/sfa_get_prices.R

sfa_get_pricesR Documentation

Get price data

Description

Share price data and ratios can be retrieved here. All share prices are adjusted for stock splits. If you are interested in more details, take a look at this page: https://www.simfin.com/data/help/main?topic=apiv2-prices

Usage

sfa_get_prices(
  ticker = NULL,
  simfin_id = NULL,
  ratios = NULL,
  start = NULL,
  end = NULL,
  api_key = getOption("sfa_api_key"),
  cache_dir = getOption("sfa_cache_dir"),
  sfplus = getOption("sfa_sfplus", default = FALSE)
)

Arguments

ticker

integer Ticker of the companies of interest.

simfin_id

integer 'SimFin' IDs of the companies of interest. Any simfin_id will be internally translated to the respective ticker. This reduces the number of queries in case you query the same company via ticker and simfin_id.

ratios

logical With TRUE, you can display some price related ratios along with the share price data (reserved for SimFin+ users). The ratios that will be displayed are:

  • Market-Cap

  • Price to Earnings Ratio (quarterly)

  • Price to Earnings Ratio (ttm)

  • Price to Sales Ratio (quarterly)

  • Price to Sales Ratio (ttm)

  • Price to Book Value (ttm)

  • Price to Free Cash Flow (quarterly)

  • Price to Free Cash Flow (ttm)

  • Enterprise Value (ttm)

  • EV/EBITDA (ttm)

  • EV/Sales (ttm)

  • EV/FCF (ttm)

  • Book to Market Value (ttm)

  • Operating Income/EV (ttm).

start

Date Filter for the report dates (reserved for SimFin+ users). With this filter you can filter the statements by the date on which the reported period ended ('Report Date'). By specifying a value here, only statements will be retrieved with report dates ending AFTER the specified date.

end

Date Filter for the report dates (reserved for SimFin+ users). With this filter you can filter the statements by the date on which the reported period ended ('Report Date'). By specifying a value here, only statements will be retrieved with report dates ending BEFORE the specified date.

api_key

character Your 'SimFin' API key. It's recommended to set the API key globally using sfa_set_api_key.

cache_dir

character Your cache directory. It's recommended to set the cache directory globally using sfa_set_cache_dir.

sfplus

logical SetTRUE if you have a SimFin+ account. It's recommended to set sfplus globally using sfa_set_sfplus.

Parallel processing

This function supports parallel processing via future.apply. If your machine has several cores (most have), you can make the API calls in parallel. To do so, define a future::plan() before calling the function.


simfinapi documentation built on April 14, 2023, 12:27 a.m.