From fdad24aaac13af6ea606c7923a67a43ac97c4fad Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 15 Aug 2024 17:56:54 +0200 Subject: [PATCH] feat: add leverage to telegram's /status table --- freqtrade/rpc/rpc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index aee8bd725..0c555e860 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -296,7 +296,10 @@ class RPC: else: trade_profit = 0.0 profit_str = f"{0.0:.2f}" - direction_str = ("S" if trade.is_short else "L") if nonspot else "" + leverage = f"{trade.leverage:.3g}" + direction_str = ( + (f"S {leverage}x" if trade.is_short else f"L {leverage}x") if nonspot else "" + ) if self._fiat_converter: fiat_profit = self._fiat_converter.convert_amount( trade_profit, stake_currency, fiat_display_currency