# ChainHilt Hyperliquid USDC Withdrawal Preview

> ChainHilt Hyperliquid USDC Withdrawal 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).

Prepares a signed EIP-712 withdrawal action to move USDC from a Hyperliquid perp or spot account to Arbitrum or HyperEVM, returning typed data for the user to sign and submit.

## Facts

- Endpoint: POST https://chainhilt.ai/api/v1/perp/hyperliquid/withdraw/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/chainhilt-hyperliquid-usdc-withdrawal-preview-58d4eee7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Gg9OnhzrqF_JBvAFrfD3F

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 chainhilt-hyperliquid-usdc-withdrawal-preview-58d4eee7 -d '<json body>'
```

Example prompt: Prepare a USDC withdrawal of 50 USDC from my Hyperliquid unified account at 0x1111111111111111111111111111111111111111 to Arbitrum using the spot source balance — give me the EIP-712 typed data I need to sign.

## When to prefer this

Use this endpoint when an agent needs to programmatically generate and sign a Hyperliquid USDC withdrawal to Arbitrum or HyperEVM without API keys, paying per call via x402. It is specifically designed for unified, portfolio margin, and standard perp accounts on Hyperliquid and handles the EIP-712 typed data preparation step — the agent must still sign and submit the returned payload. Do not use this if the asset is not USDC or if the destination chain is outside Arbitrum/HyperEVM.

## Known failure modes

- 400 Bad Request if token is not USDC
- 400 Bad Request if sourceDex is 'spot' but account is not unified or portfolio margin (or vice versa)
- 400 Bad Request if amount exceeds available balance (insufficient funds after fee and gas deduction)
- 400 Bad Request if accountAddress is not a valid EVM address
- 400 Bad Request if destinationChainName is not Arbitrum or HyperEVM
- 402 Payment Required if x402 micropayment is not included
- 500 if Hyperliquid API is unreachable or returns an error

## How this service works

Prepare a USDC-only withdrawal to the signing account; other assets return 400. Unified account and portfolio margin accounts must use spot; manual mode may use spot or perp. Arbitrum receives the amount less a fee, and gas comes from the balance left, so the whole balance cannot be withdrawn. Sign the typedData and submit it unchanged to submitPath. Treat spot and perp as one balance only when the account abstraction mode is "unifiedAccount".

## Output

Returns a JSON object containing an EIP-712 typed data structure (domain, types, message, primaryType), the full action payload with nonce, token, amount, gas limit, source balance, destination chain ID and recipient address, plus a submitPath (/perp/hyperliquid/withdraw/execute) to send the signed payload to. Also includes any errors or warnings from validation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "nonce": {
   "type": "integer",
   "minimum": 0,
   "description": "Action nonce in milliseconds since the epoch; defaults to the current time."
  },
  "token": {
   "type": "string",
   "const": "USDC",
   "default": "USDC",
   "description": "Only \"USDC\" (the default)."
  },
  "amount": {
   "type": "string",
   "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
   "description": "USDC amount as a decimal string."
  },
  "gasLimit": {
   "type": "integer",
   "description": "Arbitrum delivery gas limit; defaults to 200000. Ignored for HyperEVM.",
   "exclusiveMinimum": 0
  },
  "sourceDex": {
   "enum": [
    "",
    "spot"
   ],
   "type": "string",
   "description": "Required withdrawal source: use \"spot\" for unified account and portfolio margin accounts, or \"\" for a separate perp balance."
  },
  "accountAddress": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Withdrawing account; the USDC goes to this address on the destination chain."
  },
  "destinationChainName": {
   "enum": [
    "Arbitrum",
    "HyperEVM"
   ],
   "type": "string",
   "default": "Arbitrum",
   "description": "\"Arbitrum\" (the default) or \"HyperEVM\"."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "response": {
   "errors": [],
   "actions": [
    {
     "data": {
      "nonce": 1710000000000,
      "action": {
       "data": "0x",
       "type": "sendToEvmWithData",
       "nonce": 1710000000000,
       "token": "USDC",
       "amount": "10",
       "gasLimit": 200000,
       "sourceDex": "",
       "addressEncoding": "hex",
       "hyperliquidChain": "Mainnet",
       "signatureChainId": "0xa4b1",
       "destinationChainId": 3,
       "destinationRecipient": "0x1111111111111111111111111111111111111111"
      },
      "typedData": {
       "types": {
        "EIP712Domain": [
         {
          "name": "name",
          "type": "string"
         },
         {
          "name": "version",
          "type": "string"
         },
         {
          "name": "chainId",
          "type": "uint256"
         },
         {
          "name": "verifyingContract",
          "type": "address"
         }
        ],
        "HyperliquidTransaction:SendToEvmWithData": [
         {
          "name": "hyperliquidChain",
          "type": "string"
         },
         {
          "name": "token",
          "type": "string"
         },
         {
          "name": "amount",
          "type": "string"
         },
         {
          "name": "sourceDex",
          "type": "string"
         },
         {
          "name": "destinationRecipient",
          "type": "string"
         },
         {
          "name": "addressEncoding",
          "type": "string"
         },
         {
          "name": "destinationChainId",
          "type": "uint32"
         },
         {
          "name": "gasLimit",
          "type": "uint64"
         },
         {
          "name": "data",
          "type": "bytes"
         },
         {
          "name": "nonce",
          "type": "uint64"
         }
        ]
       },
       "domain": {
        "name": "HyperliquidSignTransaction",
        "chainId": 42161,
        "version": "1",
        "verifyingContract": "0x0000000000000000000000000000000000000000"
       },
       "message": {
        "data": "0x",
        "type": "sendToEvmWithData",
        "nonce": 1710000000000,
        "token": "USDC",
        "amount": "10",
        "gasLimit": 200000,
        "sourceDex": "",
        "addressEncoding": "hex",
        "hyperliquidChain": "Mainnet",
        "signatureChainId": "0xa4b1",
        "destinationChainId": 3,
        "destinationRecipient": "0x1111111111111111111111111111111111111111"
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainhilt-hyperliquid-usdc-withdrawal-preview-58d4eee7/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)
