Add relative profit to daily/weekly commands

This commit is contained in:
Matthias
2022-06-11 11:18:21 +02:00
parent 0a801c0223
commit 76827b31a9
3 changed files with 19 additions and 8 deletions

View File

@@ -605,14 +605,16 @@ class Telegram(RPCHandler):
unit
)
stats_tab = tabulate(
[[period['date'],
[[f"{period['date']} ({period['trade_count']})",
f"{round_coin_value(period['abs_profit'], stats['stake_currency'])}",
f"{period['fiat_value']:.2f} {stats['fiat_display_currency']}",
f"{period['trade_count']} trades"] for period in stats['data']],
f"{period['rel_profit']:.2%}",
] for period in stats['data']],
headers=[
val.header,
f'Profit {stake_cur}',
f'Profit {fiat_disp_cur}',
f"{val.header} (trades)",
f'Prof {stake_cur}',
f'Prof {fiat_disp_cur}',
'Profit %',
'Trades',
],
tablefmt='simple')