Guides · Common questions

What is an OCO order?

How a one-cancels-the-other order links a take-profit and a stop-loss, how it works on spot and futures, the details that differ between exchanges, and common mistakes.

6 min readCommon questions

An OCO order, short for one-cancels-the-other, is a pair of orders linked together: when one of them fills, the exchange cancels the other. The most common use is protecting a position from both sides at once, with a take-profit above the price and a stop-loss below it, so that whichever comes first closes the trade and the other order disappears. This guide explains how it works and what to check before relying on it.

The problem it solves

Imagine you bought a coin on spot and placed two separate orders to sell it: a limit sell at your target and a stop-loss below. If the target fills, the stop-loss is still sitting there. Later the price falls, the stop triggers, and the exchange tries to sell coins you no longer hold, or, on a platform that allows it, sells something you did not mean to sell. Even when the order simply fails, you are left with a forgotten order that could surprise you later. An OCO links the two so that this cannot happen.

How an OCO is built

Protecting a long on spot, made-up numbers
You hold 10 coins bought at $100
Leg 1: limit sell 10 coins at $112 (the target)
Leg 2: stop-limit sell 10 coins, trigger $95, limit $94.50 (the stop)
Price rises to $112: leg 1 fills, leg 2 is cancelled at once
Or price falls to $95: leg 2 triggers and fills, leg 1 is cancelled

On many spot exchanges the stop leg of an OCO is a stop-limit order: when the trigger price is reached, a limit order is placed at the limit price. That gives control over the fill price, but in a fast fall the price can gap through the limit and leave the order unfilled. Some platforms offer a stop-market leg instead, which fills but at whatever price is available.

OCO on futures

Futures platforms often handle the same idea differently: you attach a take-profit and a stop-loss to the position itself. When either closes the position, the other is removed with it. These attached orders are usually reduce-only, so they can only close the position and never open a new one in the other direction. Functionally this does the job of an OCO.

Details that differ between exchanges

  • Partial fills. If one leg fills only partly, some platforms reduce the other leg to the remaining amount and others cancel it completely. Check which.
  • The trigger price. On futures, the stop can be triggered by the last price or the mark price.
  • Stop-limit gaps. A stop-limit leg can be skipped in a fast move; decide whether you prefer certainty of price or certainty of execution.
  • Order type support. Not every exchange offers OCO on every market, and some limit the price distances you can set.
  • Fees. The target leg may pay a maker fee if it rests in the book; a triggered stop usually pays the taker fee.

OCO for entries

An OCO can also be used before a position exists. A trader waiting for a range to break might place a buy-stop above the range and a sell-stop below it as an OCO: whichever side breaks first opens the trade and cancels the other. Each leg then needs its own stop-loss plan, because the OCO only manages the entry.

OCO and your position size

An OCO protects the position you have when you place it. Both legs are usually set to the same size as the position. If you later add to the position or close part of it by hand, the OCO does not follow on most platforms: one leg may now be too small to close everything, or too large for what is left. Each time the size changes, cancel the OCO and place a new one that matches.

Size out of step, made-up numbers
Position: 10 coins, OCO legs for 10 coins
You sell 4 coins by hand at a first target
The OCO still says 10: on spot it may fail for lack of coins; on futures without reduce-only it could open a short
Fix: cancel and place a new OCO for 6 coins

Common mistakes

  • Placing the target and the stop as two separate orders and forgetting to cancel one.
  • Setting the stop-limit’s limit price equal to the trigger, so it rarely fills in a fast move.
  • Changing the position size afterwards (adding or partly closing) without updating the OCO.
  • Assuming every exchange treats partial fills the same way.

A short checklist

  1. Decide the target and the stop from your plan before entering.
  2. Place them as one OCO, or as take-profit and stop-loss attached to the futures position.
  3. Choose stop-limit or stop-market for the stop leg on purpose, and leave room between trigger and limit if you use stop-limit.
  4. After any change to the position size, check that both legs still match it.
  5. Look at your open orders at the end of each session.

Key takeaways

  • An OCO links two orders: when one fills, the other is cancelled.
  • Its main use is a take-profit and a stop-loss on the same position.
  • On futures, a take-profit and stop-loss attached to the position do the same job.
  • Partial fills, trigger prices and stop-limit gaps work differently between exchanges.

Related guides

Practice it, without risking money.

In the OREX practice simulator you attach a take profit and a stop loss to a position; whichever closes it first ends the trade, and the other goes with it.

The OREX Academy turns topics like this one into short lessons with interactive charts, quizzes and drills in a practice simulator with $10,000 of virtual money. Your AI coach answers questions about them any time.

Start the 5-day free trial Card required for the trial; cancel online before it ends and you pay nothing. Education only, not financial advice.