fmpc_holdings_etf {fmpcloudr} | R Documentation |
Pull ETF holdings data
Description
Shows holdings data for one or more ETFs provided. Either individual holdings, sector weightings, or country weightings.
Usage
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
## 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)
[Package fmpcloudr version 0.1.5 Index]