daroczig / binancer

An R client to the Public Rest API for Binance.
https://daroczig.github.io/binancer
53 stars 57 forks source link

Possible to check the oldest info for a given market? #19

Closed viniciushdasilva closed 2 years ago

viniciushdasilva commented 2 years ago

If I use the below code I get the coin history as desired: binance_klines("ETHUSDT", interval = "1m", start_time = as.POSIXct("2018-01-01"), end_time = as.POSIXct("2018-01-02"), limit=100)

However, if I use a too old date, an error is returned: binance_klines("ETHUSDT", interval = "1m", start_time = as.POSIXct("2017-01-01"), end_time = as.POSIXct("2017-01-02"), limit=100)

Error in `[.data.table`(klines, , -12) : 
  Item 1 of j is 12 which is outside the column number range [1,ncol=0]

Is there a way to find what would be the oldest date that is possible to retrieve from a coin history with binancer functions?

daroczig commented 2 years ago

Sorry, I'm not sure, but please go through the official API docs and hopefully you can find a way to get that data. As this is rather a question about the upstream API, I'm closing this ticket, but please feel free to reopen if you find this info in the API, and will be happy to somehow incorporate into the package.