How to get Cryptocurrency prices in R

[This article was first published on R – Predictive Hacks, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Today, we will show how you can easily get the Cryptocurrency Prices using R. We will work with the crypto package.

You can install the crypto package from GitHub:

# Installing via Github

How to get the list of the Cryptocurrencies


# Print 10 of them
list_coins%>%head(10)%>%select(symbol, name)

   symbol name             
 1 BTC    Bitcoin     
 2 ETH    Ethereum    
 3 XRP    XRP         
 4 USDT   Tether      
 5 BCH    Bitcoin Cash
 6 BSV    Bitcoin SV  
 7 LTC    Litecoin    
 8 ADA    Cardano     
 9 LINK   Chainlink   
10 BNB    Binance Coin

How to get the Cryptocurrency Prices

Let’s say that I am interested in BTC, XRP, BCH and LTC and I want to get their daily values from 2020-01-01 onwards.

btc<-crypto_history(coin = 'BTC', start_date = "20200101")
xrp<-crypto_history(coin = 'XRP', start_date = "20200101")
bch<-crypto_history(coin = 'BCH', start_date = "20200101")
ltc<-crypto_history(coin = 'LTC', start_date = "20200101")


To leave a comment for the author, please follow the link and comment on their blog: R – Predictive Hacks. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)