daroczig / binancer

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

most functions don't work #28

Closed waynelapierre closed 1 year ago

waynelapierre commented 1 year ago
> binance_coins()
No encoding supplied: defaulting to UTF-8.
Error in `[.data.table`(binance_exchange_info()$symbols, status == "TRADING",  : 
  j (the 2nd argument inside [...]) is a single symbol but column name 'symbol' is not found. Perhaps you intended DT[, ..symbol]. This difference to data.frame is deliberate and explained in FAQ 1.1.
> binance_coins_prices(unit = "USDT")
Error in if (BINANCE_WEIGHT > 1159) { : argument is of length zero
> binance_klines('ETHUSDT')
Error in if (BINANCE_WEIGHT > 1159) { : argument is of length zero
> binance_symbols(all = FALSE)
Error in if (BINANCE_WEIGHT > 1159) { : argument is of length zero
> binance_ticker_24hr('ARKETH')
Error in if (BINANCE_WEIGHT > 1159) { : argument is of length zero
daroczig commented 1 year ago

Can you please post your sessionInfo(), or even better would be sessioninfo::session_info() as this should work and have not seen such error messages in the past.

waynelapierre commented 1 year ago

`R version 4.2.2 (2022-10-31) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: Fedora Linux 37 (Workstation Edition)

Matrix products: default BLAS/LAPACK: /usr/lib64/libflexiblas.so.3.3

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods
[7] base

loaded via a namespace (and not attached): [1] compiler_4.2.2 tools_4.2.2 `

By the way, is there an API-imposed limit regarding how many observations can be downloaded via the binance_klines() function?

daroczig commented 1 year ago

Hi, sorry, just saw your reply. Could you please post the session info after loading the binancer package?

waynelapierre commented 1 year ago

I don't have access to R now, but I used the most recent version of your package, 1.2.0.

daroczig commented 1 year ago

I'd be interested in the other package versions, e.g. data.table as well.

waynelapierre commented 1 year ago

data.table version 1.14.6.

daroczig commented 1 year ago

It's been working fine in all my environments, but just in case, I've spin up a new Linux server with most recent package versions and seem to work fine. Here's my sessionInfo:

> sessionInfo()
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8        LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8   
 [6] LC_MESSAGES=C.UTF-8    LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C           LC_TELEPHONE=C        
[11] LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] binancer_1.2.0

loaded via a namespace (and not attached):
 [1] httr_1.4.5        compiler_4.2.2    logger_0.2.2      R6_2.5.1          snakecase_0.11.0  tools_4.2.2      
 [7] glue_1.6.2        rstudioapi_0.14   data.table_1.14.8 jsonlite_1.8.3    digest_0.6.30 

Without further info, unfortunately, I don't know how to debug this, sorry.