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

feat: Automatic conversion to BNB using feature "Convert to small BNB assets"

Open ilbuonmarcio opened this issue 3 years ago • 4 comments

Is your proposal related to a problem?

Being the tired human being I am, I usually forget to convert small useless remaining coins to BNB.

Describe the solution you'd like

Can we make a feature, configurable in the global configuration, and only handling coin pairs handled by the bot exclusively, and also lower than a certain USDT price and currently not in a trade nor with the last buy price set, to automagically convert to BNB every now and then using the feature already provided with the bot, but with a cron instead?

It should be default to disabled, and you need to explicitly enable it to get the desired effect.

Additional context

Me and @pedrohusky are currently discussing about it on Discord chat and getting suggestions and possible problems would be useful.

It should be not a big of a development effort on our side, but that can be a fine improvement to the bot automation in general, which I especially prefer :)

ilbuonmarcio avatar Sep 14 '21 23:09 ilbuonmarcio

Oh, interesting.

But there are some issues with automating that.

If you are trading a small amount of quote assets like 10 USDT, then the coin is eligible for the dust transfer, which I don't want. The calculation for dust transfer is as below:

  • https://github.com/chrisleekr/binance-trading-bot/blob/master/app/frontend/websocket/handlers/dust-transfer-get.js
  • https://github.com/chrisleekr/binance-trading-bot/blob/master/app/cronjob/trailingTradeHelper/common.js#L89

Based on the Binance doc - https://academy.binance.com/en/articles/converting-dust-on-binance - you can execute dust transfer if the value is less than 0.001BTC, which I just found this is updated. Last time when I checked that document, it was 0.0003BTC.

Anyway, for small traders, this automation can cause unexpected results.

chrisleekr avatar Sep 15 '21 10:09 chrisleekr

We were thinking about setting a maximum threshold for each quote, like 5 for USDT pairs, to handle this.

ilbuonmarcio avatar Sep 15 '21 10:09 ilbuonmarcio

Right, that should resolve the issue. :+1:

As you can see from the official doc, it should be calculated against BTC to determine dust-transferable. So if you want to calculate with USDT (quote assets), then it may not correct way to achieve it.

chrisleekr avatar Sep 15 '21 10:09 chrisleekr

This is fine with me 💪🏻

ilbuonmarcio avatar Sep 15 '21 10:09 ilbuonmarcio