# ChainHilt Hyperliquid Perp Order Place Preview

> ChainHilt Hyperliquid Perp Order Place Preview is a paid API for AI agents from chainhilt.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-16).

Prepares a Hyperliquid perpetual or spot order for L1 signing by injecting the configured builder address and fee, returning typed EIP-712 data and a submit path for execution.

## Facts

- Endpoint: POST https://chainhilt.ai/api/v1/perp/hyperliquid/order/place/preview?utm_source=zero.xyz
- Price: $0.01/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-perp-order-place-preview-931b11c9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BmaAYpywIGBj4WYuS4-d_

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-perp-order-place-preview-931b11c9 -d '<json body>'
```

Example prompt: Prepare a Hyperliquid perp order preview so I can sign and submit it: buy 0.01 BTC (asset 0) at a limit price of 60000, GTC, non-reduce-only, with client order ID 0x1234567890abcdef1234567890abcdef, using grouping 'na'.

## When to prefer this

Use this endpoint when your agent needs to construct and preview a Hyperliquid perp or spot order with the builder fee already injected before the user signs it — especially in automated workflows where you must present EIP-712 typed data for wallet signing and then separately submit via the returned submitPath. Prefer this over direct Hyperliquid API calls when you want the builder and fee configuration handled automatically without managing API keys.

## Known failure modes

- 400 invalid input — malformed order fields such as bad price/size format or invalid asset ID
- 409 builder approval slots full — the builder cannot accept new orders at this time
- 428 builder fee not yet approved — must sign the returned approval object and retry
- 502 provider failure — upstream Hyperliquid node or RPC is unavailable
- 503 builder not configured — the chainhilt.ai builder is not set up for this account or environment

## How this service works

Prepare an order for L1 signing with the configured lowercase builder and fee in tenths of a basis point. Sign and submit unchanged to the returned submitPath. Errors: 400 invalid input, 409 builder approval slots full, 428 builder fee not yet approved (sign the returned approval, then retry), 502 provider failure, 503 builder not configured. Treat spot and perp as one balance only when the account abstraction mode is "unifiedAccount".

## Output

Returns an action object with the full order payload (including injected builder address and fee in tenths of a basis point), EIP-712 typed data for L1 signing, the chain ID (42161), protocol identifier ('hyperliquid'), and a submitPath ('/perp/hyperliquid/order/place/execute') to POST the signed result to. Also includes account address, any warnings, and any errors.

## 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."
  },
  "action": {
   "type": "object",
   "required": [
    "type",
    "orders",
    "grouping"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "order",
     "description": "Always \"order\"."
    },
    "orders": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "a",
       "b",
       "p",
       "s",
       "r",
       "t"
      ],
      "properties": {
       "a": {
        "type": "integer",
        "minimum": 0,
        "description": "Asset ID from /perp/hyperliquid/asset-id: perp index, or 10000 + spot index."
       },
       "b": {
        "type": "boolean",
        "description": "true to buy, false to sell."
       },
       "c": {
        "type": "string",
        "pattern": "^0x[a-fA-F0-9]+$",
        "maxLength": 34,
        "minLength": 34,
        "description": "Client order ID: 128-bit hex string, e.g. 0x1234567890abcdef1234567890abcdef."
       },
       "p": {
        "type": "string",
        "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
        "description": "Limit price as a decimal string."
       },
       "r": {
        "type": "boolean",
        "description": "true for reduce-only."
       },
       "s": {
        "type": "string",
        "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
        "description": "Size as a decimal string, rounded to the asset's szDecimals."
       },
       "t": {
        "anyOf": [
         {
          "type": "object",
          "required": [
           "limit"
          ],
          "properties": {
           "limit": {
            "type": "object",
            "required": [
             "tif"
            ],
            "properties": {
             "tif": {
              "enum": [
               "Gtc",
               "Alo",
               "Ioc"
              ],
              "type": "string",
              "description": "Alo (post only), Ioc (immediate or cancel) or Gtc (good til canceled)."
             }
            },
            "description": "Limit order.",
            "additionalProperties": false
           }
          },
          "additionalProperties": false
         },
         {
          "type": "object",
          "required": [
           "trigger"
          ],
          "properties": {
           "trigger": {
            "type": "
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "response": {
   "errors": [],
   "actions": [
    {
     "data": {
      "nonce": 1710000000000,
      "action": {
       "type": "order",
       "orders": [
        {
         "a": 0,
         "b": true,
         "p": "60000",
         "r": false,
         "s": "0.01",
         "t": {
          "limit": {
           "tif": "Gtc"
          }
         }
        }
       ],
       "builder": {
        "b": "0x2222222222222222222222222222222222222222",
        "f": 10
       },
       "grouping": "na"
      },
      "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": "0x23b1adacd61decaf45667fc4f52e61174aca749c5d8614e1d725e0108025b732"
       },
       "primaryType": "Agent"
      }
     },
     "type": "signature",
     "chainId": 42161,
     "protocol": "hyperliquid",
     "submitPath": "/perp/hyperliquid/order/place/execute"
    }
   ],
   "warnings": [],
   "accountAddress": "0x1111111111111111111111111111111111111111"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainhilt-hyperliquid-perp-order-place-preview-931b11c9/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)
