get_historical_price
provides price information about a single currency
at the daily level.
get_historical_price(fsym, tsym, end_time = Sys.time(), unit = "day", exchange = "CCCAGG", aggregate = 1, limit = NULL, all_data = FALSE, sign = FALSE, try_conversion = TRUE, app_name = NULL)
fsym | character. 3 letter name for coin to retreive price history for. |
---|---|
tsym | character. 3 letter name for how price should be reported for
|
end_time | character or POSIXct or POSIXt. Final date to retrieve data
for in the format of yyyy-mm-dd with optional hh:mm:ss (used when unit is
set to "hour" or "minute"). Defaults to |
unit | character. Either "day", "hour", or "minute" indicating the granularity of the returned data. The default is 'day'. Note: minute data is only available for the past 7 days. |
exchange | character. Exchange to query. Defaults to 'CCCAGG'. |
aggregate | numeric. Data is reported every n units. Defaults to 1. Maximum value of 30. |
limit | numeric. Number of records to retrive leading up to |
all_data | logical. SHould all historical data for |
sign | logical. Should the server sign the response? Defaults to FALSE |
try_conversion | logical. Should BTC conversion be used fsym is not trading in tsym on specified exchange? Defaults to TRUE. |
app_name | character. Name of app to be passed in API request. Defaults to NULL. |
A tibble containing daily price details for fsym
https://www.cryptocompare.com/api#-api-data-histoday-
# NOT RUN { get_daily_price("BTC", "USD", "2017-10-31") # }