Closed kekkokk closed 2 years ago
I think the error is obvious here. You can't sell less than 1 USDT equivalent amount of any pairing. This isn't a math problem caclulating the sell order amount. You hit a prevention/requirement.
when the bot tries to sell, it passes to this function the amount he wants to sell (95.5% of the total owned amount) and the price it want to sell.
but this function sets the amount/price so you are selling a fraction of what you really want to sell. Am I right?
sorry, the misunderstanding is due to a poor merge revision of this branch in my own fork
https://github.com/CyberPunkMetalHead/gateio-crypto-trading-bot-binance-announcements-new-coins/blob/50537b9266c0da429410ab1b39cee323922a7919/trade_client.py#L39
this can work for a buy order, but dividing the amount by the price while selling is wrong (If I understood correctly?)
example error code on sell:
{"label":"INVALID_PARAM_VALUE","message":"Your order size 0.00799004248012527 is too small. The minimum is 1 USDT"}