Fixed an issue with failed orders

This commit is contained in:
fredfortier
2017-09-04 11:33:21 -04:00
parent a58e3522a9
commit 7247b761d5
2 changed files with 8 additions and 6 deletions
+3 -2
View File
@@ -401,8 +401,9 @@ class ExchangeTradingAlgorithm(TradingAlgorithm):
if order_id is not None:
order = self.portfolio.open_orders[order_id]
self.perf_tracker.process_order(order)
return order
return order
else:
return None
def round_order(self, amount):
"""
+5 -4
View File
@@ -531,10 +531,11 @@ class Exchange:
)
)
order = self.create_order(asset, amount, is_buy, style)
self._portfolio.create_order(order)
return order.id
if order:
self._portfolio.create_order(order)
return order.id
else:
return None
@abstractmethod
def get_open_orders(self, asset):