fastbot
Try it
Back to Blog
·3 min read

What is an OCO order? Take-profit and stop-loss in one order

OCO (One-Cancels-the-Other) lets you set take-profit and stop-loss at the same time — when one fills, the other cancels. How it works, when to use it, and a real example.

OCO OrderRisk ManagementTake ProfitStop Loss

You just bought a coin and want to take profit if it rises and cut losses if it falls — but you can't watch the screen 24/7. The OCO order solves exactly this: set both targets at once and let the exchange handle the rest.

What is OCO?

OCO = One-Cancels-the-Other.

It's a pair of orders placed at the same time:

  • A take-profit order — sells when price rises to your target
  • A stop-loss order — sells when price falls to your loss threshold

When one order fills, the other is automatically cancelled. You never get both filled.

Why do you need OCO?

Without OCO, you have to choose: place either a take-profit or a stop-loss — you can't safely keep both (two separate orders could both fill when price whips up and down quickly).

OCO gives you two-way protection at once after entering a position:

  • Price rises → auto take-profit, so you don't get greedy and lose the gain
  • Price falls → auto stop-loss, so you don't "hold and hope" into a big loss

This removes most emotional decisions — the number-one enemy of investors. See Trading psychology: overcoming fear and greed.

A concrete example

You buy ETH at 3,000 USD. You want to:

  • Take profit if it reaches 3,400 USD (about 13% gain)
  • Cut losses if it drops to 2,820 USD (max loss about 6%)

You place one OCO sell order with these two levels. Then:

  • If ETH hits 3,400 → the take-profit fills, the stop-loss auto-cancels. You profit.
  • If ETH drops to 2,820 → the stop-loss fills, the take-profit auto-cancels. You stop the loss at the level you set.

Either way, you don't watch the screen and you don't get stuck with both orders.

How OCO differs from regular orders

Order typeDescriptionTwo-way protection?
LimitBuy/sell at a fixed priceNo
Stop-lossSells when price drops below thresholdDownside only
Take-profitSells when price rises to targetUpside only
OCOPairs TP + SL, one fill cancels the otherYes

More on basic orders: Limit orders vs market orders.

Things to watch with OCO

  • Set reasonable distances: a stop-loss too close to the current price gets "wicked" out by short-term volatility, then price comes back — see Proper stop-loss placement.
  • Use a risk-reward ratio: the take-profit target should be larger than the stop-loss distance — see Risk-reward ratio.
  • OCO doesn't guarantee exact fill prices in volatile markets (gaps, slippage) — see Slippage costs.

OCO and automated TP/SL

OCO is a manual order you place per position on the exchange. For automated strategies, fastbot handles TP/SL in a similar spirit: when the main order fills, the bot places linked take-profit and stop-loss — one side filling cancels the other (linked cancel), the same principle as OCO.

fastbot also supports multi-level take-profit and moving the stop-loss to breakeven once the first profit target is hit — things basic exchange OCO can't do.

Conclusion

OCO is a simple but powerful risk-management tool: after entering a position, pre-set your take-profit and stop-loss, then let the exchange execute. No screen-watching, no emotional interference.

The rule: always know your profit exit and loss exit before entering — OCO is just a way to execute that discipline automatically.


Next step

Want automated TP/SL that runs without watching the order book?

👉 Open fastbot — 7-day free trial, no credit card required.