Skip to content

Commit 1513ba9

Browse files
committed
chore: Move liquidation up a line
1 parent 22b8824 commit 1513ba9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

freqtrade/rpc/telegram.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,10 @@ async def _status_msg(self, update: Update, context: CallbackContext) -> None:
825825

826826
# Append empty line to improve readability
827827
lines.append(" ")
828+
# Adding liquidation only if it is not None
829+
if liquidation := r.get("liquidation_price"):
830+
lines.append(f"*Liquidation:* `{round_value(liquidation, 8)}`")
831+
828832
if (
829833
r["stop_loss_abs"] != r["initial_stop_loss_abs"]
830834
and r["initial_stop_loss_ratio"] is not None
@@ -834,12 +838,7 @@ async def _status_msg(self, update: Update, context: CallbackContext) -> None:
834838
"*Initial Stoploss:* `{initial_stop_loss_abs:.8f}` "
835839
"`({initial_stop_loss_ratio:.2%})`"
836840
)
837-
# Adding liquidation only if it is not None
838-
lines.append(
839-
f"*Liquidation:* `{round_value(r['liquidation_price'], 8)}`"
840-
if r.get("liquidation_price")
841-
else ""
842-
)
841+
843842
# Adding stoploss and stoploss percentage only if it is not None
844843
lines.append(
845844
f"*Stoploss:* `{round_value(r['stop_loss_abs'], 8)}` "

0 commit comments

Comments
 (0)