Order stateIntermediate

Partial Fills

A partial fill occurs when only part of an order's quantity is executed and the remainder either continues to rest, is cancelled, or must be actively managed, leaving the order in an intermediate filled-but-incomplete state.

Quick answer: A partial fill occurs when only part of an order's quantity is executed and the remainder either continues to rest, is cancelled, or must be actively managed, leaving the order in an intermediate filled-but-incomplete state.

In simple words

A partial fill is when you ask to trade 10 lots but only 4 go through and 6 are still pending. This happens whenever the opposite side of the book does not have enough quantity at your price. The tricky part is not the fill itself but the bookkeeping: your system must know it now holds 4 lots, still has 6 working, and must decide what to do with that leftover before it double-counts or over-trades.

Purpose

Handling partial fills correctly is what separates a toy script from a robust execution engine — it forces explicit order-state tracking so that position, risk and remaining quantity always reconcile with reality.

Visual explanation

Partial Fills

An order transitioning through partially-filled states, with residual quantity resting or being cancelled.

Order LifecycleCreatedValidatedSentAcknowledgedPartiallyFilledFilledRejectedCancelledrejectcancel

Professional explanation

Why partial fills happen

A partial fill arises whenever the liquidity available at your acceptable price is smaller than your order. A large limit order may fill against the depth at its level and rest for the balance; a marketable order set with an IOC validity fills what it can immediately and cancels the rest; a big market order sweeps several levels and, if it exhausts the book within a price band, may fill partially and stop. In F&O, iceberg-style or simply large institutional orders routinely fill in pieces over many trades. Partial fills are the normal case for any order that is large relative to instantaneous depth.

The order lifecycle and its states

An order is not binary. It moves through states: submitted, acknowledged, open (working), partially filled, filled, cancelled, or rejected. A partially filled order is simultaneously 'filled for X' and 'open for the remainder'. A correct execution engine models this explicitly, tracking filled quantity, average fill price, remaining quantity and last update time for every live order. Systems that treat an order as either done or not done break the moment a partial fill arrives, because their notion of position diverges from the exchange's.

Reconciliation and idempotency

Partial fills usually arrive as a stream of trade or execution messages, each reporting an incremental quantity, over a broker WebSocket or postback. The engine must apply these idempotently — processing the same execution report twice must not double-count the position — and must reconcile its internal position against the broker's reported position periodically. Fills can also arrive out of order or be missed during a disconnect, so a robust system reconciles on reconnect by fetching the authoritative order and position state rather than trusting only the event stream.

Deciding what to do with the residual

The unfilled remainder demands a decision that belongs to strategy and execution logic, not chance. Options include: leave it resting (patient, risks non-completion), re-price it more aggressively (chase, risks impact), cancel it (accept a smaller position), or convert to a market order (guarantee completion, pay slippage). The right choice depends on urgency and why you were trading. A hedge that must be complete cannot be left half-on; a patient accumulation can wait. Encoding this decision explicitly is a core execution-engine responsibility.

Risk and sizing implications

Partial fills interact directly with risk control. If your position sizing assumed a full 10-lot fill but only 4 filled, your actual risk, exposure and hedge ratio are all different from plan, and any stop or target sized to 10 lots is now mismatched. Worse, if you naively resend the 'unfilled' quantity without accounting for what already filled, you can end up over-positioned. Every downstream risk calculation must read from the true filled quantity, updated continuously, not from the order you intended.

Backtesting partial fills

Most simple backtests assume every order fills completely and instantly, which quietly overstates strategies that trade size in thin instruments. A more realistic simulation caps the fill at the available depth or a fraction of the bar's volume (a participation limit), producing partial fills and forcing the backtested strategy to handle residuals just as the live one must. Ignoring this is a form of optimism closely related to ignoring liquidity and impact: it credits the strategy with size it could never actually get filled.

Practical example

Illustrative example (Indian market)

Your system wants to buy 10 lots of a Bank Nifty option (lot 30, so 300 units) with a limit at a premium of 250. At that price only 120 units (4 lots) are resting, so you fill 4 lots at 250 and 6 lots (180 units) remain working. Your engine must now record: position +4 lots, average price 250, remaining order 6 lots open. Suppose you decide the entry is urgent and re-price the residual to 252 as a marketable limit; it fills the remaining 6 lots at an average 251.5. Your true blended entry is (4×250 + 6×251.5)/10 = 250.9, not the 250 you first saw. If instead you had cancelled the residual, your position is only 4 lots and any stop sized for 10 lots is now three-and-a-half times too large relative to the real position.

On NSE F&O, large orders are commonly split by the exchange into multiple trades reported individually, and brokers relay these as separate execution messages over their WebSocket or postback. An algo that assumes one order equals one trade message will mis-track positions on any sizeable F&O order, which is why production Indian algos reconcile against the broker's positions endpoint rather than counting messages.

Limitations

  • Leftover residual quantity leaves the intended position incomplete unless actively managed
  • Requires explicit, stateful order tracking that simple scripts usually lack
  • Execution messages can duplicate, arrive out of order, or be missed on a disconnect
  • A mismatch between intended and filled size breaks stops, targets and hedge ratios
  • Chasing the residual aggressively can cost extra slippage; leaving it risks non-completion

Why it matters in practice

  • Correct partial-fill handling is the dividing line between a robust execution engine and a fragile script
  • Position and risk reconciliation depends entirely on tracking true filled quantity, not intended quantity

Common mistakes

  • Treating an order as all-or-nothing, so a partial fill desynchronises the system's position from the exchange's
  • Resending the full quantity after a partial fill and ending up over-positioned
  • Double-counting a fill by processing the same execution report twice (no idempotency)
  • Sizing stops and targets to the intended quantity instead of the actual filled quantity
  • Trusting only the event stream and never reconciling against the broker's authoritative position after a disconnect
  • Backtesting with guaranteed full instant fills, hiding the residual-management problem entirely

Professional usage

Institutional execution systems are built around the reality that orders fill in pieces. A parent order is split into child orders, each of which may fill partially, and the order management system aggregates fills into a running position with an average price, reconciling continuously against the broker and exchange. Execution reports are applied idempotently and keyed by a unique execution id; on reconnect the system re-fetches authoritative state rather than replaying a possibly incomplete stream. The residual-handling policy — chase, rest, or cancel — is an explicit, configurable part of each execution algorithm, tuned to the order's urgency rather than left to accident.

Key takeaways

  • A partial fill executes only part of an order, leaving a residual that must be explicitly managed.
  • Orders are stateful — track filled quantity, average price and remaining quantity, not just done-or-not.
  • Apply execution reports idempotently and reconcile against the broker's authoritative position after any disconnect.
  • Size stops, targets and risk from the true filled quantity, never the intended quantity.

Frequently asked questions

What is a partial fill?
A partial fill is when only part of an order's quantity executes and the rest remains unfilled. The order enters a partially-filled state, holding a real position for the filled portion while the remainder continues to work, is cancelled, or must be actively managed.
Why do partial fills happen?
They happen when the liquidity available at your acceptable price is smaller than your order size. The order fills against whatever depth exists and then either rests for the balance, cancels the balance (if IOC), or stops after sweeping the book within its price band.
What is residual quantity?
Residual quantity is the unfilled remainder of a partially filled order. It represents the difference between what you intended to trade and what actually executed, and your system must decide whether to keep working it, re-price it, cancel it, or convert it to a market order.
Why is order state management important for partial fills?
Because a partially filled order is both filled and open at once, a system must track filled quantity, average price and remaining quantity precisely. Without that state, its idea of the position diverges from the exchange's, breaking risk controls and potentially causing over-trading.
How should I handle the residual after a partial fill?
It depends on urgency. You can leave it resting to complete patiently, re-price it more aggressively to chase, cancel it and accept a smaller position, or convert it to a market order to guarantee completion at the cost of slippage. Encode this as an explicit policy, not an afterthought.
What does idempotent processing mean for fills?
It means applying each execution report exactly once even if it is delivered more than once. Fill messages can be duplicated or replayed, so keying them by a unique execution id and ignoring repeats prevents double-counting the position.
How do partial fills affect my stop-loss and position size?
If you sized a stop for 10 lots but only 4 filled, the stop is now far too large relative to the real position. Every risk calculation must read the true filled quantity continuously, or your stops, targets and hedge ratios will be mismatched.
Can I just resend the unfilled quantity?
Only carefully. If you resend without accounting for what already filled, you can end up over-positioned. The correct approach is to work the residual of the original order or place a new order sized to exactly the remaining quantity, tracked against the true position.
How do I reconcile positions after a disconnect?
Do not trust the event stream alone, because fills can be missed while disconnected. On reconnect, fetch the broker's authoritative order and position state and reconcile your internal view against it before resuming trading.
Are partial fills more common in options?
Yes, particularly in less liquid strikes where depth at any price is thin, so a sizeable order fills in pieces. On NSE F&O even a single order is often reported as multiple trades, so partial-fill handling is essential for options algos.
How should partial fills be backtested?
Cap the fill at the available depth or a fraction of the bar's volume so orders can fill partially, then require the strategy to handle the residual as it would live. Assuming full instant fills overstates strategies that trade size in thin instruments.
What order types reduce partial-fill uncertainty?
An all-or-none (AON) or fill-or-kill (FOK) instruction, where supported, forces the order to fill completely or not at all. An IOC fills what it can immediately and cancels the rest. Each trades away one kind of uncertainty for another, so the choice depends on whether completeness or immediacy matters more.
Does a partial fill cost more in charges?
Statutory charges apply to the executed quantity, and multiple trades from one order may each attract exchange transaction charges, but the structure is the same as any fill. The subtler cost is operational: mishandling the residual can cause slippage or over-trading that dwarfs any charge difference.
Is a partial fill a sign something went wrong?
Not at all. For any order large relative to instantaneous depth, partial fills are the normal and expected outcome. What matters is not avoiding them but handling the resulting state correctly.

Voice search & related questions

Natural-language questions people ask about Partial Fills.

What is a partial fill?
It is when only part of your order trades and the rest stays pending. So you asked for ten lots but maybe only four went through.
Why did only part of my order fill?
Because there was not enough quantity at your price on the other side of the book. The order filled what it could and left the rest working.
What do I do with the leftover quantity?
You decide based on urgency: wait for it to fill, re-price it, cancel it, or turn it into a market order to finish now. The key is to decide deliberately, not by accident.
Why is a partial fill a problem for my system?
Because your program now holds a real position for the part that filled and still has an open order for the rest. If it does not track that carefully, its position count drifts from reality.
Do partial fills mess up my stop-loss?
They can. If you sized the stop for the full order but only part filled, the stop is now the wrong size. Always base risk on the quantity that actually filled.
Are partial fills normal?
Yes, completely normal for any order that is large compared to what is available at your price. Good systems expect and handle them.

Sources & references

    Last reviewed 11 July 2026. Educational content only — not investment advice. Markets and rules change; verify current conventions with SEBI, NSE/BSE and your broker.

    Educational content only — not investment advice. Examples use illustrative numbers and simplified models. Algorithmic trading and derivatives involve substantial risk. See our Risk Disclosure and SEBI Disclaimer.