From b4c3e1fd58d6bb9a8b863aa8b1f2b9ded60075ed Mon Sep 17 00:00:00 2001 From: raphaelstar <121986173+raphaelstar@users.noreply.github.com> Date: Thu, 2 Feb 2023 15:52:27 +0100 Subject: [PATCH] `order.amount` -> `order.safe_amount` --- freqtrade/freqtradebot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index dbe513ccf..8d12dd99f 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1628,7 +1628,7 @@ class FreqtradeBot(LoggingMixin): # second condition is for mypy only; order will always be passed during sub trade if sub_trade and order is not None: - amount = order.safe_filled if fill else order.amount + amount = order.safe_filled if fill else order.safe_amount order_rate: float = order.safe_price profit = trade.calc_profit(rate=order_rate, amount=amount, open_rate=trade.open_rate)