Merge pull request #4513 from freqtrade/fix/4511

Fix stoploss order problem with FTX
This commit is contained in:
Matthias
2021-03-11 19:39:44 +01:00
committed by GitHub
3 changed files with 5 additions and 4 deletions

View File

@@ -432,7 +432,7 @@ class LocalTrade():
self.close_rate_requested = self.stop_loss
if self.is_open:
logger.info(f'{order_type.upper()} is hit for {self}.')
self.close(order['average'])
self.close(safe_value_fallback(order, 'average', 'price'))
else:
raise ValueError(f'Unknown order type: {order_type}')
cleanup_db()