I’m trying to implement a short strategy using Python, but I’m encountering a problem with the repay operation. Specifically, the built-in AUTO_REPAY function doesn’t seem to work correctly. It doesn’t close the loan entirely, leaving a small amount of debt in my wallet. Sometimes, this amount is quite significant, much larger than the fees.
I’ve noticed that this issue has been around for a while, and even on Stack Overflow, it remains unanswered. Could you please help me resolve this problem?