binance-trading-bot icon indicating copy to clipboard operation
binance-trading-bot copied to clipboard

It's possible to "Use BNB for fees" and sell all quantity without deductions?

Open chopeta opened this issue 3 years ago • 5 comments

There's many issues already talking about this... or at least I think this is the same thing explained recently here: https://github.com/chrisleekr/binance-trading-bot/wiki/Troubleshooting#why-the-bot-didnt-sell-all-coins-when-i-configured-100-to-sell

Other issues have mentioned this somehow: #140 , #341

I must say I am not convinced and I still think this is a issue. At least for my account where I have "Use BNB for fees" enabled + plenty of BNB in the wallet, and I am not talking about dust which is on Binance side and there's nothing we can do about it.

It's difficult for me to explain my point here, so instead I would like to ask for a code change to allow me to "debug" and try out my theory...

I would like to test the bot trying to selling 100% of the coin without considering commissions deductions.... so if the bot made a buy order of 19 coins it should try to sell the exactly 19 coins when the sell trigger comes. I know this is supposed to generate an error, but I would like to test that myself.

I think this is the file I have to modify, but I am not 100% sure about where and what to change exactly... https://github.com/chrisleekr/binance-trading-bot/blob/master/app/cronjob/trailingTrade/step/place-sell-order.js#L95

Would you point me out in that direction?

Looking at the Binance library we're using (please correct me if I am wrong), I've found this: https://github.com/sammchardy/python-binance/blob/217f1e2205877f80dbaba6ee92354ce4aca74232/binance/client.py#L3253

I was thinking we could use this... so in case it returns TRUE our code shouldn't deduct fees from the sell order quantity.

I hope these all make sense @chrisleekr - please let me know otherwise.

chopeta avatar Nov 02 '21 23:11 chopeta

I think there is reason behind the fact, that a minimum portion of your trade remains in your wallet, even thought you want to sell 100%. I noticed that the last buy price gets removed once there are no more coins of that type. In order to use Grid Trade based on the last buy price, a small amount has to be kept in order to "remember" the last buy price. So I don't know whether or not it is a good decision to sell everything. Anyone, please correct me if I'm wrong.

Rayn0r avatar Nov 06 '21 06:11 Rayn0r

At least for my account where I have "Use BNB for fees" enabled + plenty of BNB in the wallet, and I am not talking about dust which is on Binance side and there's nothing we can do about it.

My account has been enabled to "Use BNB for fees". However, when I started to develop the bot, the orders were rejected by Binance even if I had enough BNB. That was a long time ago, so I might have done something wrong back then.

Looking at the Binance library we're using (please correct me if I am wrong), I've found this: https://github.com/sammchardy/python-binance/blob/217f1e2205877f80dbaba6ee92354ce4aca74232/binance/client.py#L3253

Although I didn't check BNB burn enabled nor had enough BNB.

Anyway, I am a bit hesitant to change as the current code works without any order rejection.

Is this what everyone wants? Or current method is fine?

chrisleekr avatar Nov 09 '21 10:11 chrisleekr

I played a long time with this and I did change the code so it would sell always 100%. But indeed, just use it as intended, it just works best. And it only leaves the small particle behind once, so not really a worry.

eppenga avatar Apr 23 '22 16:04 eppenga

I played a long time with this and I did change the code so it would sell always 100%. But indeed, just use it as intended, it just works best. And it only leaves the small particle behind once, so not really a worry.

Hello, what should I change in the code so that the currency is sold at 100%?

Luisonmdq avatar Apr 30 '22 19:04 Luisonmdq

I played a long time with this and I did change the code so it would sell always 100%. But indeed, just use it as intended, it just works best. And it only leaves the small particle behind once, so not really a worry.

can you share the code?

wfchan avatar Jun 13 '22 06:06 wfchan