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:
- Created a new API key to reset the nonce
- Increased the nonce window to 10000ms
- Written code to increase the nonce resolution
I have also:
- Throttled requests to the API, ensuring nonces come in sequence
- Written code to retry the request up to 3 times in the event of a nonce error, with a delay of 1s
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.