82trust / 100
Pre Trade Check Call
by AgentPay Pre-Trade Risk Check in Markets & finance
x402 APIPassing, checked 1 h ago
Pre-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.
POST https://agentpay.tools/tools/pre_trade_check/call
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 369 ms typical, 391 ms slowest 5%
- Last check
- 1 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agentpay.tools/tools/pre_trade_check/call" \
-H "content-type: application/json" \
-d '{"parameters":{"side":"long","size_usd":50000,"symbol":"ETH"}}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagentpay.tools%2Ftools%2Fpre_trade_check%2Fcall
const res = await pay("https://agentpay.tools/tools/pre_trade_check/call", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"parameters":{"side":"long","size_usd":50000,"symbol":"ETH"}}),
});
console.log(await res.json());Example input
{
"parameters": {
"side": "long",
"size_usd": 50000,
"symbol": "ETH"
}
}Example output
{
"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"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 347 ms | $0.01 |
| 4 h ago | Passed | 402 | 700 ms | $0.01 |
| 7 h ago | Passed | 402 | 369 ms | $0.01 |
| 12 h ago | Passed | 402 | 391 ms | $0.01 |