BETA

ChainHilt is in beta. Use at your own discretion.

chainhilt

Hyperliquid

Trade on Hyperliquid from your agent

Place, modify and cancel orders, run TWAPs, set leverage and margin, move USDC, and check a portfolio's risk, on Hyperliquid perps and spot. ChainHilt prepares each action, your wallet signs it, and submitting it costs nothing extra.

Read an account, no wallet needed

The portfolio report, risk check, open-order audit and portfolio graph take only an account address and return data, so a payment client is all they need. A report costs $0.01.

POST https://chainhilt.ai/api/v1/perp/hyperliquid/portfolio/report

{ "address": "0x…" }

Place an order

  1. Resolve the asset ID ($0.001)

    POST /api/v1/perp/hyperliquid/asset-id turns a symbol such as HYPE or a pair such as HYPE/USDC into the ID orders use. Perp and spot IDs differ, so resolve them instead of guessing.

  2. Authorize and preview ($0.01)

    Call the wallet's authorize_request, then send POST /api/v1/perp/hyperliquid/order/place/preview through your x402 client with the header it returned. The response is a signature action: typed data plus the submitPath it goes back to.

  3. Sign and submit

    Pass the action's nonce and hash to process_action. The wallet signs the typed data and posts the signature to submitPath, which is free.

The first order from an account may answer 428 Precondition Required with an approveBuilderFee action instead of the preview. That is expected: sign it once with process_action, then repeat the order request.

Before you sign

  • Keep previewed actions exactly as returned. The builder fee and the nonce are part of what is signed, and any change makes the wallet refuse the action.
  • Canceling an order removes only its unfilled remainder; fills are not undone.
  • A batch of orders can partly succeed even when execution answers 422. Check each entry's status before retrying.
  • To fund the account, bridge USDC with /api/v1/bridge/simulate and /api/v1/bridge/execute, using targetChainId: 999 and HyperEVM USDC as the target token. It lands in the HyperCore perps balance by default. USDC withdrawals go to Arbitrum or HyperEVM.

Endpoints

Hyperliquid endpoints and their prices. Submitting a signed action is free.
EndpointPriceWhat it does
POST /api/v1/perp/hyperliquid/leverage/preview$0.001Set cross or isolated leverage for a perp asset.
POST /api/v1/perp/hyperliquid/isolated-margin/preview$0.001Add or remove isolated margin for a perp asset.
POST /api/v1/perp/hyperliquid/asset-id$0.001Resolve an order asset ID from asset (symbol, spot pair, @index, or numeric market index) and sourceDex ("" for default perps, "spot" for spot).
POST /api/v1/perp/hyperliquid/send-asset/preview$0.001Prepare a user-signed sendAsset transfer between users, subaccounts, spot and perp DEXs.
POST /api/v1/perp/hyperliquid/portfolio/report$0.01Produce an agent-ready Hyperliquid portfolio report covering equity, PnL, leverage, margin health, liquidation exposure, and concentration.
POST /api/v1/perp/hyperliquid/portfolio/graph/render$0.01Return chart-ready Hyperliquid portfolio graph data for account value, PnL, drawdown, deposits, and withdrawals.
POST /api/v1/perp/hyperliquid/portfolio/risk-check$0.01Detect high leverage, liquidation proximity, concentration, funding drag, and missing stops for a Hyperliquid account.
POST /api/v1/perp/hyperliquid/orders/audit$0.01Audit Hyperliquid open orders for stale, duplicate, conflicting, reduce-only, or unprotected orders.
POST /api/v1/perp/hyperliquid/trade/preview$0.001Preview a Hyperliquid trade with notional, margin impact, slippage, liquidation estimate, exchange fees, and builder fee.
POST /api/v1/perp/hyperliquid/user-abstraction/preview$0.001Prepare a user-signed abstraction change: disabled, unifiedAccount, or portfolioMargin.
POST /api/v1/perp/hyperliquid/twap/place/preview$0.001Prepare a TWAP order for L1 signing.
POST /api/v1/perp/hyperliquid/twap/cancel/preview$0.001Prepare a TWAP cancellation for L1 signing.
POST /api/v1/perp/hyperliquid/order/modify/preview$0.001Prepare a single-order modification by OID or CLOID for L1 signing.
POST /api/v1/perp/hyperliquid/order/place/preview$0.01Prepare an order for L1 signing with the configured lowercase builder and fee in tenths of a basis point.
POST /api/v1/perp/hyperliquid/withdraw/preview$0.001Prepare a USDC-only withdrawal to the signing account; other assets return 400.
POST /api/v1/perp/hyperliquid/order/cancel/preview$0.001Preview the Hyperliquid cancel action the user must sign for an open numeric order ID.
POST /api/v1/perp/hyperliquid/order/cancel-all/preview$0.001Preview 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.
POST /api/v1/perp/hyperliquid/order/noop$0.001Return the Hyperliquid noop action the user must sign to mark a nonce as used for safer in-flight cancellation workflows.

Next

  • New here? Start with the quickstart.
  • skills.md covers TWAPs, leverage, margin, transfers and withdrawals in the detail your agent needs.