From badc7ed18cc6b7f27c8179d32fd8a7b61044bae4 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 14 Oct 2025 06:49:33 +0200 Subject: [PATCH] feat(bitget): fix liquidation formula --- freqtrade/exchange/bitget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/bitget.py b/freqtrade/exchange/bitget.py index a847df262..94be39f42 100644 --- a/freqtrade/exchange/bitget.py +++ b/freqtrade/exchange/bitget.py @@ -232,8 +232,8 @@ class Bitget(Exchange): if self.trading_mode == TradingMode.FUTURES and self.margin_mode == MarginMode.ISOLATED: position_direction = -1 if is_short else 1 - return wallet_balance - (amount * open_rate * position_direction) / amount * ( - mm_ratio + taker_fee_rate - position_direction + return (wallet_balance - (amount * open_rate * position_direction)) / ( + amount * (mm_ratio + taker_fee_rate - position_direction) ) else: raise OperationalException(