CyberPunkMetalHead / Binance-volatility-trading-bot

This is a fully functioning Binance trading bot that measures the volatility of every coin on Binance and places trades with the highest gaining coins If you like this project consider donating though the Brave browser to allow me to continuously improve the script.
MIT License
3.39k stars 774 forks source link

APIError(code=-2010) #204

Open pantersxx3 opened 3 years ago

pantersxx3 commented 3 years ago

sell_coins() Exception occured on selling the coin! Coin: MDXUSDT Sell Volume coins_bought: 12.26 Price:1.1613 Exception: APIError(code=-2010): Account has insufficient balance for requested action. I do not have BNB to pay the transaction so disable that option on the page, but I have some USDT

Povilasisnazereto commented 3 years ago

I have the same issues when bot is trying to sell a coin. I have bnb in my account and I have enabled the option to pay fees in bnb. But I noticed this thing. When the bot bought the coin the volume of coin was 0.08591400 And when the bot tried to sell the coin this message was printed before the error: TP or SL reached, selling 0.086 QNTUSDT... So the quantity the bot is trying to sell is rounded and it's a little bit more than the amount bot had bought.

Could this be the cause of this error? How to fix this?

pantersxx3 commented 3 years ago

in my case the problem was due to not having bnb, the bot cannot calculate the transaction costs well so it gives the error. Tebgo BNB and activated the option, what I did was delete the api and recreate it, that helped to be able to use the bot with BNB.

sushildhakal commented 3 years ago

Does it have to be BNB. can it not add the fees on cost price(*2 for selling time ) and use USDT instead?

pantersxx3 commented 3 years ago

as it does not have BNB, the bot buys but when it sells it tries to sell more than what it bought, there the error occurs

hassane11 commented 2 years ago

any update on this issue? I have BNB in my account but the bot keeps having this error.