Order Types

Contingent Orders

Contingent orders are sets of orders with related lifecycles. When an order in the set fills or you cancel it, the brokerage triggers, cancels, or resizes the other orders in the set. The brokerage manages the whole set, so a fill and a cancel request can't race each other and leave a position without its exit orders. LEAN supports the following contingency types:

  • One Cancels Other (OCO) orders cancel the rest of the set when one of them fills, even partially.
  • One Triggers Other (OTO) orders hold the child orders until the parent order completely fills.
  • One Updates Other (OUO) orders reduce the remaining quantity of the rest of the set when one of them partially fills.

You can combine these types. For example, a bracket order is an entry order that triggers a take-profit order and a stop-loss order, which cancel each other. The members of a set can be combo orders.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: