Skip to content

fix Error: API:Invalid nonce#57

Open
jorgeelmundoso wants to merge 2 commits into
nothingisdead:masterfrom
jorgeelmundoso:master
Open

fix Error: API:Invalid nonce#57
jorgeelmundoso wants to merge 2 commits into
nothingisdead:masterfrom
jorgeelmundoso:master

Conversation

@jorgeelmundoso

Copy link
Copy Markdown

The example returns an API error complaining about the nonce, this change will fix it.

@jorgeelmundoso

Copy link
Copy Markdown
Author

I realised, that there error i got, was triggered by the fact that i used the golang kraken api implementation that uses a nonce with nanoseconds with the same key pair just before i used this implementation.

Nevertheless, this change will prevent that from happening to anyone else.

@dscotese

dscotese commented Dec 5, 2021

Copy link
Copy Markdown

This change did not fix the problem for me. The problem for me, when there is a collision (usually because API calls get to Kraken in reverse order so the nonce, based on the clock, is lower than the previous nonce, or the same because the calls were made too close together). Also, the kraken-api code adds the nonce property to the parameter object we pass in, so sending it in a few seconds later doesn't use a new nonce, it uses the same one. I will propose a fix for this soon if no one else has.

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

Successfully merging this pull request may close these issues.

2 participants