BlockchainLive

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 runs before it commits a trade.

$0.092USDC per call · settled on Base · no subscription, no API key

Overview

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.

Endpoint

MethodEndpointPriceDescription
POST/v1/marketplace/api/swap-preflight-check$0.092Invoke Swap Preflight Check (Blockchain) and return the upstream response.

How to call it

Requests are paid per call over the x402 protocol. Call the endpoint, receive a 402 Payment Required quote, then repeat the request with the signed payment header. The SDKs do both steps for you.

# 1. Ask for a quote
curl -i -X POST https://api.jarvisclaw.ai/v1/marketplace/api/swap-preflight-check \
  -H 'Content-Type: application/json' \
  -d '{}'

# 2. Pay it (the SDK signs and retries for you)
curl -X POST https://api.jarvisclaw.ai/v1/marketplace/api/swap-preflight-check \
  -H 'Content-Type: application/json' \
  -H 'X-PAYMENT: <signed-payload>' \
  -d '{}'
Open in the marketplace

Docs: Getting started · x402 payments · x402 discovery · All APIs