Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed Connecting to Bitstamp: Invalid Nonce exception #64

Closed
Christian-Achilli opened this issue Aug 2, 2017 · 3 comments
Closed

Failed Connecting to Bitstamp: Invalid Nonce exception #64

Christian-Achilli opened this issue Aug 2, 2017 · 3 comments

Comments

@Christian-Achilli
Copy link

I am trying to connect to Bitstamp. I added my API key to the exchange.xml.

30362 [main] 2017-08-02 10:11:25,015 DEBUG AbstractExchangeAdapter sendNetworkRequest() - Setting following request header: Content-Type=application/x-www-form-urlencoded
30363 [main] 2017-08-02 10:11:25,016 DEBUG AbstractExchangeAdapter sendNetworkRequest() - Doing POST with request body: signature=5489AFCBF4B08DC3611209835E29BBD2B473E819010C6375832BFC46FEFF5BA0&nonce=1501665084&key=**********************************
30687 [main] 2017-08-02 10:11:25,340 ERROR AbstractExchangeAdapter sendNetworkRequest() - Failed to connect to Exchange due to unexpected IO error. ErrorStream Response: {"status": "error", "reason": "Invalid nonce", "code": "API0004"}
java.io.IOException: Server returned HTTP response code: 403 for URL: https://www.bitstamp.net/api/v2/balance/
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) ~[?:1.8.0_111]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) ~[?:1.8.0_111]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) ~[?:1.8.0_111]
at com.gazbert.bxbot.exchanges.AbstractExchangeAdapter.sendNetworkRequest(AbstractExchangeAdapter.java:184) [classes/:?]
at com.gazbert.bxbot.exchanges.BitstampExchangeAdapter.sendAuthenticatedRequestToExchange(BitstampExchangeAdapter.java:771) [classes/:?]

@gazbert
Copy link
Owner

gazbert commented Aug 2, 2017

Hi Christian, was this a one-off error? Or does it happen all the time? I'm currently running the 0.7.0 release against Bitstamp now and not seeing this error.

If you could post the full log (with debug enabled and your clientId/key/secret blanked out) and your markets.xml, engine.xml, and exchange.xml (delete your auth credentials), I'll try and reproduce it.

@Christian-Achilli
Copy link
Author

Hi Gazbert, thanks for the quick reply and your comment. I realise it was my fault as I did not activate the API itself.
Thanks for your help and keep up the good work, I like your code a lot, it's really clean.

@GeekQing
Copy link

@Christian-Achilli can you specify the "activate the API"?I encountered this problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants