{"uid":"cap_Gg9OnhzrqF_JBvAFrfD3F","slug":"chainhilt-hyperliquid-usdc-withdrawal-preview-58d4eee7","name":"ChainHilt Hyperliquid USDC Withdrawal Preview","description":"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\".","url":"https://chainhilt.ai/api/v1/perp/hyperliquid/withdraw/preview?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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\"."}}},"responseSchema":{"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"},"primaryType":"HyperliquidTransaction:SendToEvmWithData"}},"type":"signature","chainId":42161,"protocol":"hyperliquid","submitPath":"/perp/hyperliquid/withdraw/execute"}],"warnings":[],"accountAddress":"0x1111111111111111111111111111111111111111"}}},"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_kzFy8Co7F5VfS6Mzb34-I","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":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Withdraw profits from unified account","prompt":"I want to pull 200 USDC out of my Hyperliquid unified account at 0xAbCd...1234 to Arbitrum — prepare the withdrawal typed data for me to sign, using the spot source balance."},{"title":"Move perp balance to HyperEVM","prompt":"Prepare a withdrawal of 75 USDC from my Hyperliquid perp balance at 0xDead...Beef to HyperEVM so I can use it on-chain — give me the action I need to sign."},{"title":"Portfolio margin USDC bridge out","prompt":"I have a portfolio margin account on Hyperliquid at 0x2222...3333 and I need to withdraw 500 USDC to Arbitrum using the spot source — can you generate the EIP-712 withdrawal preview for me to sign?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-16T18:39:10.194Z","isFirstParty":false,"canonicalSlug":"chainhilt-hyperliquid-usdc-withdrawal-preview-58d4eee7"}