From 6e324a3bee133cf8acca61380ed12ffe2624e3a4 Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Sun, 20 Jul 2025 22:27:27 +0800 Subject: [PATCH] fix: quote_balance sufficiency calculation --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index a4badad..6b8dd93 100644 --- a/main.py +++ b/main.py @@ -642,7 +642,7 @@ class GridTradingBot: new_buy_price, ) - if quote_balance > self.reserve_quote: + if quote_balance - self.order_amount * new_buy_price > self.reserve_quote: logger.debug( "[GridTradingBot.extend_grid] Quote balance sufficient (%f > %f), checking order value", quote_balance,