Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Nonce is too small #3

Open
jerome-shiftleft opened this issue Nov 29, 2017 · 4 comments
Open

Nonce is too small #3

jerome-shiftleft opened this issue Nov 29, 2017 · 4 comments

Comments

@jerome-shiftleft
Copy link

Hi, When I tried this code

$bfx = new Bitfinex($api_key, $api_secret);

//var_dump($bfx->get_symbols());

$account_summary = $bfx->get_summary();

var_dump($account_summary);

It results to this
array(2) { ["message"]=> string(19) "Nonce is too small." ["error"]=> bool(true) }

@mariodian
Copy link
Owner

Hi, can you please echo (string) number_format(round(microtime(true) * 100000), 0, '.', ''); on your system? What are you getting?

Also, are you getting the same error for more methods or just get_summary()?

@lukasbesch
Copy link

Same issue here. But multiplicating by 1000 works. JS timestamps include milliseconds

$data['nonce'] = (string) number_format(round(microtime(true) * 100000000), 0, '.', '');

@tugudush
Copy link

tugudush commented Dec 1, 2017

I haven't applied your solution but it's ok now just by changing my API key.

@ramilS
Copy link

ramilS commented Jan 8, 2018

@tugudush, api key reset - also resets nonce

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants