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

return nonce error #9

Open
arshpreetsingh opened this issue Aug 24, 2016 · 6 comments
Open

return nonce error #9

arshpreetsingh opened this issue Aug 24, 2016 · 6 comments

Comments

@arshpreetsingh
Copy link

As Bitfinex is up after somedays so I think it will be nice to create issues again.
As I try to run history() it returns following error:

trade = TradeClient('BITFINEX_KEY','BITFINEX_SECRET')

print trade.account_summary()

{u'message': u"Must specify a 'nonce' field that is a numeric string (e.g '42.3'). The nonce should always be bigger than last time."}

@kgosier
Copy link

kgosier commented Oct 22, 2016

Did anyone from bitfinex respond to this?

@Dishant15
Copy link

If some one is looking at this issue than i will point them to a solution on:
https://bitcointalk.org/index.php?topic=323628.0

This post shows example code to use rest API with bitfinex

@zsyh
Copy link

zsyh commented Oct 1, 2017

change

@Property
def _nonce(self):
"""
Returns a nonce
Used in authentication
"""
return str(time.time() * 100000)

to

@Property
def _nonce(self):
"""
Returns a nonce
Used in authentication
"""
return str(int(time.time() * 100000))

can solve this problem

@zuntah
Copy link

zuntah commented Oct 4, 2017

Change:
return str(time.time() * 100000)
To:
return str(long(time.time() * 100000))

Good Luck!

@cliff0412
Copy link

change to return str(long(time.time() * 100000)) still not work
error is as below
Key timestamp should be a decimal number, e.g. "123.456"

@duker33
Copy link

duker33 commented Feb 26, 2018

tried this code: str(time.time() * 100000).
Bitfinex replied: {'message': 'Nonce is too small.'}.

But this code str(time.time() * 10**7) works fine. But maybe it's not correct way to calc time

UPD:
this one works more stable: f'{time.time()*1e7:0.0f}'

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

No branches or pull requests

7 participants