Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint
$ man price-impact

/price-impact(1)

agentutility / edge-market / price-impact
PRICE / CALL
$0.005
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarket
CATEGORY
uncategorized
STATUS
live
NAME
price-impact price-impact / slippage estimator / dex swap size impact / size-keyed quote / depth simulation
SYNOPSIS
POST https://x402.org/v1/price-impact
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

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

Price-impact / slippage estimator / DEX swap size impact / size-keyed quote / depth simulation. For a (from_token, to_token, chain), pulls aggregator quotes (LlamaSwap meta-aggregator, free public) at multiple USD sizes and reports per-size effective price + slippage versus the smallest size. Use to size a fill before submitting it on-chain.

INPUTrequest schema
propertytypedescriptionreq?
from_tokenstring0x-prefixed 20-byte ERC-20 input token.required
to_tokenstring0x-prefixed 20-byte ERC-20 output token.required
chainstringEVM chain. Default 'base'.
enum: base · ethereum · polygon · arbitrum · optimism
optional
sizes_usdarrayUSD sizes to quote at, sorted ascending. Up to 5. Default [100, 1000, 10000].optional
OUTPUTresponse shape
fieldtypedescription
from_tokenstringSource token address (or symbol) being sold in the simulated swap.
to_tokenstringDestination token address (or symbol) being bought in the simulated swap.
chainstringChain the quote is sourced on (e.g. ethereum, base, arbitrum).
from_usd_pricestringSpot USD price of from_token used to convert requested USD sizes into token amounts.
from_decimalsstringERC-20 decimals of from_token, used to scale amounts passed to the aggregator.
quotesstringArray of per-size entries with USD size, effective price, and slippage versus the smallest probe size.
sourcestringAggregator that produced the quotes (LlamaSwap meta-aggregator across DEX routers).
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/price-impact \
  -H 'Content-Type: application/json' \
  -d '{ }'
first response = 402 Payment Required with payment requirements; sign + retry with X-PAYMENT.
EXAMPLE 2 · mcp
# install once
claude mcp add x402 --command "npx x402-deployer-mcp"

# then ask Claude Code:
# "use the price-impact tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
tags
edge-marketdexslippageprice-impactswap-quotedepth-simulationaggregatortrade-sizing
methods
POST
cluster
edgemarket
price
$0.005 USDC per call
ADJACENTother endpoints in edgemarket
endpointdescriptionprice
agent-card-resolveAgent card resolver / ERC-8004 Identity Registry lookup / Trustless Agents / agentId → owner + agentURI / A2A identity / agent.json fetch…$0.005
arbitrage-spreadCross-exchange arbitrage spread / max-min price / CEX price dispersion / spread % calculator.$0.005
basename-resolveBasename resolver / Coinbase Basenames / .base.eth lookup / Base name service / on-chain name resolution.$0.005
defi-yield-poolsDeFi yield pools / APY aggregator / yield-farming opportunities / DeFiLlama yields / cross-protocol APY ranking / stablecoin yields / LP…$0.005
ipfs-fetchIPFS fetch / IPFS gateway / Web3 storage retrieval / NFT metadata fetcher / Filecoin gateway / decentralized content / pinned-content reader.$0.005
safe-multisig-statusSafe multisig status / Gnosis Safe info / Safe owners / Safe threshold / Safe pending queue / DAO treasury wallet / Safe wallet lookup.$0.005
stablecoin-monitorStablecoin monitor.$0.005
stablecoin-pegStablecoin peg monitor / depeg detector.$0.005
SEE ALSO
agentutility(7) · edgemarket(7) · x402(7) · mcp(7) · llms.txt · registry.json · bazaar.x402.org