A basket's orders execute one after another, in the sequence you set — not all at once. If one leg fails partway through, usually from a margin shortfall as the sequence progresses, the orders that already went through stay executed while the rest of the basket doesn't.
Why would a later order fail when earlier ones succeeded?
Each order in the basket draws on your available margin as it executes. If the margin required for a later leg turns out to be more than what's left after the earlier legs consumed theirs, that order — and anything still queued after it — won't go through, even though the ones before it already executed.
What can I do if this happens?
Check which orders in the basket actually executed, then modify and place the remaining ones individually — the basket doesn't automatically retry a failed leg.
Things to keep in mind
- Reordering the sequence (buy option orders first, for example) can reduce the chance of a mid-basket margin shortfall — see What is the required and the final margin in a basket order?
- A partial execution isn't a bug — it's the sequential design of basket orders combined with margin being checked at each individual order, the same as it would be if you placed them one by one.