A cancel request is not a clean slate

You send a cancel request and mentally clear the book. The response may still contain orders that could not be canceled because they already matched or changed state.

Cancellation is a reconciliation step, not a promise that every order disappeared at the same instant.

Read both result sets

Keep the canceled order IDs and the not-canceled IDs with their reasons. An order that matched while the request was in flight is now a trade review, not a cancellation retry.

Do not turn a successful response into a zero-exposure assumption until the remaining IDs have been checked.

Match the scope to the risk

A single-order cancel, a batch cancel, an outcome-scoped cancel, a market-scoped cancel, and an account-wide cancel remove different sets of liquidity. Write the scope beside the request.

A market-wide action can affect several outcomes, while an asset-scoped action may leave the other side resting. The filter is part of the safety plan.

Recheck orders and trades

After cancellation, fetch the relevant open orders and reconcile any associated trades. A partially matched order leaves a position and only its unfilled remainder can be removed.

Save the request time, response, final order status, and updated position balance. This prevents a late match from being hidden by a clean-looking cancel log.

Define the retry rule

If an order is not canceled, use the returned reason to decide whether a retry is meaningful. Repeating the same request without checking state can create a loop while the exposure changes underneath it.

The useful question is not whether the cancel endpoint returned successfully. It is which liquidity disappeared, which order matched, and what exposure remained after reconciliation.

Further reading: Manage orders · Order lifecycle · Real-time order updates.

Explore the markets: Open Polymarket (referral link).

A note on risk

Prices can change and positions can lose their full value. Examples are educational, not promises of returns.