# Otto AI — Modify Hyperliquid Order (Add/Edit TP/SL)

> Otto AI — Modify Hyperliquid Order (Add/Edit TP/SL) is a paid API for AI agents from x402.ottoai.services, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Modifies an existing Hyperliquid perpetuals order by adding or updating a take-profit or stop-loss trigger price.

## Facts

- Endpoint: POST https://x402.ottoai.services/modify-hl-order
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/otto-ai-modify-hyperliquid-order-add-edit-tp-sl-b9d24b45
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0Xjumc_x8kjyTvKy08RAu

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 otto-ai-modify-hyperliquid-order-add-edit-tp-sl-b9d24b45 -d '<json body>'
```

Example prompt: Add a take-profit at $4000 to my Hyperliquid order ID 12346 — I want it to trigger automatically when the price hits that level.

## When to prefer this

Use this endpoint when you need to attach or update a take-profit or stop-loss trigger on an existing Hyperliquid perpetuals order programmatically via a pay-per-call API. Prefer this over manual Hyperliquid UI interaction when automating trading workflows or running an AI agent that manages risk on open positions.

## Known failure modes

- Invalid order ID — order not found on Hyperliquid
- Invalid action type — must be add_tp or add_sl
- Trigger price rejected — must be above/below current price depending on TP or SL
- Payment failure — USDC charge of $0.01 not settled
- Order already closed or filled — cannot modify
- Network or RPC error connecting to Hyperliquid

## How this service works

Add, modify, or cancel TP/SL trigger orders and limit orders on Hyperliquid. Can attach TP/SL to an existing position or change the trigger price of active orders.

## Output

Returns a JSON object confirming success (true/false), the order ID that was modified, the action applied (e.g. add_tp or add_sl), and the trigger price that was set.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "number",
   "description": "Optional new size, used only by modify_limit_order."
  },
  "asset": {
   "type": "string",
   "description": "Asset ticker"
  },
  "price": {
   "type": "number",
   "description": "Absolute trigger price for TP/SL, or the new limit price. Required for every action except 'cancel'."
  },
  "action": {
   "enum": [
    "add_tp",
    "add_sl",
    "modify_tp",
    "modify_sl",
    "modify_limit_order",
    "cancel"
   ],
   "type": "string",
   "description": "Operation to perform."
  },
  "orderId": {
   "type": "string",
   "description": "Existing order ID. Required for modify_tp, modify_sl, modify_limit_order and cancel; not needed for add_tp/add_sl."
  },
  "userAddress": {
   "type": "string",
   "description": "Optional for external x402 callers — the operated account is your verified payment payer, not this field. Internal/dApp callers must send a valid EVM address."
  },
  "triggerPrice": {
   "type": "number",
   "description": "Alias for price. Accepted; supplying both is rejected."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset": "ETH",
  "price": 4000,
  "action": "add_tp",
  "status": "success",
  "orderId": "12346"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/otto-ai-modify-hyperliquid-order-add-edit-tp-sl-b9d24b45/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.ottoai.services](https://www.zero.xyz/host/x402.ottoai.services/llms.txt)
