Skip to main content
Your new order never trades against your own resting order. When the two would match, one of them is cancelled instead. Each order chooses which one with stp_mode. By default, your resting order is cancelled and your new order keeps matching against other traders.

Modes

Incoming order
Would it match your own resting order?
Matches normally
Default: the resting order is cancelled
Your order continues into the rest of the book
ExpireMaker (default)Your resting order is cancelled. The new order keeps matching.
ExpireTakerThe unfilled part of the new order is cancelled. Your resting order stays.
ExpireBothYour resting order and the unfilled part of the new order are cancelled.
stp_mode picks the side per order. Anything filled before reaching your own order stays filled.

How it plays out

  • Earlier fills are kept. Your new order fills at the best prices first. Anything it filled against other traders before reaching your own order stays filled. ExpireTaker and ExpireBoth cancel only the part still unfilled.
  • Every one of your orders in the way is cancelled. With ExpireMaker, the new order cancels each of your resting orders it reaches, at every price level it crosses, and keeps going.
  • Post-only orders are cancelled instead. A post-only order that would cross your own resting order is cancelled as a post-only order. Your resting order stays, whatever the stp_mode.
  • Market orders size against other traders. With ExpireMaker, a market order does not count your own resting orders as liquidity it can fill against.
  • Modifying keeps the stp_mode. A modified order keeps the stp_mode it was placed with. To change it, cancel the order and place a new one.