---
title: "Prepare an exact Hyperliquid order for local EIP-712 signing"
method: POST
path: "/v1/agent/futures/prepare-order"
tags: ["Execution"]
---

# Prepare an exact Hyperliquid order for local EIP-712 signing

`POST /v1/agent/futures/prepare-order`

## Request

- Base URL: `https://www.farmdash.one/api`
- URL: `https://www.farmdash.one/api/v1/agent/futures/prepare-order`
- Auth: one of:
  - HTTP bearer
  - none

Zero-custody execution bootstrap. FarmDash validates the market/account,
fresh research gate for new risk, builder-fee approval and market_ioc price
protection, then returns the exact Hyperliquid action, nonce, expiresAt,
intentHash and EIP-712 typed data. FarmDash does not sign or submit.
Sign typedData locally with agentAddress, then POST
{ ...executeRequest, signature } to /v1/agent/futures/execute-order.
Commercial capacity never creates venue authority.

## Request body

- PrepareOrderRequest
  - `executionTrialId` string: Inherited durable analysis lifecycle identity; commercial permission only.
  - `continuationId` string, uuid: Optional server-issued context correlation; grants no execution authority.
  - `agentAddress` string, required
  - `accountAddress` string
  - `coin` string, required
  - `isBuy` boolean, required
  - `size` string, required
  - `price` string, required
  - `orderType` 'limit_gtc' | 'limit_ioc' | 'limit_alo' | 'market_ioc' | 'stop_loss' | 'take_profit', required
  - `reduceOnly` boolean
  - `leverage` union
    - number
    - string
  - `nonce` integer
  - `expiresAt` integer
  - `executionMode` 'USER_SIGNED' | 'BOUNDED_AUTONOMOUS': Preparation is not execution authority. Bounded submission additionally requires an owner grant and authenticated session and remains subject to the canonical rollout gate.

## Response `200`

Exact signable order preparation; no venue submission occurred

- PrepareOrderResponse
  - `ok` true, required
  - `state` 'READY_FOR_LOCAL_SIGNATURE', required
  - `executionMode` 'USER_SIGNED' | 'BOUNDED_AUTONOMOUS', required: Preparation is not execution authority. Bounded submission additionally requires an owner grant and authenticated session and remains subject to the canonical rollout gate.
  - `preparation` object, required
    - `agentAddress` string, required
    - `accountAddress` string, required
    - `coin` string, required
    - `isBuy` boolean, required
    - `size` string, required
    - `price` string, required
    - `orderType` 'limit_gtc' | 'limit_ioc' | 'limit_alo' | 'market_ioc' | 'stop_loss' | 'take_profit', required
    - `reduceOnly` boolean, required
    - `leverage` union, required
      - number
      - string
    - `nonce` integer, required
    - `expiresAt` integer, required
    - `intentHash` string, required
    - `signedAction` object, required: Exact Hyperliquid action including FarmDash builder terms; sign this action without modification.
    - `assetIndex` integer, required
    - `vaultAddress` string, nullable, required
    - `builder` object, required
      - `b` string, required
      - `f` 1, required
      - `basisPoints` 0.1, required
      - `approvedMaximumVenueUnitsTenthsBps` integer, required
  - `typedData` object, required
    - `domain` object, required
      - `name` 'Exchange', required
      - `version` '1', required
      - `chainId` 1337, required
      - `verifyingContract` '0x0000000000000000000000000000000000000000', required
    - `types` object, required
    - `primaryType` 'Agent', required
    - `message` object, required
      - `source` 'a' | 'b', required
      - `connectionId` string, required
  - `executeRequest` PrepareOrderExecuteRequest, required
    - `agentAddress` string, required
    - `accountAddress` string, required
    - `coin` string, required
    - `isBuy` boolean, required
    - `size` string, required
    - `price` string, required
    - `orderType` 'limit_gtc' | 'limit_ioc' | 'limit_alo' | 'market_ioc' | 'stop_loss' | 'take_profit', required
    - `reduceOnly` boolean, required
    - `leverage` union, required
      - number
      - string
    - `nonce` integer, required
    - `expiresAt` integer, required
    - `executionMode` 'USER_SIGNED' | 'BOUNDED_AUTONOMOUS', required: Preparation is not execution authority. Bounded submission additionally requires an owner grant and authenticated session and remains subject to the canonical rollout gate.
    - `intentHash` string, required
    - `signedAction` object, required: Exact Hyperliquid action including FarmDash builder terms; sign this action without modification.
  - `next_action` object, required
    - `local` string, required
    - `then` string, required
  - `zeroCustody` true, required
  - `privateKeyRequiredByFarmDash` false, required
  - `timestamp` integer, required

## Other responses

- `400`: Invalid market, account authority, or order parameters
- `402`: Payment or tier capacity required
- `409`: Fresh research or owner builder-fee approval required
- `422`: Signed market_ioc limit violates live price protection
- `503`: Preparation dependency unavailable

---

[API](https://skmtc.dev/farmdash/apis/farmdash-agent-api.md) · [All operations](https://skmtc.dev/farmdash/apis/farmdash-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/farmdash/apis/farmdash-agent-api/revisions/96310281f58c?raw)
