get.price: Download prices

View source: R/download_prices.R

get.priceR Documentation

Download prices

Description

Download crypto prices from cryptocompare.com

Arguments

coin

the ticker of the coin or coins. (default = BTC)

value

the currency to express the value of the coin. (default = USD)

time.frame

for historical data use day, hour or minute (default = NULL)

Examples

#Get the price for BTC in USD
get.price('BTC','USD')
#due to the defaults, it is the same as
get.price()

#Get the price for BTC in both USD and EUR
get.price('BTC',c('USD','EUR'))

#Get the price for both BTC and ETH in both USD and EUR
get.price(c('BTC','ETH'),c('USD','EUR'))

#Get the last 2,000 prices per minute for BTC in USD
get.price('BTC','USD','minute')

#Get the last 2,000 prices per hour for ETH in BTC
get.price('ETH','BTC','hour')

#Get the last 2,000 prices per day for XVG in BTC
get.price('XVG','BTC','day')

vschaftenaar/crypto documentation built on April 4, 2023, 4:24 a.m.