Skip to content
Fourohtwo

Prepare a USDC-only withdrawal to the signing account

chainhilt.ai/api/v1/perp/hyperliquid/withdraw/preview

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 th

BaseAnswering
POSThttps://chainhilt.ai/api/v1/perp/hyperliquid/withdraw/preview

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://chainhilt.ai/api/v1/perp/hyperliquid/withdraw/preview", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"accountAddress":"0x1111111111111111111111111111111111111111","amount":"10","destinationChainName":"Arbitrum","nonce":1710000000000,"sourceDex":"","token":"USDC"}),
});
console.log(await res.json());

Example input

{
  "accountAddress": "0x1111111111111111111111111111111111111111",
  "amount": "10",
  "destinationChainName": "Arbitrum",
  "nonce": 1710000000000,
  "sourceDex": "",
  "token": "USDC"
}

More from chainhilt-x402