Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# self.cancel_order

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)