fmpc_price_history {fmpcloudr} | R Documentation |
Historical End of Day pricing data for one or more symbols
Description
End of Day price history includes open, high, low, close, adjClose, volume,
vwap, and more. Symbol can include equity, mutual fund, index, currency, crypto,
or any other symbol that can be found in fmpc_symbols_by_market
.
Usage
fmpc_price_history(
symbols = "AAPL",
startDate = Sys.Date() - 30,
endDate = Sys.Date()
)
Arguments
symbols |
one or more symbols from the FMP available list that can be
found using |
startDate |
filter start date in yyyy-mm-dd format. |
endDate |
filter end date in yyyy-mm-dd format. |
Value
a data frame of price history
Warning
Each symbol is a separate API call. If the API token has monthly limits, this should be considered before making a bulk request
Examples
## Not run:
# Default sets token to 'demo' which allows for AAPL only
fmpc_set_token()
fmpc_price_history('AAPL')
# For multiple symbols, set a valid API Token
# Crypto, equity, currency, and index can all be entered in the same request
fmpc_set_token('FMPAPIKEY')
fmpc_price_history(c('AAPL','MSFT','SPY','^SP500TR','JPYUSD','BTCUSD'))
## End(Not run)
[Package fmpcloudr version 0.1.5 Index]