cancelAllOrdersForSymbol action enables Vincent Apps to cancel all open orders for a specific symbol on Hyperliquid’s spot or perpetuals market.
Prerequisites
Before executing thecancelAllOrdersForSymbol action, the following conditions must be met:
- Symbol: You must provide the symbol (trading pair for spot or asset for perp) for which to cancel all orders.
To learn more about executing Vincent Abilities, see the Executing
Abilities guide.
Executing the precheck Function
The precheck function validates some prerequisites for executing cancel all orders, without actually performing the operation.
For the cancelAllOrdersForSymbol action, the precheck function will validate the following:
- Open orders for the specified symbol must exist.
- Parameters
- Implementation
- Response
The
precheck function requires the following parameters:Executing the execute Function
The execute function performs the actual cancel operation, removing all open orders for the specified symbol from Hyperliquid.
For the cancelAllOrdersForSymbol action, the execute function will:
- Cancel all open orders for the specified symbol on Hyperliquid.
- Return the cancellation result from Hyperliquid.
- Parameters
- Implementation
- Response
The
execute function requires the following parameters:Important Considerations
Symbol-Specific Cancellation
Symbol-Specific Cancellation
This action cancels all open orders for a specific symbol only. Orders for other symbols will remain open.For example:
- If you cancel all orders for “PURR/USDC”, orders for “ETH/USDC” will not be affected
- If you cancel all orders for “SOL” (perp), orders for “ETH” (perp) will not be affected
Symbol Format
Symbol Format
The symbol format differs between spot and perpetual orders:
- Spot orders: Use trading pair format (e.g., “PURR/USDC”, “ETH/USDC”)
- Perp orders: Use base asset only (e.g., “SOL”, “ETH”, “BTC”)
No Orders to Cancel
No Orders to Cancel
If there are no open orders for the specified symbol, the action will still succeed. The result
will indicate that the operation completed successfully, even though no orders were cancelled.
Both Sides Cancelled
Both Sides Cancelled
This action cancels all orders for the symbol, including:
- Buy orders (bids)
- Sell orders (asks)
- Limit orders
- Any other order types for the symbol
Verifying Cancellation Success
Verifying Cancellation Success
After the cancellation is executed, you can verify it was successful by:
- Checking the open orders list using the Hyperliquid API
- Confirming the order ID no longer appears in the list
- Reviewing the cancellation result response
Reference Implementation
For a complete working example showing the full cancel all orders workflow including verification, see the cancel-all-orders.spec.ts end-to-end test in theability-hyperliquid package.

