feat: add leverage to telegram's /status table

This commit is contained in:
Matthias 2024-08-15 17:56:54 +02:00
parent 3a676f98db
commit fdad24aaac

View File

@ -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