{"uid":"cap_QlCrIIsXSPMqSWC8lUud1","slug":"logicnodes-swap-price-impact-calculator-87021bbc","name":"LogicNodes Swap Price Impact Calculator","description":"Exact answers for AI agents: 40+ tools for EVM chains and Aptos, gas on 14 chains, never a guess. Free tier; pay per call in USDC (x402) on 13 networks.","url":"https://logicnodes.io/paid/v1/tools/swap_price_impact?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"feeBps":{"type":"integer","maximum":10000,"minimum":0},"amountIn":{"type":"string"},"reserveIn":{"type":"string"},"reserveOut":{"type":"string"}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"swap_price_impact"}},"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_PMTys6YS6HdrK8RiiRSQM","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":"Calculates the price impact percentage of a token swap given input amount and liquidity pool reserves, accounting for swap fees.","exampleAgentPrompt":"What's the price impact if I swap 500 tokens into a pool with 100,000 tokens on the input side and 80,000 on the output side, with a 30 basis point fee?","exampleUseCases":[{"title":"Pre-trade slippage check for DEX bot","prompt":"Before I execute this swap, calculate the price impact: I'm putting in 2000 USDC into a pool with 500,000 USDC reserve and 250 ETH reserve, with a 30 bps fee. Is this safe to proceed?"},{"title":"Optimal trade size for large order","prompt":"I want to keep my price impact under 1%. If the pool has 1,000,000 tokens on each side and the fee is 25 basis points, tell me what the price impact would be if I swap 10,000 tokens in."},{"title":"Arbitrage opportunity viability check","prompt":"Check the price impact for an arbitrage trade: I'm swapping 5000 tokens into a pool with 200,000 input reserve and 150,000 output reserve, fee is 30 basis points — is the impact small enough to make the arb profitable?"}],"resultDescription":"Returns a JSON object indicating success (ok: true) and the computed price impact result for the swap, representing how much the trade shifts the effective price relative to the pool's current spot price given the input amount, reserves, and fee.","failureModes":["Invalid or zero reserve values causing division errors","amountIn exceeding available liquidity","feeBps outside 0-10000 range","Missing required fields returning validation error","Extremely large amountIn relative to reserves producing >100% impact edge cases"],"whenToPreferThis":"Choose this endpoint when you need a precise, deterministic on-chain AMM price impact calculation for EVM-compatible constant-product pools before executing or simulating a swap. Prefer this over manual calculation when accuracy is critical for trade safety or arbitrage viability checks. Ideal for DeFi agents that need to validate trade sizes programmatically without connecting to a live RPC node.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:32:11.138Z","isFirstParty":false,"canonicalSlug":"logicnodes-swap-price-impact-calculator-87021bbc"}