{"uid":"cap_iYf7oQ1y7O2shEpTwupD_","slug":"hyperliquid-cancel-all-orders-preview-f5d86afc","name":"Hyperliquid Cancel-All Orders Preview","description":"Preview the Hyperliquid cancel-all action the user must sign; it cancels the account's open orders on the default perp DEX and spot, but not on builder-deployed perp DEXs. Errors: 400 invalid input or no open orders, 502 provider failure; execution may return 422 exchange rejection. Treat spot and perp as one balance only when the account abstraction mode is \"unifiedAccount\".","url":"https://chainhilt.ai/api/v1/perp/hyperliquid/order/cancel-all/preview?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fast":{"type":"boolean","description":"true adds Hyperliquid's fast flag (f) to the cancel; otherwise it is omitted."},"nonce":{"type":"integer","minimum":0,"description":"Action nonce in milliseconds since the epoch; defaults to the current time."},"expiresAfter":{"type":"integer","minimum":0,"description":"Millisecond timestamp after which Hyperliquid rejects the action. Signed with the action."},"vaultAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Vault or subaccount to act for; omit to act for the signer. Signed with the action."},"accountAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Account holding the orders (main account, subaccount or vault), not the API signing wallet; its open orders on the default perp DEX and spot are cancelled."}}},"responseSchema":{"type":"json","example":{"response":{"errors":[],"actions":[{"data":{"nonce":1710000000000,"action":{"f":true,"type":"cancel","cancels":[{"a":0,"o":77738308}]},"typedData":{"types":{"Agent":[{"name":"source","type":"string"},{"name":"connectionId","type":"bytes32"}],"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}]},"domain":{"name":"Exchange","chainId":1337,"version":"1","verifyingContract":"0x0000000000000000000000000000000000000000"},"message":{"source":"a","connectionId":"0x77b75cb0a420adad7a889990c81470cb13ee6aad0c4b956dc4db3be805792961"},"primaryType":"Agent"}},"type":"signature","chainId":42161,"protocol":"hyperliquid","submitPath":"/perp/hyperliquid/order/cancel-all/execute"}],"warnings":[]}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zNxjAtIVnSF9y31u7EPoR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a preview of the EIP-712 typed-data action a user must sign to cancel all open orders on Hyperliquid, optionally scoped to a specific market.","exampleAgentPrompt":"Show me the Hyperliquid cancel-all action I need to sign to wipe all my open orders for account 0xAbC1234567890abcdef1234567890abcdef123456 — give me the full EIP-712 typed data preview.","exampleUseCases":[{"title":"Emergency order wipe before market close","prompt":"I need to cancel every open order on my Hyperliquid perp account 0xAbC1234567890abcdef1234567890abcdef123456 right now — can you show me the action I need to sign to do that?"},{"title":"Vault manager bulk cancel preview","prompt":"Preview the cancel-all signing payload for my Hyperliquid vault at 0xDEF0987654321fedcba0987654321fedcba098765 so I can review and approve it before submitting."},{"title":"Automated agent pre-sign review","prompt":"Before my trading bot submits the cancel-all, generate the EIP-712 typed data preview for account 0x1111222233334444555566667777888899990000 on Hyperliquid so I can inspect exactly what it will sign."}],"resultDescription":"Returns a structured action object containing: the cancel-all action payload (with asset and order IDs), the EIP-712 typed data the user must sign (domain, types, message, primaryType), the nonce, the target chainId (Arbitrum/42161), the protocol identifier ('hyperliquid'), a submitPath for executing after signing, plus any errors or warnings encountered during construction.","failureModes":["Invalid or missing accountAddress returns a validation error","Malformed vaultAddress (not 0x + 40 hex chars) triggers a pattern mismatch error","No open orders found may return an empty cancels array with a warning","Nonce conflicts or expiry issues may cause action construction to fail","Network unavailability from Hyperliquid L1 may cause a timeout or upstream error"],"whenToPreferThis":"Use this endpoint when you need to preview and obtain the exact EIP-712 signing payload for a cancel-all operation on Hyperliquid before submitting — particularly in agent workflows where human approval of the signed action is required, or when you want to inspect the full typed data structure before execution. Prefer this over direct execution endpoints when auditability, user confirmation, or dry-run validation is needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-16T18:31:24.991Z","isFirstParty":false,"canonicalSlug":"hyperliquid-cancel-all-orders-preview-f5d86afc"}