daroczig / binancer

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

Restricted location #34

Closed waynelapierre closed 1 year ago

waynelapierre commented 1 year ago
require(binancer)
binance_klines('ETHUSDT')
Error in binance_query(endpoint = "api/v1/klines", params = params) : 
  0 Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error.

Session information:

R version 4.2.3 (2023-03-15)
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      
 [2] LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                 
 [9] LC_ADDRESS=C              
[10] LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8
[12] LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets 
[6] 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.3   
 [3] logger_0.2.2      R6_2.5.1         
 [5] snakecase_0.11.0  tools_4.2.3      
 [7] glue_1.6.2        rstudioapi_0.14  
 [9] curl_5.0.0        data.table_1.14.8
[11] jsonlite_1.8.4    digest_0.6.31 
daroczig commented 1 year ago

This error seems to come from the Binance API, unrelated to the R client. See their ToS as per the error message:

“Restricted Location” shall include the United States, Malaysia, Ontario (Canada)

Sorry, I cannot really help with that.