fmpc_holdings_etf: Pull ETF holdings data

Description Usage Arguments Details Value Examples

View source: R/holdings.R

Description

Shows holdings data for one or more ETFs provided. Either individual holdings, sector weightings, or country weightings.

Usage

1
fmpc_holdings_etf(etfs = c("SPY"), holding = c("symbol", "sector", "country"))

Arguments

etfs

one or more valid ETFs.

holding

holding type can be other individual symbols, the sector breakdown, or the country breakdown. Valid inputs include 'symbol', 'sector', 'country'

Details

This differs from fmpc_held_by_mfs which allows a search by symbol to see the mutual funds holding the specified symbol(s). This function searches by ETF and shows the holding of the ETF

Value

data frame of mutual fund holdings

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

 # For multiple symbols, set a valid API Token
 fmpc_set_token('FMPAPIKEY')
 fmpc_holdings_etf(c('VOO','SPY'), holding = 'symbol')
 fmpc_holdings_etf(c('VOO','SPY'), holding = 'country')
 fmpc_holdings_etf(c('VOO','SPY'), holding = 'sector')

 
## End(Not run)

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