{"uid":"cap_nm-EyhbxhP9wLG4e2SdlU","slug":"otto-ai-update-perpetual-position-margin-06c94586","name":"Otto AI — Update Perpetual Position Margin","description":"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.","url":"https://x402.ottoai.services/update-position-margin","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"type":"json","example":{"asset":"BTC","action":"update_leverage","status":"success","outcome":"applied","leverage":20,"marginMode":"cross"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vljnJK_Ei7xz7KM4XdcQ4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Adjusts the margin (and recalculates leverage) on an existing perpetual futures position for a given asset","exampleAgentPrompt":"Update my BTC perpetual position margin to 150 USDC so my new leverage comes out to 20x.","exampleUseCases":[{"title":"Automated risk management during volatility","prompt":"I'm getting nervous about my ETH perpetual position with this market spike. Add another 200 USDC margin to bring my leverage down and reduce my liquidation risk."},{"title":"Rebalance portfolio leverage after gains","prompt":"My SOL futures trade hit a nice profit. Lower my leverage by bumping the margin up to 300 USDC so I can protect my gains without closing the position."},{"title":"Adjust margin for intraday trading strategy","prompt":"I want to take a bigger directional bet on BTC for the next few hours. Cut my margin down so I'm running at 25x leverage instead of 15x."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:35:02.019Z","isFirstParty":false}