What Matters: Canceling an order does not reverse executions already completed. A cancellation acknowledgement may arrive while another fill is being processed. Reconcile unique executions, terminal order state and current exposure before interpreting the remainder. DN’s synthetic race records 65 filled units against a 100-unit target; a stale 60-unit replacement could lift gross purchases to 125.
DN Evidence Block — checked 28 November 2026; author: Heath Muchena. DN reviewed the six official Bybit and Coinbase sources below, retained the original reconciliation example and reran an independent cancel-race calculation. No account, cancellation request, matching engine or latency test was performed. This is a 2027 education edition based on the stated review date.
Three records answer three different questions
The order record tells you what happened to an instruction. The fill ledger tells you what actually traded. The current position or asset balance tells you what you hold now. A cancellation label cannot substitute for all three.
Imagine an order to buy 1 BTC. Two executions buy 0.20 BTC and 0.15 BTC. The remaining 0.65 BTC is canceled. The instruction has ended, but 0.35 BTC traded. On a simple spot purchase, that creates acquired inventory before considering fees and other movements. On a derivatives account, how fills change exposure depends on the existing position, side and position mode.
A canceled sell order can leave exposure too. If it was intended to close 1 BTC of a long position and sold only 0.35 BTC, the unclosed portion remains. A failed entry and an incomplete exit require different interpretations even when their order statuses look similar.
For a held sports contract, the sports cancellation-settlement guide explains the separate question of how a cancelled fixture affects the payout and unrecovered entry cost.
How a partially filled order becomes canceled
A resting limit order can execute in pieces before its remainder is canceled. An Immediate-or-Cancel instruction can execute available quantity immediately and cancel what cannot fill at once. A Fill-or-Kill instruction is designed to execute the whole quantity immediately or execute none. Bybit documents these distinctions, including GTC orders that remain active until execution or cancellation. [4]
These instructions control execution behavior; they do not guarantee that a particular quantity will be available. FOK is not a promise of execution. Availability, supported combinations and product restrictions must be checked on the actual venue. Do not generalize one platform’s market-order implementation to every exchange.
| Observed state | What it may mean | Evidence to inspect |
|---|---|---|
| Canceled, executed quantity zero | No execution recorded for this instruction | Matching order ID, complete fill history and final status |
| Canceled, executed quantity positive | Some quantity traded; the remaining instruction ended | Individual fills, canceled remainder and current exposure |
| Cancel request accepted | The request reached the cancellation workflow | Final order state, including fills occurring during processing |
| Order fully filled while cancellation was attempted | Execution won the race | Final filled quantity and execution IDs |
| Order disappeared from open orders | It is no longer listed there, or the view is incomplete | History, fill ledger, account/product filters and timestamps |
DN Cancel-to-Exposure Worksheet
Copy this worksheet into an incident note. Use one account, product and order at a time. Mark unresolved fields unknown, rather than zero. This is an offline audit tool, not an exchange-connected calculator.
| Field | Record | Check |
|---|---|---|
| Identity | Venue, account/subaccount, market, symbol, side, order ID and client ID | Are all records for the same instruction? |
| Requested quantity | Quantity and unit; amendments if any | Base units, quote funds or contracts? |
| Executions | Unique execution IDs, times, quantities, prices and fee currencies | Complete pages; no duplicate fills? |
| Lifecycle | Final status, terminal time and unfilled quantity | Final cancellation or only an acknowledgement? |
| Other instructions | Replacement orders, bot retries and pending conditional orders | Can something else change exposure? |
| Current state | Current spot inventory or derivative position, mode and observation time | Does it reconcile with fills and other account events? |
| Target | Whether the intent was entry, reduction or a specific final holding | Is the original quantity still appropriate? |
DN decision rule: a replacement quantity is unresolved until the original order’s execution total, final state and current exposure have been reconciled. If records disagree, investigate the discrepancy before treating the canceled label as permission to retry.
Worked example: the duplicate-entry trap
Synthetic example: a simple base-quantity spot buy, with no amendments, other trades or transfers. The fees are excluded from the quantity illustration and must be reconciled separately.
| Event | Executed quantity | Price | Gross quote value |
|---|---|---|---|
| Fill A | 0.20 BTC | 100,000 USDT/BTC | 20,000 USDT |
| Fill B | 0.15 BTC | 99,900 USDT/BTC | 14,985 USDT |
| Cancel remainder | No additional fill assumed | Not applicable | Not applicable |
The original request was 1 BTC. Confirmed execution is 0.20 + 0.15 = 0.35 BTC. Gross quote spent is 34,985 USDT. The volume-weighted execution price is 34,985 ÷ 0.35 = approximately 99,957.14 USDT/BTC. Under these assumptions, 0.65 BTC of the instruction went unfilled.
If the trader now submits another 1 BTC buy and it fills fully, combined gross purchases become 1.35 BTC. That is 0.35 BTC above the original 1 BTC purchase target. Canceling the first order did not erase its 0.35 BTC of fills.
If the target is still a total gross purchase of 1 BTC, the arithmetic shortfall is 0.65 BTC. This is not an instruction to place that amount: first confirm that the original remainder is terminal, no replacement is already active, and the target still applies. Fees charged in BTC can make net credited inventory differ from gross filled quantity.
An incomplete exit needs its own reconciliation
For a simplified one-way linear derivative position, assume a 1 BTC long and a reducing sell that executes 0.35 BTC before its remainder is canceled. With no other position events, 0.65 BTC of the long remains. Canceling the unfilled exit does not close the remaining position.
Do not transplant that equation into hedge-mode accounts, inverse contracts or instruments sized in contracts without mapping their units and side semantics. A sell can reduce a long, open a short or affect a particular hedge-mode leg depending on the product and flags. Read the position record rather than inferring direction from the word sell.
If an exit was only partially completed, review protection orders against the actual remaining position. Do not assume a canceled parent instruction automatically leaves every linked stop or take-profit in the intended state. Check current product-specific behavior. DN’s reduce-only audit covers a separate problem: exits rejected by position and order constraints.
The cancel-versus-fill race is real
A request can reach a venue while the order is being matched. Bybit’s private order-stream documentation explicitly describes a case where an attempted cancellation coincides with execution and produces two Filled status messages with different rejection details. [5] Two lifecycle notifications are not proof of two executions.
Reconcile actual execution identifiers before adding quantities. Keep the exchange’s documented identity scope and pagination rules. Bybit’s execution API notes that one order may have multiple executions and provides query filters. [2] A dashboard row and an API event may describe the same fill.
Historical queries can lag: Bybit’s order-history documentation says creation and cancellation are asynchronous and historical data may be delayed. [6] A temporary mismatch is a reason to reconcile current and historical records, not to manufacture a zero fill total. If your bot has missed private events, repair that gap using the venue’s supported queries before it resumes replacement logic.
A new synthetic race: 65 filled is not 40 filled
Use a separate fictional instruction to buy 100 base units. At the moment cancellation is requested, execution A has filled 40. A later execution B fills another 25 before the final state is resolved. The event stream then delivers B again with the same execution identifier and quantity. The duplicate message is not another trade.
| Event | Message quantity | Unique cumulative fills |
|---|---|---|
| Execution A before cancel request | 40 | 40 |
| Execution B during processing | 25 | 65 |
| Repeated execution B notification | 25 repeated | 65 |
| Arithmetic remainder of original request | 100 − 65 | 35 unfilled |
A process using the earlier 40-unit observation might calculate a 60-unit shortfall. If it submits that replacement and all 60 units fill, gross purchases become 65 + 60 = 125, or 25 above the original target. Summing every message instead produces 90 and makes the opposite reconciliation error. Both failures disappear only when event identity and freshness are preserved together.
Try the cancel-race ledger
The original calculator removes identical repeated execution IDs and rejects conflicting quantities under one ID. It reports the arithmetic shortfall separately from the hypothetical replacement outcome. Terminal confirmation is deliberately unchecked by default. A known quantity does not establish that an unresolved order can no longer produce another fill.
This is not a universal identifier rule for every venue. The real integration must preserve the exchange’s documented account, product and execution-identity scope. A CSV row labelled B is only an authored stand-in for that record. The exercise assumes an unchanged base-quantity instruction and excludes amendments, transfers and fee-in-base adjustments.
DN reran seven checks covering unique quantity 65, duplicate quantity 25, remainder 35, combined purchases 125, an empty execution set and inconsistent records. The existing BTC example above is a different scenario with its own quantities. Neither result is a current account instruction or proof that a cancellation has completed.
Use arithmetic only where the units match
For an unchanged base-quantity instruction, executed quantity is the sum of unique fill quantities. The unfilled amount is requested quantity minus confirmed executed quantity, provided there have been no amendments or other quantity adjustments. Compare that result with the venue’s documented final fields.
For simple spot fills quoted in the same currency, gross quote value is the sum of quantity × price. The weighted average price is total quote value divided by total executed base quantity. Keep fees in their original currencies. Do not subtract a USDT fee directly from BTC quantity, or treat an inverse contract’s face value as base-asset inventory.
Order-level execution is not necessarily current account exposure. Other trades, transfers, settlement, liquidation, funding and existing holdings can affect the account state. Reconcile them in their appropriate ledgers. DN’s balance reconciliation guide helps separate those movements.
Build the control into your trading workflow
Record the intended final exposure, not just the last order size. Require confirmed terminal state and reconciled fills before a retry workflow calculates what remains. Log manual actions and bot actions together. If a request timed out, use the order-timeout guide to resolve whether it existed before creating another.
For venue requirements and execution trade-offs, explore DN Pathfinder. No signup is required to use this worksheet. Named platforms are documentation examples, not a recommendation to trade or change venues.
Methodology and limits
DN reviewed six official documentation pages on 28 November 2026, separated order lifecycle from executions and exposure, and reran the original arithmetic checks. No live account or matching-engine tests were conducted. The worksheet does not calculate trading P&L, liquidation prices, tax treatment or a safe position size. Status names and API retention rules vary. Send corrections with a public source through DN’s contact page; never include credentials.
Download the dated source and scenario record (JSON) · Download the reproducible calculation pack (ZIP).
After reconciling fills, evaluate the original order
A correct cancel-race ledger establishes how much actually traded and how much remains. It also supplies the quantities needed for a different question: did execution serve the original order objective? An attractive average fill price can describe only a small fraction of the quantity the investor intended to buy.
Keep the parent target, decision-time reference and evaluation horizon with the reconciled fill record. That makes it possible to separate the cost of executed units from the reference opportunity cost of the unfilled remainder. The latter is a benchmark valuation, not a realised fee or proof that a fill was available at the later price.
Our implementation shortfall experiment for unfinished orders compares two authored execution records under the same target. It also explains why the mandate matters: an instruction to complete an order by a deadline differs from permission to buy only below a stated price. Resolve the quantity ledger first, then evaluate its outcome against the instruction that actually existed.
Frequently asked questions
Can a canceled order have executions?
Yes. Earlier partial fills remain trades even when the remaining instruction is canceled.
Does an accepted cancel request prove cancellation?
Not for asynchronous workflows such as the documented Bybit endpoint. Confirm final state and reconcile fills.
Do two Filled messages prove two trades?
No. Lifecycle notifications and unique executions are different records.
Should I replace the original quantity?
Do not infer that from a label. Reconcile fills, current exposure, pending instructions and the intended target first.
Does Fill-or-Kill guarantee a trade?
No. Its intended behaviour is a full immediate execution or no execution; it may produce no fill.
Primary sources and evidence
- Bybit Cancel Order. Asynchronous cancellation acknowledgement and final-state confirmation. Checked 2026-11-28.
- Bybit execution history. Individual executions and multiple fills per order. Checked 2026-11-28.
- Coinbase Exchange WebSocket channels. Order lifecycle versus trade-match messages. Checked 2026-11-28.
- Bybit order types and time in force. GTC, IOC and FOK distinctions. Checked 2026-11-28.
- Bybit private order stream. Cancel/fill race and duplicate Filled lifecycle notifications. Checked 2026-11-28.
- Bybit order history. Asynchronous history and possible delayed records. Checked 2026-11-28.
Editorial disclosure: This research explains documented capabilities and original worked examples. Inclusion does not imply endorsement, a commercial relationship or verified trading performance. No placement in this article was purchased.
Corrections and updates: Send source-backed corrections to press@decentralised.news. This 2027 edition was checked on 28 November 2026; documentation, permissions and product availability can change.