fmpc_price_intraday {fmpcloudr} | R Documentation |
Historical End of Day pricing data for one or more symbols
Description
Intraday includes open, high, low, close, for each time segment. The amount
of history available is based on the freq set. Smaller time intervals
frequency will pull back less history. Symbol can include equity, mutual
fund, index, currency, crypto, or any other symbol that can be found in
fmpc_symbols_by_market
. Available history is limited by the
increment size.
Usage
fmpc_price_intraday(
symbols = "AAPL",
startDate = Sys.Date() - 30,
endDate = Sys.Date(),
freq = c("1min", "5min", "15min", "30min", "1hour")
)
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. |
freq |
the frequency of which to pull intraday prices. Options can be '1min','5min','15min','30min','1hour' |
Value
a data frame of intraday prices
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:
# Setting API key to 'demo' allows for AAPL only
fmpc_set_token()
# Freq of1hour will return about 2 months of data
fmpc_price_intraday('AAPL', freq = '5min')
# For multiple symbols, set a valid API Token
fmpc_set_token('FMPAPIKEY')
fmpc_price_intraday(symbols = c('AAPL','MSFT','SPY','^SP500TR','JPYUSD','BTCUSD'),
startDate = '2020-01-01', freq = '1hour')
## End(Not run)