mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 11:51:19 +00:00
fix: telegram crash during exchange downtime
This commit is contained in:
@@ -806,15 +806,14 @@ class Telegram(RPCHandler):
|
||||
|
||||
if r["is_open"]:
|
||||
if r.get("realized_profit"):
|
||||
lines.extend(
|
||||
[
|
||||
lines.append(
|
||||
f"*Realized Profit:* `{r['realized_profit_ratio']:.2%} "
|
||||
f"({r['realized_profit_r']})`",
|
||||
(
|
||||
f"({r['realized_profit_r']})`"
|
||||
)
|
||||
if r.get("total_profit_ratio"):
|
||||
lines.append(
|
||||
f"*Total Profit:* `{r['total_profit_ratio']:.2%} "
|
||||
f"({r['total_profit_abs_r']})`"
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
# Append empty line to improve readability
|
||||
|
||||
Reference in New Issue
Block a user