Bot stuck when buy order is cancelled after already partially filled
uhliksk opened this issue · comments
Version
v0.0.96
Description
In volatile market if buy order is cancelled by Difference to cancel
or if price is higher then buy order price after the buy order is already partially filled then bot will get stuck with you have enough SYMBOL to sell
warning.
To Reproduce
- Set buy order to very high value in volatile market.
- Wait until triggered and partially filled.
- Wait until market raise over or drop under buy order range.
- Buy order will be cancelled and bot will get stuck.
Expected Behaviours
It should put new buy order again to continue fill buy grid trade.
Screenshots
Additional context
If I look at `22:14:27.991" it looks like bot is expecting you still have full amount of balance to buy this grid trade instead of partial balance after buy order is partially filled. For example if you have 1000 BUSD and buy order is for 700 BUSD, but it was partially filled by 400 BUSD, then your balance is 600 BUSD which is enough to continue and buy missing 300 BUSD, but it is not enough if bot is expecting full 800 BUSD balance everytime it is trying to put a buy order.