serlingpa
serlingpa

Reputation: 12700

How do I deal with nonce errors on the Kraken private HTTP API?

I am becoming extremely frustrated with the nonce issue on the Kraken private HTTP API.

I frequently get EAPI:Invalid nonce errors. The support is sketchy in this area: it could mean the nonce is not in sequence, or it could mean that there are too many simultaneous requests (which might give rise to the first scenario).

Other than completely ripping out my Axios HTTP implementation and rewriting the entire thing, I am at a loss as to what to do. I have visited this link:

https://support.kraken.com/hc/en-us/articles/360001148063-Why-am-I-getting-invalid-nonce-errors-

I have:

I have also:

I am at a loss as to what to do. I am only using one set of API credentials, since the requests come from different places and creating multiple API keys is not going to mitigate this issue. I have no way of choosing between keys really, and I will still encounter this issue.

Suggestions? I cannot imagine I am the first client to have encountered this problem. Throttling is very difficult, because it cannot be guaranteed that the requests will then appear in sequence and so the nonce error will just be moved from one place to another.

Upvotes: 1

Views: 667

Answers (3)

ReTardXXL
ReTardXXL

Reputation: 1

One possibility is you played around with the nonce resolution (i.e. switched from tenth of a millisecond back to millisecond) or used the same API_KEY with a different application (or anywhere else in your code) which works with a different nonce resolution. Create a new API key and always use an unique key for every of your (or 3rd party) applications.

Upvotes: 0

Luka
Luka

Reputation: 33

I was having same issue which (temporary) has been fixed with small delay for each request (batch request didn't help). I also tried with everything you mentioned but that didn't help as well

Upvotes: 0

Hasselhoff
Hasselhoff

Reputation: 41

I was having the same problem, what I realized is that my post parameters were in the wrong order. They must be in exactly the order listed in the docs, otherwise the request will throw an "invalid nonce" error even if your nonce is formatted correctly.

I also noticed that there is no mention of how to order the request data in the docs, so it is an easy mistake to make. Also, none of the support docs mentions that this kind of improper formatting might throw this error. Hope this helps!

Upvotes: 0

Related Questions