if (FALSE) {
api_key <- "..."
api_secret <- "..."
end <- coinbase_time()
end_timestamp <- as.POSIXct(end, origin = "1970-01-01", tz = "UTC")
start_timestamp <- end_timestamp - 20 * 60 # 20 minutes in seconds
start <- as.numeric(start_timestamp)
coinbase_candles(api_key, api_secret, 'BTC-USD', start, end, 'ONE_MINUTE')}
Run the code above in your browser using DataLab