BUG: Ensure that order exists before attempting to cancel.

This commit is contained in:
fawce
2013-04-30 17:19:16 -04:00
committed by Eddie Hebert
parent 34f1dd783a
commit d381865a89
+3
View File
@@ -100,6 +100,9 @@ class Blotter(object):
return order.id
def cancel(self, order_id):
if order_id not in self.orders:
return
cur_order = self.orders[order_id]
if cur_order.open:
order_list = self.open_orders[cur_order.sid]