Add protections to startup messages
This commit is contained in:
@@ -137,7 +137,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
Called on startup and after reloading the bot - triggers notifications and
|
||||
performs startup tasks
|
||||
"""
|
||||
self.rpc.startup_messages(self.config, self.pairlists)
|
||||
self.rpc.startup_messages(self.config, self.pairlists, self.protections)
|
||||
if not self.edge:
|
||||
# Adjust stoploss if it was changed
|
||||
Trade.stoploss_reinitialization(self.strategy.stoploss)
|
||||
|
@@ -62,7 +62,7 @@ class RPCManager:
|
||||
except NotImplementedError:
|
||||
logger.error(f"Message type '{msg['type']}' not implemented by handler {mod.name}.")
|
||||
|
||||
def startup_messages(self, config: Dict[str, Any], pairlist) -> None:
|
||||
def startup_messages(self, config: Dict[str, Any], pairlist, protections) -> None:
|
||||
if config['dry_run']:
|
||||
self.send_msg({
|
||||
'type': RPCMessageType.WARNING_NOTIFICATION,
|
||||
@@ -90,3 +90,8 @@ class RPCManager:
|
||||
'status': f'Searching for {stake_currency} pairs to buy and sell '
|
||||
f'based on {pairlist.short_desc()}'
|
||||
})
|
||||
if len(protections.name_list) > 0:
|
||||
self.send_msg({
|
||||
'type': RPCMessageType.STARTUP_NOTIFICATION,
|
||||
'status': f'Using Protections {protections.short_desc()}'
|
||||
})
|
||||
|
Reference in New Issue
Block a user