fmpc_financial_bs_is_cf: Get financial data for one or more tickers

Description Usage Arguments Value Examples

View source: R/financials.R

Description

Pull balance sheet, income statement, or cash flow statement for one or more tickers. Can elect to see data quarterly or annually and view growth

Usage

1
2
3
4
5
6
7
8
fmpc_financial_bs_is_cf(
  symbols = "AAPL",
  statement = c("income", "balance", "cashflow"),
  quarterly = TRUE,
  growth = FALSE,
  SECReported = FALSE,
  limit = 100
)

Arguments

symbols

one or more publicly traded companies domestic or international

statement

indicate the statement to view. Can be 'income', 'balance', or 'cashflow'

quarterly

TRUE/FALSE whether the statement should be shown quarterly or annually

growth

TRUE/FALSE whether the growth statement should be shown

SECReported

TRUE/FALSE whether to display the information as it was reported to the SEC. Only one symbol can be passed if this is set to TRUE. Growth must also be set to FALSE. International stocks should not be passed.

limit

limit the result for each ticker

Value

returns balance sheet, income statement, or cash flow

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 

# Setting API key to 'demo' allows for AAPL only
fmpc_set_token()
fmpc_financial_bs_is_cf()
fmpc_financial_bs_is_cf('AAPL',statement = 'balance', quarterly = FALSE,
                     growth = FALSE, SECReported = TRUE, limit = 10)


# Must set a valid API token
fmpc_set_token('FMPAPIKEY')
fmpc_financial_bs_is_cf(c('AAPL','MSFT','TSLA'))

 symbols = c('AAPL','MSFT','BAC')
 Bal = fmpc_financial_bs_is_cf(symbols,statement = 'balance')
 BalG = fmpc_financial_bs_is_cf(symbols,statement = 'balance', growth = FALSE)
 IS = fmpc_financial_bs_is_cf(symbols,statement = 'income')
 ISa = fmpc_financial_bs_is_cf(symbols,statement = 'income', quarterly = FALSE)
 cf = fmpc_financial_bs_is_cf(symbols,statement = 'cashflow')
 cfsec = fmpc_financial_bs_is_cf(symbols,statement = 'cashflow', SECReported  = TRUE)

# International tickers work
fmpc_financial_bs_is_cf('RY.TO',statement = 'balance', quarterly = TRUE,
                     growth = TRUE, SECReported = FALSE, limit = 10)


## End(Not run)

fmpcloudr documentation built on March 2, 2021, 1:06 a.m.