New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed grid script - Client place order at wrong price when rebalance (during the longrun) #6523
Comments
hi @mirono Could you please provide log file and your script file used? |
Here is the script and logs. |
From what I see from the log that's price for SOL-USDT pair is wrong, also order amount that Client trying to submit are too low for binance exchange. Tried other pair (XRP-USDT, bot used correct price and order amount) This one SOL-USDT, looks okay (can't reproduce your issue with wrong price/amount), I reduced order levels amount to 5 |
I made a manual trade to rebalance and be able to use the bot. |
Same thing happen today - the fixed grid need to sell some SOL but the order price is completely wrong (0.22 instead of 21.x). |
In my specific case the grid run out of bounds in SOL-USDT on Binance as the price went below the low limit. As it bought SOL all the way down I was left with not enough USDT. I stopped it and exited Hummingbot. At some point later, I updated the limit and run it again. As there wasn't enough USDT it tried to rebalance by selling some SOL. It is at this point that the bug occurs - the price of SOL in the rebalance order is wrong. |
Got it, the bug is only in sell rebalance orders, not in buy. I've found the solution for it. In line 192, the correct code should be: price = ref_price * (Decimal("100") + self.rebalance_order_spread) / Decimal("100") I'll submit a pull request. |
Created pull request here: |
Fixed on version |
Describe the bug
fixed_grid.py script issue.
script fail to place orders on initialize to rebalance.
Logs in attached screenshot.
Steps to reproduce
Release version
dev-1.18.0
Type of installation
Docker
Attach required files
The text was updated successfully, but these errors were encountered: