self.wait_for_order_registration#
- lumibot.strategies.strategy.Strategy.wait_for_order_registration(self, order)#
Wait for the order to be registered by the broker
- Parameters:
order (Order object) – Order object to be registered by the broker.
- Return type:
Order object
Example
>>> # For a market buy order >>> order = self.create_order("SPY", 100, "buy") >>> self.submit_order(order) >>> self.wait_for_order_registration(order)
>>> # For a limit buy order >>> order = self.create_order("SPY", 100, "buy", limit_price=100.00) >>> self.submit_order(order) >>> self.wait_for_order_registration(order)