# Hyperliquid Cancel-All Orders Preview

> Hyperliquid Cancel-All Orders Preview is a paid API for AI agents from chainhilt.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-16).

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.

## Facts

- Endpoint: POST https://chainhilt.ai/api/v1/perp/hyperliquid/order/cancel-all/preview?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hyperliquid-cancel-all-orders-preview-f5d86afc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iYf7oQ1y7O2shEpTwupD_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hyperliquid-cancel-all-orders-preview-f5d86afc -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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".

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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": []
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hyperliquid-cancel-all-orders-preview-f5d86afc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chainhilt.ai](https://www.zero.xyz/host/chainhilt.ai/llms.txt)
