VermeirJellen / PoloniexR

R wrapper for the Poloniex Cryptocurrency Trading API (Package)
Other
19 stars 4 forks source link

Question #1

Closed Kaidemanatee closed 6 years ago

Kaidemanatee commented 7 years ago

Hi,

Let's start by saying I'm very new to all of this, and it's probably me doing something wrong. I was trying to use the Trading API's but I keep getting a connection error (403). As far as I can find this is a connection denied error, but I checked my settings in Poloniex, and API trading is enabled. My key and secret match as well. I would like to understand if I'm doing something wrong?

Code below: poloniex.trading <- PoloniexTradingAPI(trading.base.url = "https://poloniex.com/tradingApi?", key = k, secret = s) deposit.addresses <- ProcessTradingRequest(poloniex.trading, command = poloniex.trading@commands$returnDepositAddresses)

Error: Error in ProcessTradingRequest(poloniex.trading, command = poloniex.trading@commands$returnDepositAddresses) : Unable to connect to https://poloniex.com/tradingApi? (403)

VermeirJellen commented 7 years ago

Hey Kaidenmanatee,

Thanks for your interest in the project. You get back a 403 status from Poloniex when key/secret pair do not match and/or trading is not enabled and/or the ip-address from which you make the call is not whitelisted. I think this is your problem: By default, the IP Access Restriction option is enabled in your API settings and you most likely did not whitelist your current ip-address. If you enter your IP as a trusted source address then it will most likely work.

Also, another detail: During construction of the PoloniexTradingAPI object you do not have to explicitly enter the trading.base.url as parameter, because it's already the default for the prototype.