I tried loop over but it did not work out, any chance you can help me with this?
res =GET("https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md"
)
cont_raw <- httr:: content(res)
options(stringsAsFactors = FALSE)
url = "https://data.binance.vision"
path = '?prefix=data/spot/monthly/klines/LTCBTC/30m/'
yearzz = as.Date(2017:2021)
waha <- list()
waha <-download.file(rbind, lapply(2017:2021, function(n) {
url.1 <- paste0("https://data.binance.vision/data/spot/monthly/klines/LTCBTC/30m/LTCBTC-30m", yearzz,
path.1<-paste0("yearzz", n, ".zip"))
}))
waha <- download.file(url = url.1, path= path.1, "LTCBTC.zip", method="curl", mode = "wb")
for (i in length(years)) {waha [[i]] <- download.file(url = url.1, path = path.1, paste0(yearzz), .zip, method = "curl", mode = "wb")
}
waha