order.amount -> order.safe_amount

This commit is contained in:
raphaelstar 2023-02-02 15:52:27 +01:00 committed by GitHub
parent 300e9acd37
commit b4c3e1fd58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1628,7 +1628,7 @@ class FreqtradeBot(LoggingMixin):
# second condition is for mypy only; order will always be passed during sub trade # second condition is for mypy only; order will always be passed during sub trade
if sub_trade and order is not None: 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 order_rate: float = order.safe_price
profit = trade.calc_profit(rate=order_rate, amount=amount, open_rate=trade.open_rate) profit = trade.calc_profit(rate=order_rate, amount=amount, open_rate=trade.open_rate)