$0.01
per call · USD Coin on Base
Close an open perpetual position on Hyperliquid (full or partial). Cancels all attached TP/SL trigger orders automatically.
Endpoint
POST https://x402.ottoai.services/close-position3
Calls / 30d
2
Unique payers / 30d
Aug 28
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://x402.ottoai.services/close-position", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"asset": "BTC",
"partialClosePercentage": 100
}),
});
const data = await res.json();curl -X POST \
"https://x402.ottoai.services/close-position" \
-H "Content-Type: application/json" \
-d '{"asset":"BTC","partialClosePercentage":100}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"asset": "BTC",
"closedPercentage": 100,
"closedSize": 250,
"exitPrice": 67500,
"realizedPnl": "15.23",
"status": "success"
}Payment details
0x5bb4b0c766e0d5d791d9403fc275c22064709f68USD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Market Data and the homepage with a featured placement.
More from Otto AI & similar services
Otto AI · Tweet Search
x402.ottoai.services
Search X/Twitter for any query and get the actual matching tweets — keyword, $CASHTAG, from:handle (a user timeline), @handle (mentions), or boolean OR. Each tweet returns author, full text (long-form note tweets included), timestamp, likes and retweets (reply/quote counts when available). Most-recent-first for real-time monitoring and alerting. Live X search backend, pay-per-call USDC, structured JSON.
Otto AI · Crypto News
x402.ottoai.services
Importance-ranked crypto headlines with per-article source links and publish times, plus a sentiment-scored market brief. Regenerated hourly; meta carries the snapshot's age and a fresh/stale verdict.
Otto AI · Equity News
x402.ottoai.services
Latest company news for a vendor-resolved equity: licensed Finnhub headlines from the trailing seven days with publication time, source, and summary. Only articles that name the company are served — labelled `primary` when the headline names it, `mentioned` when only the summary does — so a symbol-tagged story about another company never fills the list. Redirect URLs withheld; no sentiment is fabricated.