Skip to content

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
# 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