mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 18:23:55 +00:00
Add the telegram command function template.
This commit is contained in:
parent
b4443fdb1f
commit
28411da83e
|
@ -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:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user