diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py
index 7636c2b8a..e5e18ad5b 100644
--- a/freqtrade/rpc/telegram.py
+++ b/freqtrade/rpc/telegram.py
@@ -469,17 +469,19 @@ def _performance(bot: Bot, update: Update) -> None:
send_msg('`trader is not running`', bot=bot)
return
- pair_rates = Trade.session.query(Trade.pair, func.sum(Trade.close_profit).label('profit_sum')) \
+ pair_rates = Trade.session.query(Trade.pair, func.sum(Trade.close_profit).label('profit_sum'),
+ func.count(Trade.pair).label('count')) \
.filter(Trade.is_open.is_(False)) \
.group_by(Trade.pair) \
.order_by(text('profit_sum DESC')) \
.all()
- stats = '\n'.join('{index}.\t{pair}\t{profit:.2f}%
'.format(
+ stats = '\n'.join('{index}.\t{pair}\t{profit:.2f}% ({count})
'.format(
index=i + 1,
pair=pair,
- profit=round(rate * 100, 2)
- ) for i, (pair, rate) in enumerate(pair_rates))
+ profit=round(rate * 100, 2),
+ count=count
+ ) for i, (pair, rate, count) in enumerate(pair_rates))
message = 'Performance:\n{}'.format(stats)
logger.debug(message)
diff --git a/freqtrade/tests/rpc/test_rpc_telegram.py b/freqtrade/tests/rpc/test_rpc_telegram.py
index 204774c49..eca65bd5a 100644
--- a/freqtrade/tests/rpc/test_rpc_telegram.py
+++ b/freqtrade/tests/rpc/test_rpc_telegram.py
@@ -400,11 +400,10 @@ def test_performance_handle(
trade.close_date = datetime.utcnow()
trade.is_open = False
-
_performance(bot=MagicMock(), update=update)
assert msg_mock.call_count == 1
assert 'Performance' in msg_mock.call_args_list[0][0][0]
- assert 'BTC_ETH\t6.20%
' in msg_mock.call_args_list[0][0][0]
+ assert 'BTC_ETH\t6.20% (1)
' in msg_mock.call_args_list[0][0][0]
def test_daily_handle(