Fix problem with FTX

where cancelled orders are "cancelled", not "canceled"
This commit is contained in:
Matthias
2021-03-09 20:21:08 +01:00
parent 61ec7a309b
commit 99583bbd0c
3 changed files with 5 additions and 4 deletions

View File

@@ -425,7 +425,7 @@ class Trade(_DECL_BASE):
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()