OCO (One Cancels the Other)
In simple terms
An OCO order is like setting up two backup plans where only one can happen. You tell your exchange: 'If the price goes up to $X, sell my coins' and 'If the price drops to $Y, sell my coins' — whichever happens first will execute, and the other order automatically disappears.
Definition
A pair of orders where executing one automatically cancels the other.
In depth
OCO (One Cancels the Other) is an order management mechanism that links two conditional orders—typically a take-profit order and a stop-loss order—such that execution of either order triggers an automatic cancellation of the remaining order on the exchange's order matching engine. When the market price reaches the trigger condition of the first order, the exchange's system executes that order and simultaneously sends a cancellation instruction for the paired order, preventing redundant or conflicting executions. This reduces counterparty risk and is commonly implemented through the exchange's order routing logic rather than on-chain, making it a UX feature dependent on the exchange's infrastructure.
How does OCO (One Cancels the Other) work?
You submit two linked orders as a single instruction, usually a take-profit above the market and a stop-loss below it. The exchange holds both live and monitors them together. When either one triggers, the exchange automatically cancels the other, so only one can ever execute. This brackets an open position with both an exit target and a loss limit without risking a double sale. Some venues fill one leg partially and reduce the linked leg proportionally rather than cancelling it outright, so the exact handling depends on the exchange.
An example
Illustrative figures only. Someone holds 1 unit bought at $100 and places an OCO with a sell limit at $130 and a stop at $85. If price rises and the $130 limit fills, the $85 stop cancels automatically. If instead price falls to $85 first, the stop executes and the $130 limit cancels. One exit happens, never both, and the position closes either way.
Figures are illustrative only.
What beginners get wrong
- An OCO on an asset already sold or moved off the exchange can leave a leg that fills against a position no longer held.
- Partial-fill handling differs by venue, so assuming both legs cancel cleanly on any exchange can leave unexpected exposure.
- Setting the two levels far apart makes the bracket unlikely to trigger; setting them too close makes ordinary volatility hit one almost immediately.
- The stop leg still carries slippage risk, because on most venues it converts to a market order once triggered.
Related terms
Part of
What do the different crypto order types do? — the subject page for order types, with all 9 of its definitions in one place.
Educational only — not financial advice.
