yasinkuyu / binance-trader

💰 Cryptocurrency Trading Bot for Binance (Experimental)
2.54k stars 833 forks source link

Not selling upon partially-filled buy #133

Open tapir1 opened 6 years ago

tapir1 commented 6 years ago

Latest WeSpeakCrypto branch (pull request #132). VIBE/BTC at 0.5%, stoploss disabled.

Thanks for implementing or at least considering my previous inquiries.

price:0.00010550 buyp:0.00010530 sellp:0.00010541-bid:0.00010509 ask:0.00010547 Buy order created id:2496028, q:25.00000000, p:0.00010530 Buy order partially filled... Try sell... Cancel remaining buy... Profit loss, called order, 2496028 Buy order partially filled... Try sell... Cancel remaining buy... price:0.00010530 buyp:0.00010532 sellp:0.00010543-bid:0.00010511 ask:0.00010546 m: Account has insufficient balance for requested action. m: Account has insufficient balance for requested action. m: UNKNOWN_ORDER

Title says all; buy order got partially filled, cancelled remaining successfully, but didn't even try making a sell order for what it already bought.

In a trade before this, it bought at a high price and sold at a lower one, resulting in loss. Binance screenshot: https://gyazo.com/e924005a40c317e30cbc94e32db1da5e

Also, when using "--max_amount True", it refuses to create orders and simply spits out insufficient balance errors.

EDIT: And now when using the minimum quantity, it sells at the same price as buy (doesn't factor profit).

price:0.00010634 buyp:0.00010591 sellp:0.00010602-bid:0.00010570 ask:0.00010633 Buy order created id:2497625, q:21.00000000, p:0.00010591 Buy order filled... Try sell... Sell order create id: 2497639 Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... m: Account has insufficient balance for requested action. Buy order filled... Try sell... Status: FILLED Current price: 0.00010632 Sell price: 0.00010591 Sold! Continue trading...

For a while now, --prints False does not seem to have any effect on disabling the debug profit screening prints.

ktenman commented 6 years ago

@WeSpeakCrypto I still have this problem