Accessing Quandl API is easy; consider the following code:
library(Quandl)
library(tidyverse)
frmData <- Quandl("BCHARTS/BITSTAMPUSD")
head(frmData)
Date Open High Low Close Volume (BTC) Volume (Currency) Weighted Price
1 2019-11-02 9250.70 9396.91 9201.19 9302.97 2400.145 22278130 9281.993
2 2019-11-01 9158.08 9303.53 9054.60 9250.45 6640.552 60832092 9160.697
3 2019-10-31 9169.55 9438.61 8961.53 9150.07 10113.159 92792854 9175.456
4 2019-10-30 9426.94 9437.06 8985.25 9159.94 8814.438 80752701 9161.412
5 2019-10-29 9216.39 9573.35 9051.48 9426.94 9059.612 85007062 9383.080
6 2019-10-28 9547.32 9950.00 9177.84 9216.44 14722.019 139923976 9504.402
ggplot(data = frmData, aes(x = Date, y = Close)) +
geom_line(color = "red")
In most use cases you don't really need to set the period ahead, and it is sufficient to dplyr::filter() the records afterwards.
If you need to combine several downloaded datasets - e.g. API results for a stock, and for an index - consider one of the dplyr::*_join() functions.