x402-perpcheck / tree / src/examples.js ยท raw (this view has old GitHub links rewritten for the mirror; raw is byte-exact)
// Example outputs for the discovery declaration, OpenAPI and landing page (recorded 2026-10-23T19:20:07.089Z from the live public Hyperliquid info API).
export const LITE_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"};
export const FULL_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":0.0000125,"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"};

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