The order says 20 units. The fills say 12. The account has neither zero exposure nor the full intended position.
Manage a crypto partial fill by tracking executed quantity, fees and the still-active remainder separately. Protect or reduce the exposure that actually exists, and retain the original order's identity until its remaining quantity has a confirmed outcome. A canceled order can still contain valid earlier fills; a partial-fill label does not tell you whether further execution remains possible.
This article was prepared with AI assistance. The inventory below is an original hypothetical spot-account exercise, not a customer incident or a claim that KLINEO automatically manages every order lifecycle described.
There are three quantities, not one
A requested quantity describes the instruction. A gross filled quantity describes executions. A net acquired quantity describes the asset credited after any fee paid in that asset. A fourth number, the live remaining quantity, describes what the existing instruction may still do.
Binance Spot's execution reports distinguish last executed quantity from cumulative executed quantity and include commission amount, commission asset and trade identifiers. Those fields support an explanation of what happened; they should not be flattened into a single order-size number. Binance Spot: user data stream.
For a buy order, exposure starts with the first valid fill. Waiting for the requested quantity to complete does not make the already acquired portion hypothetical. Conversely, an accepted remainder is not already-owned inventory.
The distinction is particularly useful when sizing a later exit. An exit based on requested quantity can exceed what exists. An exit based on a stale cumulative fill can leave newer exposure unmanaged. Use a fresh authoritative state, with product-specific handling for spot inventory versus derivative positions.
Follow one order through three fills
Assume an isolated spot example in a fictional ABC/USDT market. The account starts with no ABC and has no manual trades, transfers, borrowings or other bots. The operator submits a buy for 20 ABC with a limit of 50 USDT/ABC.
Assume, solely for this worksheet, a fee of 0.10% of acquired ABC charged in ABC on every fill. The fee asset and rate are invented; real account reports take priority. All numbers below are constructed.
| Execution | Filled ABC | Price, USDT/ABC | Gross quote cost | Fee in ABC |
|---|---|---|---|---|
| A | 5 | 49.90 | 249.50 USDT | 0.005 |
| B | 7 | 50.00 | 350.00 USDT | 0.007 |
| C, later | 2 | 50.00 | 100.00 USDT | 0.002 |
After A and B, gross fills total 12 ABC. The order has spent 599.50 USDT. Its gross weighted average price is 599.50 ÷ 12 = 49.958333... USDT/ABC. The account has received 12 − 0.012 = 11.988 ABC net.
If the original 20-unit instruction remains active, it still has eight ABC unfilled. An operator who describes the account as a 20-ABC position overstates current inventory. One who authorizes another 20-ABC purchase because the first is incomplete can create far more exposure than the original intention.
Now suppose the operator requests cancellation and execution C occurs before cancellation completes. Final gross fills become 14 ABC for 699.50 USDT. Net inventory is 14 − 0.014 = 13.986 ABC. The remaining six ABC are confirmed canceled.
The final gross average is 699.50 ÷ 14 = 49.964285... USDT/ABC. Cancellation stopped the remaining instruction; it did not reverse the three completed purchases. Our market and limit order guide explains why a price-valid order can remain only partly executed.
Build a ledger that cannot count an update as another trade
A cumulative number is a running total. It is not an additional fill. If two observations report cumulative quantities of 12 and 14, the final total is 14, not 26.
Likewise, two messages carrying the same execution identity do not establish two executions. A consumer may receive a duplicate, recover history after reconnecting or see one trade reflected in both an order update and an execution stream. These are observations to reconcile, not quantities to sum indiscriminately.
Bybit's execution stream provides execution identifiers, quantities, prices and fee fields. Its order stream separately provides cumulative execution and remaining quantities. Use the appropriate record type, within its documented product scope, when maintaining the ledger. Bybit API: execution stream, Bybit API: order stream.
A practical accounting rule is to retain distinct exchange execution IDs within the exact account, environment and market. Sum those distinct fills, and compare them with the authoritative cumulative order state. If they disagree, flag the incomplete record rather than inventing a balancing fill.
Do not overwrite a larger confirmed fill quantity with an older message merely because it arrives later. Event delivery order and execution order can differ. Preserve timestamps and state provenance so that a reconnect does not silently move an order backward in its lifecycle.
Protection follows actual exposure and its product rules
In the constructed example, the final available spot inventory is 13.986 ABC. If a hypothetical venue allows exit quantities only in 0.01 ABC steps, rounding down produces 13.98 ABC and leaves 0.006 ABC. Rounding up to 13.99 would exceed this example's available inventory.
This step-size assumption is invented for the worksheet, not a statement about an actual ABC pair. A real system needs the instrument's rules and account balance restrictions. The small leftover amount also needs a record; hiding it behind a rounded display does not remove it.
Protection can become stale while the entry continues filling. At the earlier 11.988 ABC net state, an exit sized to 11.98 already leaves 0.008 ABC uncovered. After the later net addition of 1.998 ABC, the total amount outside that exit is 2.006 ABC (13.986 − 11.98). That is a reason to monitor the relationship between entry and protection, not to assume every venue permits the same amendment process.
For derivatives, inspect the actual position side and the venue's reduction semantics. The reduce-only order guide explains why a closing intention and an ordinary opposite-side order are different. Spot balance arithmetic cannot be copied unchanged into a leveraged contract.
Also distinguish a stop trigger from a completed exit. The stop-market versus stop-limit comparison shows how a triggered protective instruction can leave some or all exposure open. Neither order type guarantees a maximum loss.
Decide the remainder's fate without losing its identity
A partial fill creates a decision about the unfilled portion. It may remain valid, or the original conditions may have expired. Record that decision separately from the historical fills so that canceling the remainder does not erase what already traded.
If leaving it active, retain a review time and the maximum additional quantity it can still acquire. If canceling, keep the order unresolved until the cancellation result and final cumulative fills are known. If replacing it, establish the first order's state before allocating the same budget to another instruction.
Time in force changes this obligation. An immediate-or-cancel remainder should not be handled like an ordinary working good-till-canceled remainder. A fill-or-kill request has another acceptance condition. Read the time-in-force guide for those distinctions rather than inferring them from a generic partial status.
A cancel request that times out is an uncertainty about an operation. The existing order-timeout recovery article covers that investigation. This article's worksheet assumes fills are known; it does not turn a missing response into proof that a remainder stopped.
A shared account needs ownership records
A balance can show how much of an asset exists, but it cannot say which strategy acquired it. Suppose a manual trader adds four ABC while the bot's order is being reconciled. The account balance and the bot's original intention no longer have a one-to-one relationship.
Keep a strategy ledger linked to real executions, and compare it with account-wide records. Deposits, withdrawals, transfers, fee deductions, borrowing and other order sources can all change the balance without belonging to the order under review.
The right action is not automatically to trade the difference until the account matches a local number. First establish why the difference exists and who owns the decision to change it. Competing processes that both attempt to correct inventory can amplify a discrepancy.
This is one reason an emergency stop needs a defined scope. The trading-bot kill-switch guide separates stopping new work from canceling entries, preserving protection and verifying the final account state. A paused label does not establish a flat account.
Close the record with a known remainder and known exposure
A complete partial-fill record includes the original quantity, each distinct execution, gross filled quantity, total quote notional, fee assets, net inventory or derivative position, and the final remaining-order state. It also identifies any relevant protective orders and unresolved observations.
After the example's confirmed cancellation, the correct summary is: requested 20 ABC, gross acquired 14, net credited 13.986 under the assumed fee, and six canceled. It is neither a failed zero-position trade nor a filled 20-unit trade.
For a remaining quantity too small to trade under applicable rules, record the residual and the reason. For missing trade history, keep the uncertainty visible. For a mismatched protection quantity, investigate the product's supported management path without assuming that replacing an order is instantaneous or risk-free.
The operational objective is an explained state that another person can verify. A fill percentage alone cannot provide that explanation. Neither can a final order status without quantities and fees. All follow-up actions remain subject to account permissions, liquidity and the wider trading risks.
