Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

binance/exchange.js switches to full-ape mode and keeps retrying to execute an impossible order infinitely #1096

Open
Orwi53 opened this issue Jan 10, 2018 · 6 comments
Labels

Comments

@Orwi53
Copy link

Orwi53 commented Jan 10, 2018

This morning I woke up to find out my bot betrayed me during sleep.
In the logs, I found interminable repetitions of the following:

error1

To my understanding, my custom strategy wrongly tried to buy asset when it didn't have enough currency, and binance/exchange.js kept retrying to re-enact the wrongfully-posed order, infinitely.

By having a look at binance/exchange.js, it appears to me that the incriminating code is in the lines 179 and 223.

I would suggest something like changing:

return retry('buy', func_args)

into:

return cb(null, order)

So that, if for some reason that can be due to many factors, an impossible order is attempted, exchange.js doesn't retry it, instead, it waits for the next signal.

Any thoughts on this?

@DeviaVir DeviaVir added the bug label Jan 10, 2018
@hoajb
Copy link

hoajb commented Jan 11, 2018

under binance/exchange.js change line 158, 202 from
if (result && result.message === 'Insufficient funds') {

to
if (result && (result.message === 'Insufficient funds'||result.message === 'Filter failure: MIN_NOTIONAL')) {

@DeviaVir
Copy link
Owner

@hoajb why not PR that change?

@hoajb
Copy link

hoajb commented Jan 11, 2018

@DeviaVir sorry for my English. what do you mean "PR"?
I'm newbie in zenbot. When I got error response, checked binance/exchange.js, i found the wrong condition.(Maybe binance API changed error message )=> So quick fix is add more check new error message. It work fine for me.

But i think better we should change condition to check error-code. This case is "code:-1013"

@yoonhona
Copy link

I am sorry for my English ability.
I have this problem too.
Same in Ubuntu OS. (Node -v: v8.9.4)
There is no problem in Mac OS. (Node -v: v8.4.0)

@ilap
Copy link

ilap commented Jan 12, 2018

Hi @hoajb,

PR means Pull Request.

@Haehnchen
Copy link
Contributor

PR via #1123

Haehnchen added a commit to Haehnchen/zenbot that referenced this issue Jan 14, 2018
follow up of DeviaVir#1123; fix in DeviaVir#1096 was not working. tested against real life issue
DeviaVir pushed a commit that referenced this issue Jan 14, 2018
DeviaVir pushed a commit that referenced this issue Jan 14, 2018
follow up of #1123; fix in #1096 was not working. tested against real life issue
defkev pushed a commit to defkev/zenbot that referenced this issue Jan 14, 2018
…#1130)

follow up of DeviaVir#1123; fix in DeviaVir#1096 was not working. tested against real life issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants