Add the telegram command function template.

This commit is contained in:
Xu Wang 2020-09-22 22:28:12 +01:00
parent b4443fdb1f
commit 28411da83e

View File

@ -108,6 +108,7 @@ class Telegram(RPC):
CommandHandler('edge', self._edge),
CommandHandler('help', self._help),
CommandHandler('version', self._version),
CommandHandler('stats', self._stats),
]
for handle in handles:
self._updater.dispatcher.add_handler(handle)
@ -738,6 +739,19 @@ class Telegram(RPC):
"""
self._send_msg('*Version:* `{}`'.format(__version__))
@authorized_only
def _stats(self, update: Update, context: CallbackContext) -> None:
"""
Handler for /stats
https://github.com/freqtrade/freqtrade/issues/3783
Show stats of recent trades
:param update: message update
:return: None
"""
# TODO: self._send_msg(...)
trades = self._rpc_trade_history(-1)
@authorized_only
def _show_config(self, update: Update, context: CallbackContext) -> None:
"""