Skip to main content
Cancel one or more open orders through PerpsClient.cancelOrders. The registered provider plugin authorizes each cancellation with its SDK-managed credential; the user’s wallet is not prompted.
The examples on this page use Hyperliquid (provider: 'hyperliquid'). Replace the provider value with any supported DEX from getProviders().

cancelOrders

Pass multiple IDs to cancel several orders in a single call:
Use the orderId returned from the placeOrder response to cancel orders.

Per-market order IDs

Some venues scope order IDs per market rather than globally (e.g. Lighter’s order_index). For those, supply the market context so the cancel resolves to the right order — either pass the composite "<market_id>:<order_id>" form in ids, or set assetId to the order’s market.id:
API Reference: POST /createAction · /executeAction