Open Jonah246 opened 4 years ago
Hey @Jonah246 thanks for raising this as an issue and providing some good code examples. We are aware of this problem but havent changed it due to the fact that we like to encourage users to generate a new key for each strategy/implementation.
It may not be a bug but would be nice to have consistent rules between libraries.
I do agree with this so im going to leave this open and add a TODO for us to implement this. I guess we have two options, either we upgrade all of the libs to match the python lib (since the nonce is the largest there) or we break some peoples code and force them to re-generate new api keys.
For reference, the nodejs nonce generation function: https://github.com/bitfinexcom/bfx-api-node-util/blob/master/lib/nonce.js
Issue type
Brief description
I used python-sdk and this Golang sdk with the same api-key. While it works smoothly in python, I got
error 500 nonce: small (10114)
.Additional Notes:
After reading the source code, I found that nonce generation rules differs between two libraries
utils/nonce.go
utils/auth.py
If users use the same ApiKey, Go-SDK will generate a nonce that's 1000 times smaller than the python's one and always yield a
nonce to small error
. It may not be a bug but would be nice to have consistent rules between libraries.