{"uid":"cap_0S1o9b3EbMHDyLua208Az","slug":"delx-commerce-amm-price-impact-calculator-bps-5402e96c","name":"Delx Commerce — AMM Price Impact Calculator (BPS)","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/amm-price-impact-bps?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fee_bps":{"type":"integer","description":"Input field: fee bps."},"amount_in":{"type":"integer","description":"Input field: amount in."},"reserve_in":{"type":"integer","description":"Input field: reserve in."},"reserve_out":{"type":"integer","description":"Input field: reserve out."}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-amm-price-impact-bps/v1","amount_in":50,"amount_out":47.48297375815593,"impact_bps":530.0902708124378}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_j4DWQBgmJBckOLwuzXBE0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the price impact in basis points for a trade on an Automated Market Maker (AMM), given input amount, reserves, and fee.","exampleAgentPrompt":"What's the price impact in basis points if I swap 50 tokens into a pool with 10000 reserve_in and 10000 reserve_out, with a 30 bps fee?","exampleUseCases":[{"title":"Pre-trade slippage check for DeFi bot","prompt":"Before my trading bot submits a swap of 200 tokens on a pool with 50000 reserve_in, 48000 reserve_out, and 30 bps fee, tell me the price impact in basis points so I can decide if it's too high."},{"title":"Liquidity depth analysis for a DEX pool","prompt":"I want to understand how liquid this pool is — calculate the price impact in bps if someone trades 1000 tokens in, given reserve_in of 80000, reserve_out of 75000, and a 25 bps fee."},{"title":"Optimal trade size optimizer","prompt":"Help me find the right trade size — what's the AMM price impact in basis points for swapping 500 tokens into a pool with 20000 reserve_in and 18000 reserve_out at a 30 bps fee?"}],"resultDescription":"Returns the computed amount_out (tokens received after fees) and impact_bps (price impact expressed in basis points, e.g. 530 bps = 5.3% slippage), along with the schema identifier and the input amount for verification.","failureModes":["Missing required fields (amount_in, reserve_in, reserve_out, fee_bps) returns validation error","Zero or negative reserve values may cause division-by-zero or undefined behavior","Payment not provided or insufficient USDC results in 402 Payment Required response","Extremely large input amounts relative to reserves may produce unrealistically high impact values"],"whenToPreferThis":"Use this endpoint when you need a fast, verifiable, pay-per-use computation of AMM price impact without setting up your own on-chain simulation or running a full DEX SDK. Ideal for AI agents that need to pre-screen trades for excessive slippage before executing, or analyze pool liquidity depth on the fly. Prefer this over custom implementations when you want deterministic, formula-based results with no signup overhead and USDC micropayment billing via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:47.042Z","isFirstParty":false,"canonicalSlug":"delx-commerce-amm-price-impact-calculator-bps-5402e96c"}