← Market

X402 · Pre Trade Check

Pre-trade check of a perpetual-futures order against the caller's own rules: each rule passes or fails with its numbers, then GO / CAUTION / WAIT with machine-readable reasons. Adds isolated liquidation distance per venue and whether it hits before the stop, fees, accuracy needed to break even over the hold, funding by venue and the market regime. Informational only: places no orders and holds no funds.

POST https://api.algovault.com/x402/pre_trade_check

0.02 USDC on Base · payTo 0x778A05280Fd8dB980E920fE9f31d0A8eAbD17d59

Status: verified · payable

Operator badge: embed this endpoint's live status badge — it reads "Verified Payable" only while the probe record backs it.

Settlement: direct to the seller's payTo — 0% HIVE402 take

Payment routes

Base · 0.02 USDC · payTo 0x778A05280Fd8dB980E920fE9f31d0A8eAbD17d59 · via cdp · settles direct
Optimism · 0.02 USDC · payTo 0x11447b963c1408E7c84868314eF2fe9304768717 · via cdp · settles direct
{
  "coin": "BTC",
  "holdHours": 8,
  "side": "long",
  "sizeUsd": 10000
}
{
  "best_venue": {
    "capacity_usd": 11661490.66,
    "est_cost_bps": 11,
    "est_cost_usd": 11,
    "exchange": "BINANCE"
  },
  "coin": "BTC",
  "decision": "GO",
  "hold_hours": 8,
  "reasons": [],
  "regime": {
    "confidence": 46,
    "label": "TRENDING_UP",
    "source_exchange": "BINANCE",
    "timeframe": "4h"
  },
  "rule_version": 2,
  "side": "long",
  "size_usd": 10000,
  "timeframe": "4h"
}

Script Master Labs LLC · SDVOSB · Kinston, NC · Terms · Refunds · Privacy · Contact

SML network: ScriptMasterLabs — the main site · SML Dual Market — the human storefront · VA Ratings — VA disability ratings, free for veterans

Agent intel trust badge

Trust score65 / 100 · breakdown
Probe uptime (30d)100.0% over 1 probes · daily
Avg 402 latency521 ms
Paid calls (30d, on-chain)0 calls · 0 buyers
Facilitator-reported (30d)2 calls · 2 payers (CDP Bazaar)

How to call

POST https://api.algovault.com/x402/pre_trade_check · input in body · spec from live-challenge

Input schema
{
  "type": "object",
  "properties": {
    "coin": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20,
      "description": "Asset symbol, e.g. BTC, ETH, SOL."
    },
    "side": {
      "type": "string",
      "enum": [
        "long",
        "short"
      ],
      "description": "Direction of the order you intend to place: long or short."
    },
    "sizeUsd": {
      "type": "number",
      "maximum": 100000000,
      "exclusiveMinimum": 0,
      "description": "Order notional in USD, e.g. 10000."
    },
    "holdHours": {
      "type": "number",
      "minimum": 0.25,
      "maximum": 720,
      "default": 8,
      "description": "Expected holding time in hours (default 8); sets the funding cost window."
    },
    "timeframe": {
      "type": "string",
      "enum": [
        "1h",
        "4h",
        "1d"
      ],
      "default": "4h",
      "description": "Market-regime timeframe: 1h, 4h or 1d (default 4h)."
    },
    "exchanges": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "HL",
          "BINANCE",
          "BYBIT",
          "OKX",
          "BITGET",
          "ASTER",
          "BINGX",
          "GATE",
          "HTX",
          "KUCOIN",
          "MEXC",
          "PHEMEX",
          "WHITEBIT",
          "XT",
          "WEEX"
        ]
      },
      "minItems": 1,
      "maxItems": 15,
      "uniqueItems": true,
      "description": "Only compare these venues (default: every supported venue)."
    },
    "leverage": {
      "type": "number",
      "minimum": 1,
      "maximum": 200,
      "description": "Isolated leverage you will use, e.g. 10. Enables the liquidation checks."
    },
    "stopPct": {
      "type": "number",
      "minimum": 0.01,
      "maximum": 50,
      "description": "Stop-loss distance from entry in percent, e.g. 2."
    },
    "targetPct": {
      "type": "number",
      "minimum": 0.01,
      "maximum": 1000,
      "description": "Target distance from entry in percent, e.g. 4."
    },
    "equityUsd": {
      "type": "number",
      "maximum": 10000000000,
      "exclusiveMinimum": 0,
      "description": "Account equity in USD. Enables the percent-of-equity rules."
    },
    "orderType": {
      "type": "string",
      "enum": [
        "market",
        "limit"
      ],
      "default": "market",
      "description": "market (taker entry) or limit (maker entry). Default market."
    },
    "rules": {
      "type": "object",
      "properties": {
        "maxLeverage": {
          "type": "number",
          "minimum": 1,
          "maximum": 200,
          "description": "Highest leverage you allow."
        },
        "noLiqBeforeStop": {
          "type": "boolean",
          "description": "Fail if liquidation would come before your stop. Default on."
        },
        "minLiqDistanceSigma": {
          "type": "number",
          "minimum": 0,
          "maximum": 50,
          "description": "Liquidation at least this many hold-period volatilities away."
        },
        "maxLossAtStopPctEquity": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Most equity, in percent, you accept losing at your stop."
        },
        "maxDailyMovePctEquity": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Largest equity swing, in percent, from a one-sigma daily move."
        },
        "maxRoundTripBps": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000,
          "description": "Highest round trip in fees plus spread, in bps."
        },
        "maxAccuracyNeededPct": {
          "type": "number",
          "minimum": 50,
          "maximum": 100,
          "description": "Highest direction accuracy, in percent, needed to break even."
        },
        "maxFundingBps": {
          "type": "number",
          "minimum": 0,
          "maximum": 10000,
          "description": "Highest funding over the hold, in bps. Default 10."
        },
        "maxSizePctOf24hVolume": {
          "type": "number",
          "maximum": 100,
          "exclusiveMinimum": 0,
          "description": "Largest order as a percent of a venue's 24h volume. Default 0.1."
        },
        "regimeCheck": {
          "type": "boolean",
          "description": "Flag a regime against your side or a volatile one. Default on."
        }
      },
      "additionalProperties": false,
      "description": "Your rules, each key optional. Saved rules apply too; a failed one returns WAIT."
    }
  },
  "required": [
    "coin",
    "side",
    "sizeUsd"
  ],
  "additionalProperties": false
}
Output schema
{
  "type": "object"
}
curl -i -X POST 'https://api.algovault.com/x402/pre_trade_check' \
  -H 'content-type: application/json' -d '{"coin":"BTC","side":"long","sizeUsd":10000,"holdHours":8}'

Agents: POST https://hive402.scriptmasterlabs.com/mcp → route_task / proxy_call · SDK /sdk/hive402.mjs

Try it (your wallet signs; HIVE402 never holds funds)