mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Adding URL to market graph and number of trades/pair in /performance commande
This commit is contained in:
parent
29987c3ff6
commit
d849694a70
|
@ -476,9 +476,10 @@ def _performance(bot: Bot, update: Update) -> None:
|
|||
.order_by(text('profit_sum DESC')) \
|
||||
.all()
|
||||
|
||||
stats = '\n'.join('{index}.\t<code>{pair}\t{profit:.2f}% ({count})</code>'.format(
|
||||
stats = '\n'.join('{index}.\t<code>[{pair}]({url})\t{profit:.2f}% ({count})</code>'.format(
|
||||
index=i + 1,
|
||||
pair=pair,
|
||||
url=exchange.get_pair_detail_url(pair),
|
||||
profit=round(rate * 100, 2),
|
||||
count=count
|
||||
) for i, (pair, rate, count) in enumerate(pair_rates))
|
||||
|
|
|
@ -404,7 +404,7 @@ def test_performance_handle(
|
|||
_performance(bot=MagicMock(), update=update)
|
||||
assert msg_mock.call_count == 1
|
||||
assert 'Performance' in msg_mock.call_args_list[0][0][0]
|
||||
assert '<code>BTC_ETH\t6.20% (1)</code>' in msg_mock.call_args_list[0][0][0]
|
||||
assert '<code>[BTC_ETH](https://www.bittrex.com/Market/Index?MarketName=BTC-ETH)\t6.20% (1)</code>' in msg_mock.call_args_list[0][0][0]
|
||||
|
||||
|
||||
def test_daily_handle(
|
||||
|
|
Loading…
Reference in New Issue
Block a user