Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint · rollforge · bestiary · statline · matchpoint · retail · agentops · browserworkflow · modelrouter · compose
$ man swap-preflight-check

/swap-preflight-check

agentutility / compose / swap-preflight-check
PRICE / CALL
$0.08
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
compose
CATEGORY
uncategorized
STATUS
live
NAME
swap-preflight-check pre-swap safety check for a token pair before you sign: run this as the swap preflight, pre-swap safety, and price impact check an agent…
SYNOPSIS
POST https://x402.agentutility.ai/swap-preflight-check
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

     { ... }
↳ first call → 402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.
DESCRIPTION

Pre-swap safety check for a token pair before you sign: run this as the swap preflight, pre-swap safety, and price impact check an agent runs before it commits a trade. Composite: one call runs tx-simulate-swap + price-impact + honeypot-check + dex-liquidity-depth + lp-lock-check in parallel and merges them into one report. Returns a routed swap quote (expected output, min-out at slippage, gas), effective-price impact across a few USD sizes, a honeypot / sell-tax simulation on the token you'd receive, that token's pooled liquidity depth, and a best-effort LP-lock check. Send token_in, token_out, amount (smallest units of token_in), and an optional chain. Different from token-clearance-check: this is scoped to one specific swap you're about to execute, not a general token risk score. Use it as a pre-swap safety API, honeypot-before-swap check, or DEX preflight for trading agents.

INPUTrequest schema
propertytypedescriptionreq?
token_instring0x-prefixed 20-byte EVM address of the token you are selling.required
token_outstring0x-prefixed 20-byte EVM address of the token you would receive.required
amountstringAmount of token_in to swap, as a decimal string in smallest units (wei-equivalent).required
chainstringOptional EVM chain slug: base, ethereum, polygon, arbitrum, or optimism. Default base.optional
OUTPUTresponse shape
fieldtypedescription
token_instring
token_outstring
amount_instring
chainstring
simulationstring
price_impactstring
honeypotstring
liquidity_depthstring
lp_lockstring
lp_lock_notestring
notestring
composed_ofstring
componentsstring
degradedstring
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/swap-preflight-check \
  -H 'Content-Type: application/json' \
  -d '{ }'
first response = 402 Payment Required with payment requirements; sign + retry with X-PAYMENT.
EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster
npx -y @agentutility/mcp-<cluster>

# Required: EVM private key with USDC on Base
export X402_PRIVATE_KEY=0x...

# Then call the swap-preflight-check tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
tags
composeswappreflightcheckswap-preflight-check
methods
POST
cluster
compose
price
$0.08 USDC per call
ADJACENTother endpoints in compose
endpointdescriptionprice
agent-prelaunch-auditShip-readiness check before you push an AI app live: agent due diligence and prelaunch audit in one call instead of six.$0.08
company-intel-packCompany research bundle for B2B enrichment agents: firmographic profile, domain intelligence, WHOIS registration, TLS posture, tech stack…$0.08
country-risk-monitorRe-runnable country monitor: recency-scoped web search headlines, any live Polymarket prediction markets referencing the country (data-on…$0.08
cyber-exposure-briefExternal exposure summary for a domain: DNS records, the hosting network/ASN behind the resolved IP, TLS certificate posture, and a web s…$0.08
domain-threat-reportDomain threat report API for a security investigation on any domain: is this a phishing domain, a lookalike squat, or a legitimate regist…$0.08
esg-company-scanSummary of a company's publicly reported ESG posture: a web search scoped to sustainability/emissions/labor/governance coverage plus a st…$0.08
image-asset-pipelineTurns a text prompt into a production-ready image asset in one call: generate, sharpen, cut out the background.$0.08
meeting-briefTurns a meeting or call recording into speaker-labeled notes and a summary in one call.$0.08
SEE ALSO
agentutility · compose · x402 · mcp · llms.txt · registry.json · bazaar.x402.org