Closed valent closed 6 years ago
This error typically means that your API key has already been used by another API call that has used a larger nonce value, so this bot doesn't know how to use your keys. Please try generating a fresh API key on Poloniex for the bot to use instead...
Generated 3 fresh keys. Issue still persists.
Can you please run the following steps to help diagnose what's going on so I can help you?
bot/xchange/Poloniex.php
in your text editor and go to line 409. You should see $req['nonce'] = sprintf( "%ld", $nonce );
.var_dump($req['nonce']);
.Poloniex.php
.Thanks!
I get this infos with the edited code..
String(18) "768346381" 21:41:59: POLONIEX [ERROR] [POLONIEX] API error response: Invalid nonce parameter.
Hmm, that looks very wrong!
Can you please paste this small test case into a file called test.php
and run it and see what you get? Do you use php
or hhvm
? What version? Can you test with the other two?
<?php
var_dump( microtime( true ) );
$x = floor( microtime( true ) * 1000000 );
printf("%ld\n", $x);
Allright!
php test.php float(1512824985.4222) 1512824985422311
hhvm test.php float(1512825426.0869) 1512825426095384
The thing is, the problem is not conanstly, after a "clean" arbbot-production installation fix this problem for a limited time, then the "bug??" comes back.. idk mhmm, maybe there is a problem on poloniex side?
I used php and hhvm, same result,
hhvm 3.23.2-1~xen amd64
php-cli 1:7.0+35ubun all
php-common 1:35ubuntu6 all
php-curl 1:7.0+35ubun all
php-fpm 1:7.0+35ubun all
php7.0-cli 7.0.22-0ubun amd64
The numbers you are seeing now are making more sense now.
Do you modify the system date when this problem happens? That is the only way that I can see this happen based on the code that generates this number, if something (either you or a program) sets the system date a long time into the past...)
I don't think this is a problem on the poloniex side. "nonce" is just an integer that should be larger than what you submitted in your latest API call, and is used to ensure your API calls are processed in the correct order.
You talked about the Time... My System Date and Time is correct 11.12.2017, 02:41 -> but the bot have 01:41 < bot missing one hour, is this the problem?
The bot uses the UTC timezone, so perhaps that explains the difference in time?
But what I meant before was the number you are getting is the number of seconds since January 1, 1970 (this is called a "Unit Timestamp") so if your system date is changed either by someone or by a program, that could explain why the bot sometimes reads numbers that are that small.
FWIW, 768346381
represents a date around 1994-05-07 17:33:01
. :-)
I think my ubuntu server have some sync problems... ill fixxed it with easy commands, and now works without the error/bug ;) thx cryptoeax feel free to add to readme for other users with same problem? ;) --> sudo apt-get install ntpdate --> sudo ntpdate ntp.ubuntu.com
Thanks, I think I will add that to the installation instructions. :-)
I am getting this error everytime i run the program. Kindly advice