self.wait_for_orders_registration#

lumibot.strategies.strategy.Strategy.wait_for_orders_registration(self, orders)#

Wait for the orders to be registered by the broker

Parameters:

orders (list of orders) – List of order objects to be registered by the broker.

Return type:

list of orders

Example

>>> # 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_registration([order1, order2])