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

Invalid nonce #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Invalid nonce #25

wants to merge 2 commits into from

Conversation

v-hup
Copy link

@v-hup v-hup commented Feb 2, 2022

{"error"=>["EAPI:Invalid nonce"]}
when making a request it sent invalid nonce with this change this error is solved

jonatack and others added 2 commits January 29, 2022 23:59
KIN, MINA.S, MNGO, ORCA, POLIS, SBR, STEP, TRX.S
{"error"=>["EAPI:Invalid nonce"]}
when making a request it sent invalid nonce with this change this error is solved
@@ -518,7 +518,15 @@ def parse_response(http)
# current Unix Time.
#
def generate_nonce
(Time.now.to_f * 1_000_000).to_i
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen this error; how to reproduce?

According to the Kraken API docs at

"Nonce must be an always increasing, unsigned 64-bit integer, for each request that is made with a particular API key. While a simple counter would provide a valid nonce, a more usual method of generating a valid nonce is to use e.g. a UNIX timestamp in milliseconds."

The code examples in the second link are similar to the current code, as is the nonce code in my other Kraken client in Common Lisp: https://github.com/jonatack/cl-kraken/blob/master/src/time.lisp. So the current code seems correct?

@charlesdg
Copy link

I have the same error as you (I created a PR also #28 )

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.

3 participants