Add tests for Order object parsing

This commit is contained in:
Matthias
2020-09-06 14:17:45 +02:00
parent b4c3529135
commit b7662722ba
2 changed files with 48 additions and 0 deletions

View File

@@ -154,6 +154,7 @@ class Order(_DECL_BASE):
if 'timestamp' in order and order['timestamp'] is not None:
self.order_date = datetime.fromtimestamp(order['timestamp'] / 1000, tz=timezone.utc)
self.ft_is_open = True
if self.status in ('closed', 'canceled', 'cancelled'):
self.ft_is_open = False
if order.get('filled', 0) > 0: