- strategies.strategy.Strategy.wait_for_orders_execution(self, orders)#
Wait for a list of orders to be executed or canceled by the broker
orders (list of orders) – List of order objects to be executed by the broker.
- Return type:
list of orders
>>> # For 2 market buy orders >>> order1 = self.create_order("SPY", 100, "buy") >>> order2 = self.create_order("TLT", 200, "buy") >>> self.submit_orders([order1, order2]) >>> self.wait_for_orders_execution([order1, order2])