/tools/pre_trade_check/callPre-trade risk check for AI agents trading crypto: live orderbook slippage at YOUR size, side-aware funding carry, open-interest crowding, and optional contract security — composed into a single ok/caution/avoid verdict with per-factor reasons and raw data embedded. Answers 'is this trade sane?' before trading, not after. Replaces four API integrations plus the judgment layer.
{
"properties": {
"parameters": {
"properties": {
"side": {
"description": "Trade direction (funding carry is side-aware; default long)",
"enum": [
"long",
"short"
],
"type": "string"
},
"size_usd": {
"description": "Intended position size in USD (drives the slippage check; default 10000)",
"type": "number"
},
"symbol": {
"description": "Asset to check, e.g. 'ETH', 'BTC', 'SOL'",
"type": "string"
},
"token_address": {
"description": "Optional ERC-20 address — adds a GoPlus security scan",
"type": "string"
}
},
"required": [
"symbol"
],
"type": "object"
}
},
"type": "object"
}{
"factors": {
"carry": {
"level": "ok",
"median_funding_pct": 0.01,
"reason": "carry unremarkable"
},
"crowding": {
"level": "ok",
"long_short_ratio": 1.2,
"reason": "positioning unremarkable"
},
"liquidity": {
"level": "ok",
"reason": "fills within 0.001% of best price",
"slippage_pct": 0.001
},
"security": {
"level": "skipped",
"reason": "no token_address provided"
}
},
"side": "long",
"size_usd": 50000,
"symbol": "ETH",
"verdict": "ok"
}