youraitools-api / tree / public/aiax/sections/perpcheck.json ยท raw (this view has old GitHub links rewritten for the mirror; raw is byte-exact)
{
 "aiax_version": "0.1",
 "section_id": "perpcheck",
 "purpose": "PerpCheck: Pre-trade check of a Hyperliquid perp order before you send it: REJECT_LIKELY / CAUTION / OK, each exchange-rule issue with a fix value (size decimals, price tick, $10 minimum, max leverage by margin tier, isolated-only, OI cap, delisted, far-from-mark limit), warnings and the coin rules. Read-only; never places or signs orders. Fail-closed: a failed source is listed, never OK. Not financial advice; the exchange decides whether an order is accepted.",
 "inputs": {
  "type": "object",
  "properties": {
   "coin": {
    "type": "string",
    "description": "Hyperliquid main-dex perp name, e.g. BTC, ETH, SOL, HYPE, kPEPE"
   },
   "side": {
    "type": "string",
    "enum": [
     "long",
     "short",
     "buy",
     "sell"
    ],
    "description": "long/buy or short/sell"
   },
   "size": {
    "type": "string",
    "description": "Order size in coins, exactly as you would send it (decimals are checked), e.g. 0.001. Give size or notional."
   },
   "notional": {
    "type": "number",
    "description": "Order value in USD (instead of size), e.g. 100"
   },
   "price": {
    "type": "string",
    "description": "Limit price exactly as you would send it (tick rule is checked). Omit for a market order (then taker impact is estimated from the L2 book)."
   },
   "leverage": {
    "type": "number",
    "description": "Leverage, e.g. 10 (default 1)"
   },
   "margin": {
    "type": "string",
    "enum": [
     "cross",
     "isolated"
    ],
    "description": "cross (default) or isolated"
   },
   "reduceOnly": {
    "type": "boolean",
    "description": "true if the order only reduces a position (exempt from the minimum and OI cap)"
   }
  },
  "required": [
   "coin",
   "side"
  ]
 },
 "outputs": {
  "type": "object",
  "properties": {
   "coin": {
    "type": "string"
   },
   "side": {
    "type": "string"
   },
   "order_type": {
    "type": "string"
   },
   "size": {
    "type": "number"
   },
   "notional_usd": {
    "type": "number"
   },
   "leverage": {
    "type": "integer"
   },
   "margin": {
    "type": "string"
   },
   "reduce_only": {
    "type": "boolean"
   },
   "verdict": {
    "type": "string"
   },
   "issues": {
    "type": "array",
    "items": {
     "type": "object",
     "properties": {
      "code": {
       "type": "string"
      },
      "msg": {
       "type": "string"
      }
     }
    }
   },
   "warnings": {
    "type": "array",
    "items": {
     "type": "object",
     "properties": {
      "code": {
       "type": "string"
      },
      "msg": {
       "type": "string"
      }
     }
    }
   },
   "rules": {
    "type": "object",
    "properties": {
     "szDecimals": {
      "type": "integer"
     },
     "price_max_decimals": {
      "type": "integer"
     },
     "price_max_sig_figs": {
      "type": "integer"
     },
     "min_notional_usd": {
      "type": "integer"
     },
     "max_leverage": {
      "type": "integer"
     },
     "max_leverage_at_size": {
      "type": "integer"
     },
     "only_isolated": {
      "type": "boolean"
     }
    }
   },
   "confidence": {
    "type": "string"
   },
   "sources_failed": {
    "type": "array",
    "items": {}
   },
   "checked_at": {
    "type": "string"
   },
   "disclaimer": {
    "type": "string"
   },
   "tier": {
    "type": "string"
   }
  }
 },
 "pricing": {
  "model": "per_call",
  "amount": "0.003",
  "currency": "USDC",
  "rail": "x402"
 },
 "examples": [
  {
   "description": "GET /perpcheck/v1/lite, paid over x402 (USDC on Base); an unpaid call answers 402 with the terms.",
   "request": {
    "method": "GET",
    "url": "https://api.youraitools.co/perpcheck/v1/lite",
    "query": {
     "coin": "BTC",
     "side": "long",
     "size": "0.001",
     "leverage": 10
    }
   },
   "response": {
    "coin": "ETH",
    "side": "long",
    "order_type": "limit",
    "size": 0.0012,
    "notional_usd": 3.7,
    "leverage": 60,
    "margin": "cross",
    "reduce_only": false,
    "verdict": "REJECT_LIKELY",
    "issues": [
     {
      "code": "min_notional",
      "msg": "order value $3.70 is below Hyperliquid's $10 minimum"
     },
     {
      "code": "size_decimals",
      "msg": "size has 7 decimals; this coin allows 4 (szDecimals)",
      "fix": 0.0012
     },
     {
      "code": "price_tick",
      "msg": "price has 3 decimals; max for this coin is 2",
      "fix": 3000.1
     },
     {
      "code": "leverage",
      "msg": "leverage 60x is above the 25x maximum for this coin at $4 notional",
      "fix": 25
     }
    ],
    "warnings": [
     {
      "code": "marketable_limit",
      "msg": "limit buy above mark by 25.37%: fills immediately as taker"
     }
    ],
    "rules": {
     "szDecimals": 4,
     "price_max_decimals": 2,
     "price_max_sig_figs": 5,
     "min_notional_usd": 10,
     "max_leverage": 25,
     "max_leverage_at_size": 25,
     "only_isolated": false
    },
    "confidence": "high",
    "sources_failed": [],
    "checked_at": "2026-10-23T19:20:07.798Z",
    "disclaimer": "Not financial advice; the exchange decides whether an order is accepted. PerpCheck is a read-only pre-trade check: it never places, signs or holds orders, has no custody and never asks for keys.",
    "tier": "lite"
   }
  }
 ],
 "pact_mandate_template": null,
 "extensions": {
  "youraitools": {
   "endpoint": "https://api.youraitools.co/perpcheck/v1/lite",
   "network": "eip155:8453",
   "x402_versions": [
    2,
    1
   ],
   "mcp": "https://api.youraitools.co/perpcheck/mcp",
   "openapi": "https://api.youraitools.co/perpcheck/openapi.json"
  }
 }
}

agentgate-source: code mirror on Cloudflare Pages. All repos