Convert logs to fstrings
This commit is contained in:
@@ -379,15 +379,15 @@ class Trade(_DECL_BASE):
|
||||
self.open_rate = Decimal(safe_value_fallback(order, 'average', 'price'))
|
||||
self.amount = Decimal(safe_value_fallback(order, 'filled', 'amount'))
|
||||
self.recalc_open_trade_price()
|
||||
logger.info('%s_BUY has been fulfilled for %s.', order_type.upper(), self)
|
||||
logger.info(f'{order_type.upper()}_BUY has been fulfilled for {self}.')
|
||||
self.open_order_id = None
|
||||
elif order_type in ('market', 'limit') and order['side'] == 'sell':
|
||||
self.close(safe_value_fallback(order, 'average', 'price'))
|
||||
logger.info('%s_SELL has been fulfilled for %s.', order_type.upper(), self)
|
||||
logger.info(f'{order_type.upper()}_SELL has been fulfilled for {self}.')
|
||||
elif order_type in ('stop_loss_limit', 'stop-loss', 'stop'):
|
||||
self.stoploss_order_id = None
|
||||
self.close_rate_requested = self.stop_loss
|
||||
logger.info('%s is hit for %s.', order_type.upper(), self)
|
||||
logger.info(f'{order_type.upper()} is hit for {self}.')
|
||||
self.close(order['average'])
|
||||
else:
|
||||
raise ValueError(f'Unknown order type: {order_type}')
|
||||
|
Reference in New Issue
Block a user