@firebee You are going to have to track your orders. You can do this either with a list or a dictionary. If just trading one symbol, a list will suffice,otherwise a dict of lists with symbols as keys.

So, based upon what you said above, when you place your orders, you will have

# two limit buy orders. self.ords = [o1, o2]

When these orders fill, you will get a notification in notify order where you can filter for completed trades. As your trades complete, you can take action.

def notify_order(self, order): # Check if an order has been completed if order.status in [order.Completed]: ## Here you have a just completed order. Compare this to your self.ords list and take whatever actions you need. Cancel/create, whatever works.