def _show_config(self, update: Update, context: CallbackContext) -> None: """ Handler for /show_config. Show config information information :param bot: telegram bot :param update: message update :return: None """ val = RPC._rpc_show_config(self._config, self._rpc._freqtrade.state) if val['trailing_stop']: sl_info = ( f"*Initial Stoploss:* `{val['stoploss']}`\n" f"*Trailing stop positive:* `{val['trailing_stop_positive']}`\n" f"*Trailing stop offset:* `{val['trailing_stop_positive_offset']}`\n" f"*Only trail above offset:* `{val['trailing_only_offset_is_reached']}`\n" ) else: sl_info = f"*Stoploss:* `{val['stoploss']}`\n" 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{json.dumps(val['ask_strategy'])}```\n" f"*Bid strategy:* ```\n{json.dumps(val['bid_strategy'])}```\n" f"{sl_info}" f"*Timeframe:* `{val['timeframe']}`\n" f"*Strategy:* `{val['strategy']}`\n" f"*Current state:* `{val['state']}`")
def show_config(rpc: Optional[RPC] = Depends(get_rpc_optional), config=Depends(get_config)): state = '' if rpc: state = rpc._freqtrade.state resp = RPC._rpc_show_config(config, state) resp['api_version'] = API_VERSION return resp
def show_config(rpc: Optional[RPC] = Depends(get_rpc_optional), config=Depends(get_config)): state = '' if rpc: state = rpc._freqtrade.state return RPC._rpc_show_config(config, state)