The spread is there, the signal fires, and your software sends two orders at once: buy EUR/USD at the slow broker, sell it at the fast one. The buy fills at 1.08512. The sell comes back rejected. For the next few hundred milliseconds you are not running an arbitrage at all – you are holding a plain, unhedged long position that you never intended to open. That gap between “one leg done” and “the trade is actually hedged” is called legging risk, and in every multi-leg arbitrage strategy it is the quiet cost that decides whether a good-looking edge survives contact with real execution.
This guide explains what legging risk is, where it shows up (two-broker hedge arbitrage, triangular arbitrage, crypto cross-exchange and basis trades), why legs fail, how to put a number on it, and – the part most traders improvise – exactly what to do in the seconds after only one leg fills.
What legging risk is (and what it is not)
An arbitrage with two or more legs is only risk-free when tudo legs are on. Each leg is a separate order, usually at a separate venue, so they never fill at exactly the same instant. Legging risk is the exposure you carry between the first fill and the last one – plus the case where the last one never fills at all.
It is worth separating from two neighbours it is often confused with:
- Deslizamento is getting a worse price than you asked for on a leg that does fill. It shrinks the profit. (We cover it in detail in our guide to beating slippage.)
- Legging risk is a leg that fills late, partially, or not at all, leaving the other leg naked. It does not just shrink the profit – it can turn a 0.5-pip edge into a 10-pip loss.
- Market risk in one-leg strategies is different again. A one-leg latency trade is deliberately a single directional position; it has no second leg to fail. If you are deciding between the two models, see arbitragem de latência de um versus dois pés.
Where legging risk shows up
Every strategy with more than one order has it. What changes is how many legs there are, how far apart the venues are, and how fast the price can run away from you.
| Estratégia | Pernas | Typical failure | How bad it gets |
|---|---|---|---|
| Two-broker hedge arbitrage (forex) | 2, different brokers | Requote or reject on the slow broker, last-look delay | High around news: the price that created the gap is moving |
| Arbitragem triangular | 3, often one venue | Third leg priced away after the first two fill | Usually small per trade, but frequent – the edge is tiny |
| Criptomoeda entre exchanges | 2, different exchanges | Rate limit, API timeout, thin book, insufficient balance | High: 24/7 volatility, and an exchange outage can last minutes |
| Spot vs perp / dated futures basis | 2, spot and derivatives | Partial fill on the spot side, margin check on the futures side | Moderate: positions are larger and held longer, so a gap of seconds matters less than size |
| Statistical arbitrage pairs | 2, often one broker | One leg fills, the other hits a spread widening | Low to moderate: the edge is measured over days, not milliseconds |
The rule of thumb: the shorter the strategy’s holding time, the more legging risk dominates its results. A two-broker forex trade targeting under a pip lives or dies on how cleanly both legs fill. A basis trade held for 60 days barely notices a two-second delay between legs – but it does notice a half-filled spot order. (For the strategy mechanics themselves, see hedge arbitrage explained and our triangular arbitrage guide.)
Why legs fail
When you look through the logs of a strategy that legs too often, the causes repeat. Roughly in order of how often we see them:
- Requote or reject. The venue will not fill at your price because it has already moved – which, in arbitrage, is exactly when you are trading. Brokers that hold orders for a “last look” make this worse.
- Partial fill. You wanted 2.00 lots or 1 BTC; the book had half of that at your price. Now one leg is twice the size of the other.
- Limit price no longer reachable. A limit or IOC order on the second leg is correct risk control, but it means the leg simply does not fill if the price ran.
- Technical failure. API timeout, dropped connection, rate-limit error, a session that silently logged out. In crypto this is the most common cause of long legging windows.
- Account constraints. Not enough free margin or balance on one side, a minimum notional or minimum lot you did not check, trading disabled on the instrument.
- Deliberate execution changes. If a broker has profiled the account as arbitrage, it may add delays or reject more often on that account only. A rising reject rate on one venue is often the first sign, and one of the signals brokers use when they profile toxic flow.
Putting a number on legging risk
Legging risk feels random, but it has an expected cost you can estimate from your own logs. The simple version:
Expected legging cost per trade = leg-failure rate x average loss on a legged trade
An illustrative example for a two-broker EUR/USD strategy trading 1 lot (about $10 per pip):
- Average net profit when both legs fill: 0.5 pip = $5.00
- Share of trades where the second leg fails first time: 4%
- Average loss on those trades after retry or unwind: 6 pips = $60 (the price usually moved against you – that is why the leg failed)
Expected legging cost = 0.04 x $60 = $2.40 per trade. The real expectancy is 0.96 x $5.00 – $2.40 = $2.40, less than half of what the clean fills suggest. Double the failure rate to 8% and the expectancy is roughly zero. This is why two strategies with the same average gap can produce completely different monthly results.
Two other figures belong in your monitoring alongside the failure rate: the time to complete (median and worst case between first and last fill) and the maximum naked exposure you held at any moment during the month. A strategy that legs rarely but once sat unhedged for four minutes during an exchange outage has a risk its average numbers hide.
What to do when only one leg fills
There are only three real responses, and the worst outcome is choosing between them by hand while the price moves. Decide the rules in advance and let the software apply them.
1. Complete: retry the missing leg within a tolerance
Re-send the failed leg at the current price, but only if that price still leaves the combined trade within a set tolerance – for example “no worse than break-even” or “no more than 1 pip of loss”. Cap the number of retries and the time allowed. Chasing a leg without a limit is how a small miss becomes a large one.
2. Unwind: close the leg that did fill
If the second leg cannot be completed inside the tolerance or the time budget, close the first leg and take the small loss. It feels wrong to pay a spread to get out of a trade you just entered, but a known 1-2 pip loss is better than an open-ended directional position you did not plan.
3. Hedge elsewhere: use a proxy venue
If you run several venues, the missing leg can sometimes be placed at a third broker or exchange that quotes the same instrument. This keeps the trade alive, but it adds a new position to manage later. Use it only when the proxy is reliable and the size is small relative to its book.
How long is “the time budget”? It depends on the strategy’s own speed. For a forex two-broker trade, a few hundred milliseconds to one or two seconds is typical; after that the gap you were trading is gone and you are simply speculating. For a crypto basis or funding trade held for weeks, a budget of tens of seconds is reasonable, but the size check matters more than the clock.
How to reduce legging risk before it happens
- Send the harder leg first. If one venue rejects or partially fills more often, send that order first and only fire the easy leg once it is filled. You give up a little speed, but a failure now costs nothing because nothing is open yet. Firing both at once is faster, but it is only the right choice when both sides fill reliably.
- Size to the thinner side. Check the visible depth on both books and trade the smaller of the two, with a margin. Half of all partial fills are simply orders that were larger than the book.
- Use IOC or FOK orders with a limit. A market order on the second leg removes the reject but swaps it for unlimited slippage. A limit with immediate-or-cancel gives you a clean “filled / not filled” answer you can act on.
- Pre-check the boring things. Free margin and balance on both sides, minimum lot or minimum notional, trading hours, rate-limit headroom. In crypto, keep a reserve of the API request budget for cancels and retries – see conexão com APIs de exchanges de criptomoedas para arbitragem.
- Pre-fund both venues. A cross-exchange trade that waits for a transfer is not an arbitrage. Balances must already be on both sides.
- Track rejects per venue. If one broker’s reject rate doubles over a week, reduce size there or stop – it is usually a change on their side, not bad luck.
- Have a kill switch. If a venue disconnects, stop opening new trades on every venue that pairs with it until it is back and its positions are reconciled.
What your software should handle for you
Legging decisions happen too fast for manual control, so they belong in the execution software. Whatever tool you use, check that it can do the following – and test each point on a demo account by deliberately forcing a failed leg:
- Track every multi-leg trade as one unit with a state (pending, partly filled, hedged, unwinding, closed), not as unrelated orders.
- Retry the missing leg automatically within a price tolerance and a maximum number of attempts.
- Unwind the filled leg automatically when the tolerance or time budget is exceeded.
- Adjust the second leg’s size to match a partial fill on the first.
- Enforce a cap on total unhedged exposure across all trades.
- Log the time between legs and the outcome of every legged trade, so you can calculate the cost shown above.
- Alert you when a venue’s reject rate or legging time jumps.
If a tool cannot show you how often its trades legged last month and what that cost, you are judging the strategy on its clean fills only.
The takeaway
Legging risk is the price of trading across more than one order. You cannot remove it, but you can measure it, set rules for it and keep it small: send the harder leg first, size to the thinner book, use limit IOC orders, retry inside a tolerance, and unwind without hesitation when the tolerance is gone. Most of the difference between an arbitrage strategy that works on paper and one that works in a live account comes from these few rules.
PERGUNTAS FREQUENTES
What is legging risk in arbitrage?
It is the risk that one leg of a multi-leg arbitrage fills while another fills late, only partly, or not at all. Until every leg is on, you hold an unhedged directional position, so the trade is exposed to normal market moves.
Is legging risk the same as slippage?
No. Slippage is a worse price on a leg that does fill, which reduces profit. Legging risk is a leg that does not fill in time, which leaves the other leg naked and can create a loss many times larger than the expected profit.
Which leg should I send first?
If both venues fill reliably, sending both at once is fastest. If one venue rejects or partially fills more often, send that leg first and fire the second only after it fills – a failure on the first leg then costs nothing.
How long should I wait before unwinding a single filled leg?
As long as the original price gap could still exist. For fast forex two-broker trades that is usually a few hundred milliseconds to a couple of seconds; for crypto basis or funding trades held for weeks it can be longer. Set the limit in advance and let the software enforce it.
Does one-leg latency arbitrage have legging risk?
Not in this sense – it has only one order, so there is no second leg to fail. It carries a different risk instead: the single position is directional and depends on the price moving the way the faster feed predicted.
Can legging risk be eliminated completely?
Only where a venue executes all legs as one atomic order, which is rare in retail forex and crypto arbitrage across venues. Elsewhere you can reduce it – order sequencing, sizing, limit IOC orders, pre-checks and automatic retry/unwind rules – but not remove it.