Prepare an unsigned Hyperliquid perp order L1 action
otto_prepare_perp_orderPrepare and verify an unsigned Hyperliquid perpetuals order (limit, with optional reduce-only take-profit and stop-loss triggers bundled as normalTpsl) for the caller-owned Hyperliquid account, returned as the canonical L1 action plus the exact EIP-712 Agent domain, struct, and connectionId recipe the caller's own signer needs. The asset id, size grid, and price grid come from the live perp universe: an unknown or delisted perp, a size finer than the asset's szDecimals, or a price off the venue's 5-significant-digit / (6 - szDecimals) decimal grid is refused by name rather than rounded to a different order. There is no market order — name your own aggressive limit price with 'Ioc'. Otto's builder attribution is spec'd and valueless today, so the action carries no builder field and the envelope says so. The nonce is chosen by the signer, never here; the envelope's valid_until is committed to the artifact digest AND placed inside the signed digest as expiresAfter, so the venue itself rejects a stale action, while the Hyperliquid signer nonce remains the replay boundary and this tool cannot guarantee single execution. This tool never signs or submits, holds no key, and derives no agent wallet. Every envelope from this server is valid for 300 seconds from construction (valid_until); a stale envelope is refused by the verifier — request a fresh one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| size | Yes | Order size in base units, e.g. '0.01'. At most szDecimals fractional digits for this perp. | |
| asset | Yes | Perp symbol exactly as the venue names it, e.g. 'BTC', 'kPEPE'. Case-sensitive. | |
| client_ref | No | ||
| limitPrice | Yes | Limit price. Must sit on the venue grid: at most 5 significant digits unless integer, and at most (6 - szDecimals) decimals. | |
| reduceOnly | No | ||
| timeInForce | No | Gtc rests, Ioc fills-or-cancels, Alo posts only. There is no market order: name your own aggressive limit price with 'Ioc' instead. | Gtc |
| vaultAddress | No | Trade on behalf of this vault or sub-account. A declared profile fact only. | |
| stopLossPrice | No | Optional reduce-only market stop-loss trigger, bundled with grouping normalTpsl. | |
| tradingSigner | No | The address that will sign, when it is not the master account itself: a user-held approved API wallet. Declared, never derived. | |
| accountProfile | Yes | The Hyperliquid master account. `chainId` must be 1337, the signature chain id Hyperliquid pins for every L1 action. | |
| takeProfitPrice | No | Optional reduce-only market take-profit trigger, bundled with grouping normalTpsl. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rail | Yes | ||
| payload | Yes | ||
| operation | Yes | ||
| assertions | Yes | ||
| submission | Yes | ||
| artifact_id | Yes | ||
| valid_until | Yes | ||
| intent_digest | Yes | ||
| schema_version | Yes | ||
| account_binding | Yes | ||
| fee_attribution | Yes | ||
| replay_disclosure | Yes | ||
| required_capabilities | Yes |