pretrade_check
Evaluate token risk before trading: get a prescriptive block, caution, or allow decision and a clamped max exposure based on your risk policy and trade size.
Instructions
Pre-trade firewall: returns a prescriptive block | caution | allow
decision plus a clamped max_suggested_exposure_usd, given a token, a
trade size, and the agent's risk policy.
Costs $0.01 USDC on Base via x402 (same price as scan_token). Returns
a signed JSON report when the deployment has signing configured — the
signature and key_fingerprint fields prove what RugGuard said at the
moment of trade, verifiable offline via the rugguard-verify CLI
(pip install rugguard-verify) or against GET /v1/pubkey.
Args:
chain: base or solana.
address: Token contract address (EVM 0x… or Solana base58).
intended_trade_usd: Trade size in USD. Used to clamp the returned
max_suggested_exposure_usd. Must be > 0 and ≤ $1B.
policy: Agent risk tolerance. One of:
- conservative — block at medium_risk or worse (score ≥ 51)
- balanced — block at high_risk or worse (score ≥ 71) [default]
- aggressive — block at critical only (score ≥ 91)
An uncertain verdict (sparse data) returns caution in all
modes — absence of evidence is not evidence of safety.
Returns:
On success: {
scan_id, chain, contract,
policy_recommendation: block | caution | allow,
policy, risk_score: 0-100, verdict, confidence,
reason: [{code, severity}, ...], # top 3 flags
max_suggested_exposure_usd: float, # 100% if allow, 20% if caution, 0 if block
intended_trade_usd, scanned_at, disclaimer,
signature, key_fingerprint # null when signing is unconfigured
}
On failure: {error, message}. Same error codes as scan_token.
Disclaimer integrity: the disclaimer field is inside the signed bytes.
Stripping or rewriting it breaks signature verification by design — a
downstream proxy that drops the disclaimer will cause rugguard-verify
to reject the report. That is the point.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | ||
| policy | No | balanced | |
| address | Yes | ||
| intended_trade_usd | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||