Closed 21jake closed 3 years ago
Thanks for bringing that up! I assume you're on the mainnet? I haven't seen this issue on the testnet, but I did come across before. I've seen other people's workaound is to sell 99.5% of the coin owned. Also, the lot size issue is probably due to the fact that the equation changes the format of the volume. Binance is very weird about the volume format. For example 12.300 XRP would return a LOT_SIZE error while 12.3 is perfectly fine.
I'll think of a way to implement your suggestion without breaking the formatting.
Are you able to try this for the sell quantity? quantity=float('{:.{}f}'.format((coins_bought[coin]['volume']*99.5/100), coins_bought[coin]['volume']))
Yes, I'm on mainnet. Not super familar with python tho but I can understand what your code is doing :D And thank you for the solution. I will feedback ASAP.
Truly appreciate what you're doing for the community 🥂
Are you able to try this for the sell quantity?
quantity=float('{:.{}f}'.format((coins_bought[coin]['volume']*99.5/100), coins_bought[coin]['volume']))
This is not a valid format to use. And I can't really figure our what format you're going for, but I'm not that well versed in python syntax
New commit pushed, this should fix the issue above, feel free to re-open the issue in case it doesn't :)
@CyberPunkMetalHead it's still broken unfortunately.
APIError(code=-1013): Filter failure: LOT_SIZE
I believe this issue comes from the fact that Binance (sometimes) don't let you sell 100% of some coins.
For example I bought 15 CTXCUSDT but can only sell 14.95 of 'em.
One workaround I propose is just sell near 100% of the actual amount the bot bought earlier.
Define this in the user input section
ACTUAL_SELL_RATIO = 99
And In the sell_coins() function:
Also, fuck Binance.
EDIT: The workaround above causes another issues of APIError(code=-1013): Filter failure: LOT_SIZE. So please propose another solution.