View source: R/download_prices.R
get.price | R Documentation |
Download crypto prices from cryptocompare.com
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) |
#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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.