[Kucoin] [Python version] Try-Except-Pass will make bot never do sell fallback.
nikeboy264 opened this issue · 1 comments
Hi,
I'm notice that you input some new code (try-except) for kucoin python version.
At line 176 to 185, you do a Try-Except-Pass (may i call that like this ? Sorry i have a little knowledge in coding)
In case dealFunds = 0, the Try-Except-Pass do it job, that bypass the error. But then at line 187, a Return action is called.
=> That make bot never do sell fallback.
I'm tricky resolved by input If dealFunds = 0 then imediately count down and sell fallback.
Oh, i've read your new Readme, so Python version will soon end-of-life. i'm so sad because last 2 weeks was my hard time to know just a little about Python. Anw, i'm ready for NodeJS, hope everything fine.
Hey, the try-except block is in place because the script is partly asynchronous (async). The fallback function is also called asynchronously at line 168.
The try-except ensures that the bot doesn't crash when an asynchronous function is still waiting to get a response from the exchange server. While this is happening, the timer for the fallback function is running.
Yes, sorry but it's hard to maintain two different code bases. I've put more effort into the NodeJS version too and it is faster than the Python version.