self.cancel_order#

lumibot.strategies.strategy.Strategy.cancel_order(self, order)#

Cancel an order.

Cancels a single open order provided.

Parameters:

cancel. (An order object that the user seeks to) –

Return type:

None

Example

>>> # Create an order then cancel it
>>> order = self.create_order("SPY", 100, "buy")
>>> self.submit_order(order)
>>> self.cancel_order(order)