Merge pull request #2945 from freqtrade/fix/kraken_stoplosshit

Kraken stoploss bugfix
This commit is contained in:
Matthias 2020-02-19 19:43:29 +01:00 committed by GitHub
commit 751e2b2359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,10 +318,10 @@ class Trade(_DECL_BASE):
elif order_type in ('market', 'limit') and order['side'] == 'sell':
self.close(order['price'])
logger.info('%s_SELL has been fulfilled for %s.', order_type.upper(), self)
elif order_type == 'stop_loss_limit':
elif order_type in ('stop_loss_limit', 'stop-loss'):
self.stoploss_order_id = None
self.close_rate_requested = self.stop_loss
logger.info('STOP_LOSS_LIMIT is hit for %s.', self)
logger.info('%s is hit for %s.', order_type.upper(), self)
self.close(order['average'])
else:
raise ValueError(f'Unknown order type: {order_type}')