tpmmthomas / binance-copy-trade-bot-old

A web scraping and automatic trading program implemented via the Binance api, with telegram bot as the UI.
21 stars 5 forks source link

ByBit - Float division by zero error #4

Open Pusherman2 opened 2 years ago

Pusherman2 commented 2 years ago

Hi there,

Checking in again, seen lots of updates, good stuff! I am testing it again and using ByBit this time as the exchange. However, I noticed when following a trader, sometimes the following error messages will occur:

opened order.
INFO - Debug float division by zero
ERROR - Some uncaught error! Oh no.

And subsequently the following message appears in TG: "Successfully quit following trader"

Unfortunately, I don't have the log what it was doing at that time but I am assuming an API exception when placing the order and there is some issue with determining the amount with proportionality? This is just a guess, I am also trading small amounts so maybe its an error that the amount is insufficient for trading a certain pair on the exchange.

The problem that arises is that, the script will remove/add the trader again and reload and this will take +- 3 minutes and in this timeframe it's possible to miss some orders/trades.

I've commented out the part of removing/reloading the trader if that happens but what would you suggest to prevent the bot from reloading? Also as a last question, if a limit order is not filled, will it be cancelled after a while? I could not find an expiration timer in the code but i've seen it happen and that's good if that's there to prevent unwanted trades in the future.

Once again thanks for all your efforts. If there's anything I can do to help/elaborate more or provide more logs, please let me know :)

tpmmthomas commented 2 years ago

Thanks for your question. I am sorry but I wasn't able to maintain this repo and make any updates on it anymore. I am just an amatuer developer and this code to be honest is not very well maintained. I am also having other projects at hand so I have no time to correct all the issues and bugs right here. Thanks for your interest and I hope you were able to solve the issues.