Cancel All Orders Is Different from Clearing an Account
By DX Research Group · · Execution mechanics
After a broad cancellation, verify orders, positions and collateral separately. A worked account case defines a narrower, reviewable stopping condition.
A cancel-all instruction stops outstanding order intent within a specified scope. Closing existing positions is a separate decision. We would make the scope visible before the action and verify account state after the venue response. Hyperliquid documents individual cancellations and scheduled cancellation; those action forms provide order handling, while the runtime determines the authorized stopping condition.
Cancellation leaves a portfolio to inspect
Illustrative case: an account holds a 3-unit long and has a 2-unit entry bid plus a 3-unit protective exit order. Canceling both resting orders leaves the 3-unit long exposed and removes the protective instruction. A receipt saying zero open orders can be accurate while the owner remains at risk. If the owner intended stop adding risk, canceling the protective exit may also exceed the intended scope. The agent must resolve that distinction in the compiled instruction.
Define the stopping condition precisely
Represent whether the request covers entry orders, protective orders, every instrument, a single DEX or a particular subaccount. After cancellation, query open orders and position state for the actual account. Record residual position and protective coverage. An emergency operation may appropriately cancel everything, but its receipt should state the continuing inventory. Test a late fill, an existing position and an order on another scoped account. The expected outcome is an explicit account-state summary rather than inferring flatness from a successful cancel response.
Read the residual account
The operator report should answer whether exposure remains, whether new entries are disabled and whether protective coverage survives. These questions can have different answers after the same cancellation command. A stop operation should name its verified condition precisely, such as zero resting entry orders in the selected account, rather than assigning a broad safety label to a narrower observation.
Our execution and reconciliation framework provides the broader mandate-to-outcome trace. The state and memory contract explains how the verified result should enter the next decision. These notes narrow those published methods to one execution boundary; the worked amounts above are illustrative and the test is a proposed local fixture. The source inspected for the venue-specific statements is the official Hyperliquid exchange endpoint.
The stopping condition should also name who can resume entry placement. An old worker with a cached strategy should receive the changed authorization state before its next proposal. Current account reconciliation and continuing action authority belong in separate records.