OCO orders by exchange
An OCO (one cancels the other) is two exit orders placed together: a stop below the market and a target above it, or the reverse for a short. When one fills, the exchange cancels the other. It is how you protect a position you already hold. In Autoview you ask for it with oco=1 on the alert.
An OCO is not a bracket. A bracket attaches a stop and a target to a new entry. An OCO has no entry; it only exits. And only a few venues get one. This page lists where Autoview builds the pair, what each venue needs on the line, and what happens everywhere else. It comes from the Autoview integrations code that runs on our servers today, read venue by venue.
Exchanges where oco=1 places a pair
- Alpaca
- Binance (spot and margin)
- OKX
- Tradovate
Two more read oco= but are not ready to rely on. Binance.US and Crypto.com are covered under the venue rules below.
What each venue needs on the line
- Alpaca: add
oco=1with a stop and a target. Alpaca wants both legs as exits on the same side, and the type must be limit, so leave outt=market. The Alpaca bracket orders guide walks through it. - Binance (spot and margin): the limit leg sits at
p=and the stop leg triggers atpx=(or a fixedfpx=). Without a trigger price Autoview stops with an error, and a non-market OCO also needssl=ortp=for the stop leg's limit price. On margin the pair goes to Binance's margin OCO; otherwise it goes to spot. The Binance command reference has a worked line and the price rules. - OKX: the line needs
sl=,tp=andpx=, or Autoview stops with an error. The stop leg triggers atsl=and fills atpx=; the take-profit leg triggers attp=and fills at the order price. A trailing stop cannot ride on the same order. - Tradovate: the line needs
px=(the stop trigger) andtp=(the target), plussl=unless the order ist=market. Theb=is the side of the position you are protecting, so a long places two sell exits. The Tradovate command reference shows a line confirmed on Simulation. - Binance.US: a line with
oco=1and no&leg places nothing. No order goes out, no error is written, and ad=1test shows no order. Lines with&legs do not send the legs you wrote either. Until this is fixed, place the stop and the target as two separate orders. - Crypto.com: Autoview sends the legs as an order list marked OCO, and Crypto.com rejects it. The Crypto.com command reference explains why. Send the stop and the target as separate alerts.
Bitfinex: no oco=, but an OCO exit anyway
Bitfinex does not read oco=. It has no attached stop and target, so when a t=market entry carries both tp= and sl=, Autoview places the entry and then one exit order flagged OCO on Bitfinex: a limit at the target with the stop attached. You get the pair without writing oco=1. A resting entry with a stop and target is refused with an error, because the exit would be live before the position exists.
Exchanges that do not read oco=
- Binance Futures and Binance Delivery
- Bitget, Bitget Mix and Bitget Mix Copy
- Bybit and Bybit Copy
- Capital.com (it has no linked-order endpoint)
- Charles Schwab (the OCO line in the code is switched off)
- Coinbase Advanced
- Deribit
- Gate.io and Gate.io Futures
- Gemini
- HTX
- HyperLiquid
- Kraken and Kraken Futures
- Kucoin, Kucoin Futures and Kucoin Futures Copy
- OANDA
- TradeStation
This is the part to watch. On these venues oco=1 does not stop the alert and does not write an error. Autoview ignores it and places the rest of the command as written, so you get whatever the other parameters ask for, not a linked pair. If you need a stop and a target on one of these venues, attach them to the entry, or send them as two orders and close the leftover one when the other fills. The stop loss, take profit and trailing stop guide covers the syntax for both.
Test it once before you rely on it
Add d=1 to the alert first. Autoview writes what it would send to your log and places nothing, so you can see whether the order is a linked pair. Binance.US is the exception: a plain oco=1 line shows nothing under d=1, because nothing would be sent. When the log looks right, take d=1 off. The log guide shows where to look. The sibling pages cover the same question for trailing stops and reduce-only orders.