Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: YourAITools Perp Check API
version: 1.0.0
description: Pay-per-call tools for AI agents, paid per request in USDC via x402 on Base, Polygon, Arbitrum One or Solana, with each tool's own spec at https://api.youraitools.co//openapi.json.
contact:
email: hello@youraitools.co
url: https://youraitools.co/built-by-us
servers:
- url: https://api.youraitools.co
tags:
- name: PerpCheck
paths:
/perpcheck/v1/lite:
get:
operationId: perp_order_check_lite
summary: 'Hyperliquid pre-trade order check: REJECT_LIKELY / CAUTION / OK with each…'
description: 'Hyperliquid order checker API (pre-trade). 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. Search intents: hyperliquid order check, pre trade check, perp order validation, order size tick check, trading bot safety, hyperliquid rules.'
tags:
- PerpCheck
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.003'
protocols:
- x402: {}
x-x402:
scheme: exact
network: eip155:8453
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
amount: '3000'
assetSymbol: USDC
x402Versions:
- 2
- 1
networks:
- network: eip155:8453
name: Base
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:137
name: Polygon
asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:42161
name: Arbitrum One
asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
name: Solana
asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
symbol: USDC
payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
parameters:
- name: coin
in: query
required: true
schema:
type: string
description: Hyperliquid main-dex perp name, e.g. BTC, ETH, SOL, HYPE, kPEPE
- name: side
in: query
required: true
schema:
type: string
enum:
- long
- short
- buy
- sell
description: long/buy or short/sell
- name: size
in: query
required: false
schema:
type: string
description: Order size in coins, exactly as you would send it (decimals are checked), e.g. 0.001. Give size or notional.
- name: notional
in: query
required: false
schema:
type: number
description: Order value in USD (instead of size), e.g. 100
- name: price
in: query
required: false
schema:
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).
- name: leverage
in: query
required: false
schema:
type: number
description: Leverage, e.g. 10 (default 1)
- name: margin
in: query
required: false
schema:
type: string
enum:
- cross
- isolated
description: cross (default) or isolated
- name: reduceOnly
in: query
required: false
schema:
type: boolean
description: true if the order only reduces a position (exempt from the minimum and OI cap)
responses:
'200':
description: verdict, issues[] {code, msg, fix}, warnings[], rules (szDecimals, price decimals, min notional, max leverage at size, isolated-only), size, notional_usd, confidence, sources_failed. (payment settled)
content:
application/json:
example:
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
'400':
description: Invalid input (never charged)
'402':
description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
'404':
description: Symbol not listed (never charged)
'503':
description: 'Data sources unavailable: upstream_unavailable with sources_failed (never charged)'
post:
operationId: perp_order_check_lite_post
summary: Same as GET, POST {"coin":"BTC","side":"long","size":"0.001","leverage":10}
tags:
- PerpCheck
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.003'
protocols:
- x402: {}
x-x402:
scheme: exact
network: eip155:8453
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
amount: '3000'
assetSymbol: USDC
x402Versions:
- 2
- 1
networks:
- network: eip155:8453
name: Base
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:137
name: Polygon
asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:42161
name: Arbitrum One
asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
name: Solana
asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
symbol: USDC
payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
requestBody:
required: true
content:
application/json:
schema:
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
responses:
'200':
description: verdict, issues[] {code, msg, fix}, warnings[], rules (szDecimals, price decimals, min notional, max leverage at size, isolated-only), size, notional_usd, confidence, sources_failed. (payment settled)
content:
application/json:
example:
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
'400':
description: Invalid input (never charged)
'402':
description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
'404':
description: Symbol not listed (never charged)
'503':
description: 'Data sources unavailable: upstream_unavailable with sources_failed (never charged)'
description: 'Hyperliquid order checker API (pre-trade). Same as GET, POST {"coin":"BTC","side":"long","size":"0.001","leverage":10}. Search intents: hyperliquid order check, pre trade check, perp order validation, order size tick check, trading bot safety, hyperliquid rules.'
/perpcheck/v1/full:
get:
operationId: perp_order_check_full
summary: 'Full Hyperliquid pre-trade check: lite plus isolated liquidation estimate…'
description: 'Hyperliquid pre-trade risk check API. Full pre-trade check of a Hyperliquid perp order: everything in lite (verdict, rule issues with fixes) plus the isolated liquidation price and distance, taker impact and average fill from the live L2 book for market orders, funding carry per day (who pays), mark/oracle premium, open interest and size vs 24 h volume. Read-only; never places or signs orders. Fail-closed. Not financial advice; the exchange decides whether an order is accepted. Search intents: liquidation price calculator, slippage estimate, hyperliquid pre trade, funding cost, perp order risk, market impact.'
tags:
- PerpCheck
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.01'
protocols:
- x402: {}
x-x402:
scheme: exact
network: eip155:8453
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
amount: '10000'
assetSymbol: USDC
x402Versions:
- 2
- 1
networks:
- network: eip155:8453
name: Base
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:137
name: Polygon
asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:42161
name: Arbitrum One
asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
name: Solana
asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
symbol: USDC
payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
parameters:
- name: coin
in: query
required: true
schema:
type: string
description: Hyperliquid main-dex perp name, e.g. BTC, ETH, SOL, HYPE, kPEPE
- name: side
in: query
required: true
schema:
type: string
enum:
- long
- short
- buy
- sell
description: long/buy or short/sell
- name: size
in: query
required: false
schema:
type: string
description: Order size in coins, exactly as you would send it (decimals are checked), e.g. 0.001. Give size or notional.
- name: notional
in: query
required: false
schema:
type: number
description: Order value in USD (instead of size), e.g. 100
- name: price
in: query
required: false
schema:
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).
- name: leverage
in: query
required: false
schema:
type: number
description: Leverage, e.g. 10 (default 1)
- name: margin
in: query
required: false
schema:
type: string
enum:
- cross
- isolated
description: cross (default) or isolated
- name: reduceOnly
in: query
required: false
schema:
type: boolean
description: true if the order only reduces a position (exempt from the minimum and OI cap)
responses:
'200':
description: Lite fields plus liquidation {estimate_isolated, distance_pct}, execution {mid, spread_bps, est_avg_fill, est_impact_bps, book_depth_covered}, funding {hourly_rate, apr_pct, est_cost_per_day_usd, direction}, market {mark, oracle, premium_bps, open_interest_usd, day_volume_usd, size_vs_day_volume_pct}. (payment settled)
content:
application/json:
example:
coin: BTC
side: long
order_type: market
size: 0.001
notional_usd: 81.27
leverage: 10
margin: cross
reduce_only: false
verdict: OK
issues: []
warnings: []
rules:
szDecimals: 5
price_max_decimals: 1
price_max_sig_figs: 5
min_notional_usd: 10
max_leverage: 40
max_leverage_at_size: 40
only_isolated: false
liquidation:
estimate_isolated: 74072.5
distance_pct: 8.86
note: 'cross margin: the real liquidation price depends on your whole account; this is the isolated-equivalent worst case'
execution:
mid: 81274.5
spread_bps: 0.12
est_avg_fill: 81275
est_impact_bps: 0.06
book_depth_covered: 1
book_time: 1792783206472
funding:
hourly_rate: 1.25e-05
apr_pct: 10.95
est_cost_per_day_usd: 0.0244
direction: you pay
market:
mark: 81274
oracle: 81279.6
premium_bps: -0.69
open_interest_usd: 3634646602
day_volume_usd: 1978449099
size_vs_day_volume_pct: 0
confidence: high
sources_failed: []
checked_at: '2026-10-23T19:20:07.089Z'
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: full
'400':
description: Invalid input (never charged)
'402':
description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
'404':
description: Symbol not listed (never charged)
'503':
description: 'Data sources unavailable: upstream_unavailable with sources_failed (never charged)'
post:
operationId: perp_order_check_full_post
summary: Same as GET, POST {"coin":"BTC","side":"long","size":"0.001","leverage":10}
tags:
- PerpCheck
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.01'
protocols:
- x402: {}
x-x402:
scheme: exact
network: eip155:8453
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
amount: '10000'
assetSymbol: USDC
x402Versions:
- 2
- 1
networks:
- network: eip155:8453
name: Base
asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:137
name: Polygon
asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: eip155:42161
name: Arbitrum One
asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
symbol: USDC
payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
- network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
name: Solana
asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
symbol: USDC
payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
requestBody:
required: true
content:
application/json:
schema:
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
responses:
'200':
description: Lite fields plus liquidation {estimate_isolated, distance_pct}, execution {mid, spread_bps, est_avg_fill, est_impact_bps, book_depth_covered}, funding {hourly_rate, apr_pct, est_cost_per_day_usd, direction}, market {mark, oracle, premium_bps, open_interest_usd, day_volume_usd, size_vs_day_volume_pct}. (payment settled)
content:
application/json:
example:
coin: BTC
side: long
order_type: market
size: 0.001
notional_usd: 81.27
leverage: 10
margin: cross
reduce_only: false
verdict: OK
issues: []
warnings: []
rules:
szDecimals: 5
price_max_decimals: 1
price_max_sig_figs: 5
min_notional_usd: 10
max_leverage: 40
max_leverage_at_size: 40
only_isolated: false
liquidation:
estimate_isolated: 74072.5
distance_pct: 8.86
note: 'cross margin: the real liquidation price depends on your whole account; this is the isolated-equivalent worst case'
execution:
mid: 81274.5
spread_bps: 0.12
est_avg_fill: 81275
est_impact_bps: 0.06
book_depth_covered: 1
book_time: 1792783206472
funding:
hourly_rate: 1.25e-05
apr_pct: 10.95
est_cost_per_day_usd: 0.0244
direction: you pay
market:
mark: 81274
oracle: 81279.6
premium_bps: -0.69
open_interest_usd: 3634646602
day_volume_usd: 1978449099
size_vs_day_volume_pct: 0
confidence: high
sources_failed: []
checked_at: '2026-10-23T19:20:07.089Z'
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: full
'400':
description: Invalid input (never charged)
'402':
description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
'404':
description: Symbol not listed (never charged)
'503':
description: 'Data sources unavailable: upstream_unavailable with sources_failed (never charged)'
description: 'Hyperliquid pre-trade risk check API. Same as GET, POST {"coin":"BTC","side":"long","size":"0.001","leverage":10}. Search intents: liquidation price calculator, slippage estimate, hyperliquid pre trade, funding cost, perp order risk, market impact.'
/perpcheck/v1/preview:
get:
operationId: perpcheck_preview
summary: 'Free: verdict, issue and warning codes, confidence and sources_failed (no…'
security: []
parameters:
- name: coin
in: query
required: true
schema:
type: string
description: Hyperliquid main-dex perp name, e.g. BTC, ETH, SOL, HYPE, kPEPE
- name: side
in: query
required: true
schema:
type: string
enum:
- long
- short
- buy
- sell
description: long/buy or short/sell
- name: size
in: query
required: false
schema:
type: string
description: Order size in coins, exactly as you would send it (decimals are checked), e.g. 0.001. Give size or notional.
- name: notional
in: query
required: false
schema:
type: number
description: Order value in USD (instead of size), e.g. 100
- name: price
in: query
required: false
schema:
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).
- name: leverage
in: query
required: false
schema:
type: number
description: Leverage, e.g. 10 (default 1)
- name: margin
in: query
required: false
schema:
type: string
enum:
- cross
- isolated
description: cross (default) or isolated
- name: reduceOnly
in: query
required: false
schema:
type: boolean
description: true if the order only reduces a position (exempt from the minimum and OI cap)
responses:
'200':
description: OK
'400':
description: Invalid input
'429':
description: Free tier rate limit
'503':
description: Data sources unavailable
tags:
- PerpCheck
components:
securitySchemes:
creditsKey:
type: http
scheme: bearer
description: yatc_... credits key