mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-03 12:40:47 +08:00
BUG: Ensure that order exists before attempting to cancel.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user