Open leveraged perpetual positions on Hyperliquid with optional native TP/SL trigger order
Open leveraged perpetual positions on Hyperliquid with optional native TP/SL trigger orders. Min notional $10. Max leverage varies by asset (BTC 40x, ETH 25x, SOL 20x). Supports BTC, ETH, SOL, and 100+ other markets.
10000 (raw units)
price
2
calls / 30d
1
unique payers
2026-08-28
updated
Provider
x402.ottoai.services · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x5bB4B0C766E0D5D791d9403Fc275c22064709F68",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "10000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x5bB4B0C766E0D5D791d9403Fc275c22064709F68",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "10000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"asset": "BTC",
"leverage": 25,
"side": "long",
"size": 250,
"stopLoss": {
"price": 60000
},
"takeProfit": {
"price": 75000
}
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"action_required": true,
"asset": "BTC",
"entry": {
"amountConfirmed": true,
"entryPrice": 67000,
"filledSize": 0.0037,
"leverage": 25,
"marginMode": "cross",
"orderId": "12345",
"orderType": "market",
"outcome": "filled",
"positionOpen": true,
"requestedNotional": 250,
"requestedSizeInContracts": 0.0037,
"side": "long",
"size": 250,
"sizeInContracts": 0.0037
},
"entryPrice": 67000,
"message": "Your long position in BTC is open at 25x for 250 (0.0037 contracts), and the stop-loss could not be confirmed either way. Nothing was changed or cancelled on your behalf — add or confirm the trigger with /modify-hl-order before relying on it.",
"orderId": "12345",
"protection": {
"actionRequired": true,
"failed": [],
"filled": [],
"legs": [
{
"leg": "takeProfit",
"orderId": "12346",
"state": "resting"
},
{
"detail": "The venue did not confirm this order and its current order list could not be read.",
"leg": "stopLoss",
"state": "unknown"
}
],
"placed": [
"takeProfit"
],
"requested": [
"takeProfit",
"stopLoss"
],
"unknown": [
"stopLoss"
]
},
"side": "long",
"status": "partial",
"tpOrderId": "12346"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"asset": {
"description": "Asset ticker (BTC, ETH, SOL, etc.). HIP-3 stock perps also accept 'xyz:TSLA' form.",
"type": "string"
},
"leverage": {
"description": "Leverage multiplier (1-40 depending on asset)",
"type": "number"
},
"limitPrice": {
"description": "Required when orderType is 'limit'.",
"type": "number"
},
"marginMode": {
"description": "Default: cross. Stock perps (xyz DEX) are always isolated.",
"enum": [
"cross",
"isolated"
],
"type": "string"
},
"orderType": {
"description": "Default: market.",
"enum": [
"market",
"limit"
],
"type": "string"
},
"side": {
"description": "Position direction",
"enum": [
"long",
"short"
],
"type": "string"
},
"size": {
"description": "Notional size in USDC (NOT margin). For '$10 margin at 25x', use size=250. Required — an omitted size is rejected, never defaulted.",
"type": "number"
},
"stopLoss": {
"description": "Optional stop-loss trigger. Provide EITHER percentage OR price, not both.",
"properties": {
"percentage": {
"description": "SL as a percentage loss from entry (e.g. 5 = -5%)",
"type": "number"
},
"price": {
"description": "SL as an absolute price level",
"type": "number"
}
},
"type": "object"
},
"stopLossPrice": {
"description": "Alias for stopLoss.price. Send exactly one of the two — supplying stopLoss and stopLossPrice together is rejected, including when their values are equal.",
"type": "number"
},
"takeProfit": {
"description": "Optional take-profit trigger. Provide EITHER percentage OR price, not both.",
"properties": {
"percentage": {
"description": "TP as a percentage gain from entry (e.g. 10 = +10%)",
"type": "number"
},
"price": {
"description": "TP as an absolute price level",
"type": "number"
}
},
"type": "object"
},
"takeProfitPrice": {
"description": "Alias for takeProfit.price. Send exactly one of the two — supplying takeProfit and takeProfitPrice together is rejected, including when their values are equal.",
"type": "number"
}
},
"required": [
"asset",
"side",
"size",
"leverage"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"action_required": {
"description": "Machine-readable: true whenever this position needs you to look at it. Branch on this single field and you land correctly for every status above.",
"type": "boolean"
},
"as_of": {
"type": "string"
},
"asset": {
"type": "string"
},
"entry": {
"properties": {
"accepted": {
"type": "boolean"
},
"amountConfirmed": {
"type": "boolean"
},
"entryPrice": {
"type": "number"
},
"filledSize": {
"type": "number"
},
"filledSize_notional": {
"type": "number"
},
"leverage": {
"type": "number"
},
"marginMode": {
"type": "string"
},
"orderId": {
"type": "string"
},
"orderType": {
"type": "string"
},
"outcome": {
"description": "Where the entry stands, read off the venue by the client order id we submitted: 'filled' (a position is open — the AMOUNT is a separate question, see `amountConfirmed` and `filledSize`; a 'filled' status alone does not mean the full requested size filled), 'partially_filled' (a position is open for PROVABLY less than requested — see entry.filledSize for what actually filled), 'resting' (the order is on the book), 'rejected' (the venue refused this exact order), 'not_submitted' (nothing was sent to the venue at all) or 'unknown' (none of these could be established — check before retrying, because retrying may open a second position). You are charged when this request verifiably delivered something: the entry is 'filled' or 'resting', OR any requested take-profit/stop-loss is live on the book (resting, or already executed). You are NOT charged when the entry is 'rejected' and no requested trigger is live, nor when the outcome is 'unknown' and no requested trigger is live — an unconfirmed request is never billed.",
"enum": [
"filled",
"partially_filled",
"resting",
"rejected",
"unknown",
"not_submitted"
],
"type": "string"
},
"positionOpen": {
"type": "boolean"
},
"requestedNotional": {
"type": "number"
},
"requestedSizeInContracts": {
"type": "number"
},
"side": {
"type": "string"
},
"size": {
"type": "number"
},
"sizeInContracts": {
"type": "number"
}
},
"type": "object"
},
"entryPrice": {
"type": "number"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"orderId": {
"type": "string"
},
"protection": {
"properties": {
"actionRequired": {
"type": "boolean"
},
"failed": {
"items": {
"type": "string"
},
"type": "array"
},
"filled": {
"items": {
"type": "string"
},
"type": "array"
},
"legs": {
"items": {
"properties": {
"detail": {
"type": "string"
},
"leg": {
"enum": [
"takeProfit",
"stopLoss"
],
"type": "string"
},
"orderId": {
"type": "string"
},
"state": {
"enum": [
"resting",
"filled",
"failed",
"unknown",
"not_submitted"
],
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"notSubmitted": {
"items": {
"type": "string"
},
"type": "array"
},
"placed": {
"items": {
"type": "string"
},
"type": "array"
},
"requested": {
"items": {
"type": "string"
},
"type": "array"
},
"unknown": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"resting": {
"items": {
"type": "object"
},
"type": "array"
},
"side": {
"type": "string"
},
"slOrderId": {
"type": "string"
},
"status": {
"description": "'success' = the entry is live and every requested trigger is confirmed resting. 'partial' = the entry is live but a requested take-profit or stop-loss is not resting — check `protection`. 'unknown' = an order was submitted and the resulting state could not be confirmed; you may hold a position. Never retry blind on this one. 'failed' = nothing reached the venue.",
"enum": [
"success",
"partial",
"unknown",
"failed"
],
"type": "string"
},
"tpOrderId": {
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"builder-code": {
"info": {
"a": "bc_hc2dhq09"
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"a": {
"description": "App builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"s": {
"description": "Service builder codes",
"items": {
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"type": "array"
},
"w": {
"description": "Wallet builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
}
},
"type": "object"
}
},
"offer-receipt": {
"info": {
"offers": [
{
"acceptIndex": 0,
"format": "eip712",
"payload": {
"amount": "10000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "eip155:8453",
"payTo": "0x5bB4B0C766E0D5D791d9403Fc275c22064709F68",
"resourceUrl": "https://x402.ottoai.services/trade-perpetuals",
"scheme": "exact",
"validUntil": 1787958422,
"version": 1
},
"signature": "0xa30f3fcae496a43bed9ae221204a281342a4a136732243328c4e2bd4860da8ad278b88e3a48784c724e441f204b60e45aa9c5ddbdcca217499c503e2b0ea8e9e1b"
},
{
"acceptIndex": 1,
"format": "eip712",
"payload": {
"amount": "10000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "eip155:8453",
"payTo": "0x5bB4B0C766E0D5D791d9403Fc275c22064709F68",
"resourceUrl": "https://x402.ottoai.services/trade-perpetuals",
"scheme": "exact",
"validUntil": 1787958422,
"version": 1
},
"signature": "0xa30f3fcae496a43bed9ae221204a281342a4a136732243328c4e2bd4860da8ad278b88e3a48784c724e441f204b60e45aa9c5ddbdcca217499c503e2b0ea8e9e1b"
}
]
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"offers": {
"items": {
"properties": {
"acceptIndex": {
"type": "integer"
},
"format": {
"type": "string"
},
"payload": {
"properties": {
"amount": {
"type": "string"
},
"asset": {
"type": "string"
},
"network": {
"type": "string"
},
"payTo": {
"type": "string"
},
"resourceUrl": {
"type": "string"
},
"scheme": {
"type": "string"
},
"validUntil": {
"type": "integer"
},
"version": {
"type": "integer"
}
},
"required": [
"version",
"resourceUrl",
"scheme",
"network",
"asset",
"payTo",
"amount"
],
"type": "object"
},
"signature": {
"type": "string"
}
},
"required": [
"format",
"signature"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"offers"
],
"type": "object"
}
},
"payment-identifier": {
"info": {
"required": false
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"maxLength": 128,
"minLength": 16,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"required"
],
"type": "object"
}
}
}Use it
curl
curl "https://x402.ottoai.services/trade-perpetuals" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://x402.ottoai.services/trade-perpetuals");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://x402.ottoai.services/trade-perpetuals")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/202.json, and this resource appears in /discovery/resources and /discovery/search.