Cross-exchange hedging: how to avoid getting filled on only one side
Each exchange matches its own order, so one side filling first is normal; what you can do is handle the two orders as one combo, so the other side follows with the same amount as soon as one side fills.
When you hedge across two exchanges, each exchange matches its own order on its own timing, so one side filling first is normal. What you can do is close the one-sided part quickly: handle the two orders as one combo, so that whatever fills first, the other side follows with the same amount. That is how ZML Trade places orders, and the two sides can be on different exchanges and accounts.
Why only one side fills
The two exchanges take, match and fill orders independently of each other, and a post-only order waits for someone to trade against it; if the price moves away, it stays unfilled.
While one side has filled and the other has not, the position carries directional exposure, and the extra part is the leg gap. If the price moves the wrong way, that part has nothing on the other side hedging it.
How ZML Trade places the orders
Two orders as one combo: the two sides can be on different exchanges and accounts, one order each, and the two open and close as one combo with the same target quantity.
The lagging side catches up: whatever fills first, the other side is brought up to the same amount. A market side catches up with a market order; a post-only side waits for its own order to fill, and the side that is ahead stops adding until then.
Post-only, catch up at market: a post-only side can be set to “Post-only, catch up at market”: when it falls behind, it catches up at market so the two sides match sooner.
Builds in slices: orders are split by your “Maximum order size”, so large positions build to target in several orders with less price impact.
Cancels when the spread no longer fits: post-only prices follow the market in real time, and orders are canceled once the spread no longer meets your condition.
Live leg gap: the leg gap is shown on the combo, so you can see it until it closes.
When one side is on-chain spot swapped through OKX Wallet, the on-chain side fills first and the other side then follows at market with the amount it filled.
Choosing the order type for each side
| Execution mode | How the sides work together | Trade-off |
|---|---|---|
| Both legs at market | Both sides send market orders at the same time; any unfilled part is caught up automatically | Fills fast; both sides pay the taker fee and slippage |
| One leg post-only | The post-only side posts first, and the other side follows at market with the amount it fills | The post-only side pays the maker fee, the other side the taker fee |
| Both legs post-only | Both sides post at the same time; once one fills, the other catches up | Maker fees, but an order may not fill, so a leg gap can last longer |
To close a leg gap fast, choose both legs at market, or set the post-only side to “Post-only, catch up at market” (the catch-up part pays the taker fee); to save on fees, choose one leg post-only or both legs post-only and accept that a leg gap can last longer. Order types explains each one.
After the fill
Trade compares combo positions with each exchange account’s actual positions and alerts you when a position difference exceeds the amount you set; see Reconciliation. With liquidation guard on, once either side’s liquidation distance reaches your liquidation guard line, the position is reduced at market in batches; if the two sides are uneven, the larger one is reduced first so the leg gap never grows.
Before you open, compare spreads and funding rates for the two markets in the market monitor Z Market Lab; the Bitcoin funding rateOpen in new tab page, for example, lists every exchange’s current BTC funding rate and its history. What are the risks of arbitrage covers the other risks.