zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

ggetBalance error (4.04)

Open vincentbollaert opened this issue 9 years ago • 67 comments

ggetBalance error:
{ error: 'Nonce must be greater than 149582751298100. You provided 149582751297600.' }

Poloniex API is down! unable to call getBalance, retrying in 10s

While making its 1st purchase on poloniex.BCN-BTC

vincentbollaert avatar May 26 '17 20:05 vincentbollaert

Poloniex API is down!

Did you retry? Are you able to connect to Poloniex (or any internet site) from the box that is running your bot?

DeviaVir avatar May 27 '17 10:05 DeviaVir

I wasn't running Zenbot in a docker container, and not sure the API being down is even related. The provided 'nonce' is incorrect

vincentbollaert avatar May 27 '17 21:05 vincentbollaert

Having the same issue here.

Nonce must be greater than xxx

or the time out error bellow.

ggetBalance error: { error: 'Connection timed out. Please try again.' } Poloniex API is down! unable to call getBalance, retrying in 10s

It seens like it does not work only some times. I put a console.log in the end of getBalance function and most of the time it passes. Could it be the number of request per second/minute Poloniex accepts?

ghost avatar May 28 '17 21:05 ghost

Also getting this same error:

ggetBalance error:
{ error: 'Nonce must be greater than 1496361634359495. You provided 149636192715100.' }

If you look at the time stamps, they are off by a few orders of 10

Example: 1496361634359495 # Needed 149636192715100 # Provided by Zenbot

grleblanc avatar Jun 02 '17 00:06 grleblanc

Having same issue.

Reference: https://github.com/timmolter/XChange/issues/1193

getBalance error: { error: 'Nonce must be greater than 149695216646000. You provided 149695215679400.' }

Poloniex API is down! unable to call getBalance, retrying in 10s

getBalance error: { error: 'Nonce must be greater than 149695225678600. You provided 149695224643200.' }

Poloniex API is down! unable to call getBalance, retrying in 10s

getBalance error: { error: 'Nonce must be greater than 149695230660000. You provided 149695229647500.' }

Poloniex API is down! unable to call getBalance, retrying in 10s

getBalance error: { error: 'Nonce must be greater than 149695237659600. You provided 149695236673600.' }

Poloniex API is down! unable to call getBalance, retrying in 10s

semihalev avatar Jun 08 '17 20:06 semihalev

AnnihilaT , it didnt help. I have full default settings. Im trying work with polo in the docker zenbot.

---------------------------- STARTING LIVE TRADING ---------------------------- ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705692249700.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705693291700.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705694629500.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705695656400.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705696684000.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705698020600.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705699047800.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705700975900.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705702339800.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705703368000.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705704670000.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705706565900.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705707592600.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705708647000.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705711675200.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705712704600.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705714236500.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705715261200.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705717289200.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705718321400.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705719642600.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705721204200.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705722234000.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705723293500.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705724822400.' }

Poloniex API is down! unable to call getBalance, retrying in 10s ggetBalance error: { error: 'Nonce must be greater than 1496885422687535. You provided 149705725911000.' }

#bug #help wanted

denisa08 avatar Jun 10 '17 22:06 denisa08

try new generated api key. and avoid to use multiple application with same key.

https://github.com/codiwest/zenbot/blob/master/docs/FAQ.md#error-1

nao0811ta avatar Jun 11 '17 13:06 nao0811ta

nao0811ta, thanks! All work fine!

denisa08 avatar Jun 11 '17 13:06 denisa08

ggetBalance error: { error: 'Nonce must be greater than 149724606975500. You provided 149724606975300.' }

Poloniex API is down! unable to call getBalance, retrying in 10s

To combat these errors I have followed steps other users have taken across the web but no success!

  • changed to a new set of API keys.
  • tested on a whole new installation on a different computer (while a friend who trades with me also has tried it on two of his).
  • run system clock updates to verify if its out of sync and to adjust.

None of the above have worked, it's providing the wrong times to Poloniex (and i assume as it's a nonce issue this is not exchange specific).

Any new suggestions, did anyone else find something different that worked here? Thanks in advance :)

FreshLondon avatar Jun 12 '17 05:06 FreshLondon

@CreativeBacon Hmm.. I suggest modify poloniex/exchange.js to 12 function publicClient (product_id) {
13 // if (!public_client) public_client = new Poloniex(c.poloniex.key, c.poloniex.secret) 14 // return public_client
15 return authedClient()
16 }

I think the reason is exchange.js's two poloniex instance. So, another instance have old nonce value. It need to be thread-safe..

nao0811ta avatar Jun 12 '17 06:06 nao0811ta

Thank you for the speedy reply, super appreciated!

I have made the edits as specified and the following error is now presented: `Alexs-MacBook-Pro:zenbot alex$ zenbot trade --period=1m poloniex.doge-btc fetching pre-roll data: /Users/alex/zenbot/node_modules/poloniex.js/lib/poloniex.js:30 this._getPrivateHeaders = function(parameters) { ^

TypeError: Cannot set property '_getPrivateHeaders' of undefined at Poloniex (/Users/alex/zenbot/node_modules/poloniex.js/lib/poloniex.js:30:33) at publicClient (/Users/alex/zenbot/extensions/exchanges/poloniex/exchange.js:14:9) at Object.getTrades (/Users/alex/zenbot/extensions/exchanges/poloniex/exchange.js:57:26) at getNext (/Users/alex/zenbot/commands/backfill.js:75:22) at Object. (/Users/alex/zenbot/commands/backfill.js:64:11) at Immediate. (/Users/alex/zenbot/node_modules/sosa/api.js:15:12) at runCallback (timers.js:672:20) at tryOnImmediate (timers.js:645:5) at processImmediate [as _immediateCallback] (timers.js:617:5) Alexs-MacBook-Pro:zenbot alex$ `

FreshLondon avatar Jun 12 '17 07:06 FreshLondon

update, the line wrap on your post made me think line 13 was now to be separated. I have tried and it's running!

I'll update with progress, thanks again. :)

FreshLondon avatar Jun 12 '17 07:06 FreshLondon

Period is so short and different line of source with mine. It works for me with macd strategy and default parameters on up to date version.

nao0811ta avatar Jun 12 '17 07:06 nao0811ta

screen shot 2017-06-12 at 15 36 23

as shown in the above screenshot, zenbot shows the attempted buy but then thinks it's succeeded. The bid is not withdrawn and stays there, I have a pending bid at the currency it tried to buy and zenbot has stopped tracking this buy order due to the nonce error.

FreshLondon avatar Jun 12 '17 07:06 FreshLondon

@CreativeBacon It's only temporary modification. Due it's not my logic, Someone Let me know better and safe methology.. Or different poloniex library we need

nao0811ta avatar Jun 12 '17 07:06 nao0811ta

My logs tracked well. Which strategy are you using??

nao0811ta avatar Jun 12 '17 07:06 nao0811ta

How about retrying modified logic with your new key.

nao0811ta avatar Jun 12 '17 07:06 nao0811ta

Still a lot of nonce errors, debugging at present!

How does the bot calculate the nonce?

FreshLondon avatar Jun 12 '17 08:06 FreshLondon

@CreativeBacon The nonce generation is not done by the bot. It is done in the API functions from exchange API which is pulled in when you do an "npm install"

tuxitor avatar Jun 12 '17 10:06 tuxitor

@CreativeBacon I modified like below. I'm using two API key lol..

 12   function publicClient (product_id) {
 13     if (!public_client) public_client = new Poloniex(c.poloniex.key, c.poloniex.secret)
 14     return public_client
 15   }
 16 
 17   function authedClient () {
 18     if (!authed_client) {
 19       if (!c.poloniex || !c.poloniex.key || c.poloniex.key === 'YOUR-API-KEY') {
 20         throw new Error('please configure your Poloniex credentials in conf.js')
 21       }
 22       authed_client = new Poloniex(c.poloniex2.key, c.poloniex2.secret)
 23     }
 24     return authed_client
 25   }

nao0811ta avatar Jun 12 '17 11:06 nao0811ta