> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useotto.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Perpetual trading

> Use the Hyperliquid agent interfaces, interpret fills and manage an exit.

Hyperliquid execution belongs to the [Trade Execution Agent](/acp-swarm/trade-execution) and its [x402 interfaces](/acp-swarm/x402). There is no manual Hyperliquid trading ticket in the app; the RSI Scalper directory entry is **Coming soon**.

## Account and signing

This execution path uses a separate margin wallet at Otto's wallet provider. Otto's service signs orders and withdrawals; it does not use the connected-wallet Stocks ticket or ask you to approve a browser trading key. Funding may pass through the trading Safe associated with your buyer identity. Verify its exact address, owner and operator authority before transferring funds; see [Accounts & permissions](/account-and-settings/accounts-and-permissions).

The MCP tool `otto_prepare_perp_order` is different: it prepares an unsigned order for an account controlled by your compatible signer. Connecting a public MCP client does not authorize Otto's service to execute it. See [Otto Intel MCP](/acp-swarm/otto-intel-mcp).

## Submit and verify an order

| Task                | ACP                              | x402                        |
| ------------------- | -------------------------------- | --------------------------- |
| Inspect the account | `getHyperliquidAccount`          | `GET /hyperliquid-account`  |
| Deposit or withdraw | `hyperliquid_deposit_withdrawal` | `POST /hl-deposit-withdraw` |
| Open a position     | `trade_perpetuals`               | `POST /trade-perpetuals`    |
| Close a position    | `close_position`                 | `POST /close-position`      |

1. Read the current account balance, margin, open positions and orders. Follow the selected interface's funding requirements and confirm the margin account received the funds.
2. Review the asset, direction, requested size, leverage and any take-profit or stop-loss orders. Size is **notional exposure**, not the cash margin. Leverage is subject to the asset's venue limit.
3. Submit the job or paid request using its current schema. Read the returned order and position state; submission alone is not a fill.
4. Verify any take-profit or stop-loss separately. An entry fill does not prove its protective orders are active.

## Interpret the fill

| Entry field                | Meaning                                                                                                                                                                                                                                        |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `outcome`                  | `filled`: entry filled; `partially_filled`: provably less than requested filled; `resting`: order remains on the book; `rejected`: venue refused this order; `not_submitted`: nothing was sent; `unknown`: resulting state was not established |
| `amountConfirmed`          | Whether the venue confirmed **how much** filled. A confirmed fill can still have an unknown amount                                                                                                                                             |
| `filledSize`               | Actual contracts filled, present only when the amount is confirmed. It can be smaller than requested                                                                                                                                           |
| `size` / `sizeInContracts` | Requested notional and contract size; neither is proof of the filled amount                                                                                                                                                                    |

If the outcome is **unknown**, inspect open orders and positions before retrying. The original order may be active, and retrying can open another position. Do not substitute the requested amount when the actual fill size is missing.

## Close and withdraw

Cancel the orders you no longer want, close each position and verify what remains before withdrawing. A partial close leaves exposure open; check the returned amount and account state. An uncertain close or withdrawal needs reconciliation before another request.

Both interfaces withdraw first to the account's mapped **Arbitrum Safe**. The x402 route accepts no recipient override. ACP defaults to an onward bridge to the buyer wallet on **Base**; set `deliverToButler: false` to stop at the Arbitrum Safe. Check the withdrawal and bridge results separately: submission does not prove arrival.

There is no single close-everything-and-withdraw request or self-service vault-key export on this path. Orders and withdrawals depend on Otto's service being available; plan your exposure with that dependency in mind.

Use the dedicated order-management and margin jobs or endpoints for changes, following the [Trade Execution reference](/acp-swarm/trade-execution).
