Learn R Programming

simfinR (version 0.2.3)

simfinR_get_fin_statements: Get financial statements from simfin

Description

Uses the simfim api <https://simfin.com/> for downloading corporate financial datasets available at the website. In order to use the function, you'll need a valid api key from <https://simfin.com/data/access/api>. All data from the site is locally cached with package memoise, meaning it will never grab repeated data from the api.

Usage

simfinR_get_fin_statements(
  id_companies,
  api_key,
  type_statements = c("pl", "bs", "cf"),
  periods = "FY",
  years = 2018,
  cache_folder = "simfin_cache"
)

Arguments

id_companies

Simfin Id of companies to get data (see simfinR_get_available_companies for details)

api_key

Your api key (get one at <https://simfin.com/data/access/api>)

type_statements

Types of financial statements ('pl' - profit loss, 'bs' - balance sheet, 'cf' - cashflow)

periods

Time periods to grab the data: 'FY' - fiscal year (only for 'pl' and 'cf', use 'Q4' for end of year 'bs'), 'Q1' - first quarter, 'Q2', 'Q3', 'Q4'

years

The years to grab data (vector or single value)

cache_folder

Directory for cache files

Value

A dataframe with financial statements

Examples

Run this code
# NOT RUN {
id_companies <- 59265
api_key <- 'YOURAPIHERE'

df_fin <- get_fin_statements(id_companies, api_key = api_key)
# }

Run the code above in your browser using DataLab