Add information about bid and ask strategy to /showconfig

This commit is contained in:
Matthias 2020-06-05 20:31:40 +02:00
parent 5f9994c9ed
commit 8c32d691c7
3 changed files with 7 additions and 1 deletions

View File

@ -105,6 +105,8 @@ class RPC:
'exchange': config['exchange']['name'],
'strategy': config['strategy'],
'forcebuy_enabled': config.get('forcebuy_enable', False),
'ask_strategy': config.get('ask_strategy', {}),
'bid_strategy': config.get('bid_strategy', {}),
'state': str(self._freqtrade.state)
}
return val

View File

@ -636,13 +636,15 @@ class Telegram(RPC):
else:
sl_info = f"*Stoploss:* `{val['stoploss']}`\n"
import json
self._send_msg(
f"*Mode:* `{'Dry-run' if val['dry_run'] else 'Live'}`\n"
f"*Exchange:* `{val['exchange']}`\n"
f"*Stake per trade:* `{val['stake_amount']} {val['stake_currency']}`\n"
f"*Max open Trades:* `{val['max_open_trades']}`\n"
f"*Minimum ROI:* `{val['minimal_roi']}`\n"
f"*Ask strategy:* ```\n{val['ask_strategy']}```\n"
f"*Bid strategy:* ```\n{json.dumps(val['bid_strategy'])}```\n"
f"{sl_info}"
f"*Ticker Interval:* `{val['ticker_interval']}`\n"
f"*Strategy:* `{val['strategy']}`\n"

View File

@ -325,6 +325,8 @@ def test_api_show_config(botclient, mocker):
assert rc.json['ticker_interval'] == '5m'
assert rc.json['state'] == 'running'
assert not rc.json['trailing_stop']
assert 'bid_strategy' in rc.json
assert 'ask_strategy' in rc.json
def test_api_daily(botclient, mocker, ticker, fee, markets):