{"uid":"cap_2OYLHoUAGr93PPBOu0Pf1","slug":"chainhilt-hyperliquid-cancel-order-preview-76fd0ad4","name":"ChainHilt Hyperliquid Cancel Order Preview","description":"Preview the Hyperliquid cancel action the user must sign for an open numeric order ID. Errors: 400 invalid input or no matching open order, 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/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."},"orderId":{"type":"integer","minimum":0,"description":"Numeric order ID (oid) of the open order."},"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 that owns the open order; used to look up its asset ID."}}},"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/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_vZNNxQ8WF1W5r_2c7lrek","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 the EIP-712 typed data payload that a user must sign to cancel an open Hyperliquid order by numeric order ID, without submitting the cancellation.","exampleAgentPrompt":"Show me the Hyperliquid cancel action I need to sign to cancel order 77738308 on my account 0xAbCd...1234 — just preview it, don't submit anything yet.","exampleUseCases":[{"title":"Inspect cancel payload before signing","prompt":"Before I sign anything, can you preview the EIP-712 typed data for cancelling Hyperliquid order 77738308 on my account 0x1234567890abcdef1234567890abcdef12345678? I want to review exactly what I'd be signing."},{"title":"Automated agent cancel verification","prompt":"My trading bot wants to cancel order 99001122 on Hyperliquid for account 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef — generate the unsigned cancel action so I can inspect and then sign it programmatically."},{"title":"Vault account order cancellation preview","prompt":"I'm managing a vault at 0xaabbccddaabbccddaabbccddaabbccddaabbccdd — preview the Hyperliquid cancel action for order ID 55443322 on behalf of that vault so I can confirm the payload looks right before signing."}],"resultDescription":"Returns a structured action object containing the nonce, the Hyperliquid cancel action (with asset ID and order ID), the full EIP-712 typed data including domain and message fields, the target chainId (Arbitrum, 42161), the protocol identifier, and the submit path to use once the user has signed — along with any warnings or errors.","failureModes":["Order ID not found or already cancelled — errors array populated, no action returned","Invalid account or vault address format — input validation failure","Order belongs to a different account — authorization mismatch error","Nonce conflict or expiry issue — action may be rejected at submission time","Network or Hyperliquid API unavailability — 5xx error or timeout"],"whenToPreferThis":"Use this endpoint when you need to safely inspect and verify the exact EIP-712 payload required to cancel a Hyperliquid order before the user signs it — especially in automated or agent-driven flows where confirming the action structure is critical before committing. Prefer this over directly calling the execute endpoint when user review, audit logging, or multi-step signing flows are required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-16T18:36:44.467Z","isFirstParty":false,"canonicalSlug":"chainhilt-hyperliquid-cancel-order-preview-76fd0ad4"}