yasinkuyu / binance-trader

💰 Cryptocurrency Trading Bot for Binance (Experimental)
2.51k stars 826 forks source link

"m: Account has insufficient balance" <--> "Buy order filled... Try sell..." (buys once, sells once, no further actions) #180

Open TonoIdo opened 6 years ago

TonoIdo commented 6 years ago

The title pretty much says it all. I start the trader up and it runs normally. It then makes a purchase successfully. screen shot 2018-01-30 at 10 49 20 pm Followed by sell orders. Checking Binance.com, these sell orders are also successful. screen shot 2018-01-30 at 10 48 32 pm And then once the sale is completed/filled, the bot then enters this loop below. On Binance.com no orders of any kind go up. Trading activity ceases. screen shot 2018-01-30 at 10 44 59 pm

I've heard some similar errors have come up for other people, but the bot continued to function normally and actually execute trades in the background. That is NOT happening here. No activity for hours, even when the profit margin is set extremely low in an attempt to force frequent trades (and yes the bot stalls at normal/default profit margins).

TonoIdo commented 6 years ago

@yasinkuyu Update: Previously I was using... python trader.py --profit XXX --symbol XXXXXX -QUANTITY XXXX I just tried using... python trader.py --profit XXX --symbol XXXXXX -AMOUNT XXXX ...and it no longer entered that loop. However the bot was ultimately stalled by issues with partially filled orders. Half a buy order would get filled, it would try entering another buy order (same size) and return insufficient funds. Attempt buy <--> insufficient funds. Forever. (I'm using the latest WeSpeakCrypto build btw)

Plarkass commented 6 years ago

I got similar issue

Auto Trading for Binance.com. --symbol: CDTETH

...

Started... --quantity: 100.00000000

1.3% profit scanning for CDTETH

Between Ask and Bid 1.3% profit hunting buyp : BuyPrice (Bid+ --increasing 0.00000001) sellp: SellPrice (Bid- --decreasing 0.00000001) ...

price:0.00010984 buyp:0.00010839 sellp:0.00010979-bid:0.00010838 ask:0.00010986 spread:1.37 m: Account has insufficient balance for requested action. price:0.00010838 buyp:0.00010841 sellp:0.00010981-bid:0.00010840 ask:0.00010986 spread:1.35 m: Account has insufficient balance for requested action. price:0.00010838 buyp:0.00010840 sellp:0.00010980-bid:0.00010839 ask:0.00010986 spread:1.36 m: Account has insufficient balance for requested action. price:0.00010838 buyp:0.00010849 sellp:0.00010989-bid:0.00010848 ask:0.00010986 spread:1.27 price:0.00010838 buyp:0.00010850 sellp:0.00010990-bid:0.00010849 ask:0.00010985 spread:1.25

strueman commented 6 years ago

I tracked this problem down to the buy_limit function in Orders.py for some reason its not returning the expected orderId after creating the order. I'll post an update here with a fix when I figure it out.

Sh0ckwav3 commented 6 years ago

Already some news for this error? My Script stucks every 5 mins because of this