# Otto AI — Update Perpetual Position Margin

> Otto AI — Update Perpetual Position Margin 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).

Adjusts the margin (and recalculates leverage) on an existing perpetual futures position for a given asset

## Facts

- Endpoint: POST https://x402.ottoai.services/update-position-margin
- 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-update-perpetual-position-margin-06c94586
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nm-EyhbxhP9wLG4e2SdlU

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-update-perpetual-position-margin-06c94586 -d '<json body>'
```

Example prompt: Update my BTC perpetual position margin to 150 USDC so my new leverage comes out to 20x.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically adjust the margin on an existing perpetual futures position — for example, to reduce liquidation risk by adding margin or to change effective leverage. Prefer this over manual exchange interfaces when automating risk management workflows.

## Known failure modes

- Invalid or unsupported asset symbol returns error
- Margin amount below minimum threshold rejected
- No open position found for the specified asset
- Insufficient funds to cover new margin requirement
- Network or blockchain execution failure returns non-success response
- Malformed request body returns validation error

## How this service works

93 pay-per-call AI services on x402 V2 — market intel, DeFi execution, AI creative tools. USDC on Base on every endpoint, Solana USDC on 68 of 93. From $0.001 per call.

## Output

Returns a JSON object confirming the asset (e.g. 'BTC'), a success boolean, the updated margin value (e.g. 150 USDC), and the recalculated leverage (e.g. 20x) after the margin adjustment.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "asset": {
   "type": "string",
   "description": "Asset ticker of the open position"
  },
  "action": {
   "enum": [
    "update_leverage",
    "add_margin",
    "remove_margin"
   ],
   "type": "string",
   "description": "Operation to perform."
  },
  "amount": {
   "type": "number",
   "description": "USDC amount to add or remove. Required for add_margin/remove_margin. On update_leverage it is read as the new leverage value."
  },
  "leverage": {
   "type": "number",
   "description": "New leverage. Required for update_leverage. Max varies by asset (BTC 40x, ETH 25x, SOL/XRP 20x)."
  },
  "marginMode": {
   "enum": [
    "cross",
    "isolated"
   ],
   "type": "string",
   "description": "Optional, applies to update_leverage only."
  },
  "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset": "BTC",
  "action": "update_leverage",
  "status": "success",
  "outcome": "applied",
  "leverage": 20,
  "marginMode": "cross"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/otto-ai-update-perpetual-position-margin-06c94586/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)
