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)

Arguments

fsym

character. 3 letter name for coin to retreive price history for.

tsym

character. 3 letter name for how price should be reported for fsym.

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 Sys.time().

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 end_date. If all_data is set to true, this is ignored. Defaults to 30 when unit is "day", 168 when unit is "hour", and 1440 when unit is "minute". Minimum of 1, maximum of 2000.

all_data

logical. SHould all historical data for fsym be retreived? Defaults to FALSE.

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.

Value

A tibble containing daily price details for fsym

References

https://www.cryptocompare.com/api#-api-data-histoday-

Examples

# NOT RUN {
get_daily_price("BTC", "USD", "2017-10-31")
# }