Bitcoin L tracker
Here’s a quick R script that will retrieve and graph the closing price of BTC-USD every day since its peak. # create a function to retrieve daily data retreive_daily_data <- function(pair, start, end) { url = glue("https://api.pro.coinbase.com/products/{pair}/candles?start={start}&end={end}&granularity=86400") columnNames <- c('unix', 'low', 'high', 'open', 'close', glue('{pair} volume')) mydata <- fromJSON(url) df <- as.data.frame(mydata) colnames(df) <- columnNames # rename the columns return(df) } bitcoin <- retreive_daily_data(pair = "BTC-USD", start = Sys.Date() - days(300), end = Sys....