Improve logmessage for trailing stoploss

This commit is contained in:
Matthias 2020-08-24 06:56:56 +02:00
parent 38809acde8
commit 26f45c8323

View File

@ -988,8 +988,8 @@ class FreqtradeBot:
update_beat = self.strategy.order_types.get('stoploss_on_exchange_interval', 60) update_beat = self.strategy.order_types.get('stoploss_on_exchange_interval', 60)
if (datetime.utcnow() - trade.stoploss_last_update).total_seconds() >= update_beat: if (datetime.utcnow() - trade.stoploss_last_update).total_seconds() >= update_beat:
# cancelling the current stoploss on exchange first # cancelling the current stoploss on exchange first
logger.info('Trailing stoploss: cancelling current stoploss on exchange (id:{%s}) ' logger.info(f"Cancelling current stoploss on exchange for pair {trade.pair} "
'in order to add another one ...', order['id']) f"(orderid:{order['id']}) in order to add another one ...")
try: try:
co = self.exchange.cancel_stoploss_order(order['id'], trade.pair) co = self.exchange.cancel_stoploss_order(order['id'], trade.pair)
trade.update_order(co) trade.update_order(co)