Skip to content

Commit 0de48d9

Browse files
authored
Merge pull request freqtrade#11820 from mrpabloyeah/fix-telegram-profit-stats-when-fiat_display_currency-is-not-set
Fix telegram profit stats when fiat_display_currency is not set
2 parents 04a8539 + c4eb26b commit 0de48d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

freqtrade/rpc/telegram.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,12 +1044,15 @@ async def _profit(self, update: Update, context: CallbackContext) -> None:
10441044
else:
10451045
# Message to display
10461046
if stats["closed_trade_count"] > 0:
1047+
fiat_closed_trades = (
1048+
f"∙ `{fmt_coin(profit_closed_fiat, fiat_disp_cur)}`\n" if fiat_disp_cur else ""
1049+
)
10471050
markdown_msg = (
10481051
"*ROI:* Closed trades\n"
10491052
f"∙ `{fmt_coin(profit_closed_coin, stake_cur)} "
10501053
f"({profit_closed_ratio_mean:.2%}) "
10511054
f"({profit_closed_percent} \N{GREEK CAPITAL LETTER SIGMA}%)`\n"
1052-
f"∙ `{fmt_coin(profit_closed_fiat, fiat_disp_cur)}`\n"
1055+
f"{fiat_closed_trades}"
10531056
)
10541057
else:
10551058
markdown_msg = "`No closed trade` \n"

0 commit comments

Comments
 (0)