{"uid":"cap_kFT4Ve_2KyZqytJdYDcyj","slug":"saylor-innovations-defi-price-impact-calculator-acab91ce","name":"Saylor Innovations DeFi Price Impact Calculator","description":"Constant product swap output, execution price, price impact, minimum received and the trade size that moves the price 1% or 5%, from pool reserves.","url":"https://saylorinnovations.com/api/defi/price-impact?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["reserve_in","reserve_out","amount_in"],"properties":{"amount_in":{"type":"string","description":"amount you sell"},"reserve_in":{"type":"string","description":"pool reserve of the token you sell"},"fee_percent":{"type":"string","description":"optional pool fee, default 0.3"},"reserve_out":{"type":"string","description":"pool reserve of the token you buy"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["amount_out","price_impact_percent"],"properties":{"note":{"type":"string","description":"Plain-language caveat about how to read and use the result"},"source":{"type":"string","description":"Where the data or formula comes from"},"amount_in":{"type":"number","description":"Amount sold"},"amount_out":{"type":"number","description":"Amount received after fee and price impact"},"spot_price":{"type":"number","description":"Pool price before the trade (output per input)"},"execution_price":{"type":"number","description":"Average price actually received"},"minimum_received":{"type":"number","description":"Output after applying the slippage tolerance"},"fee_paid_in_input":{"type":"number","description":"Pool fee taken from the input"},"price_after_trade":{"type":"number","description":"Pool price after the trade"},"total_cost_percent":{"type":"number","description":"Shortfall versus spot including price impact and fee"},"price_impact_percent":{"type":"number","description":"Price movement caused by the trade, excluding the fee"},"size_vs_reserve_percent":{"type":"number","description":"Trade size as a percent of the input reserve"},"slippage_tolerance_percent":{"type":["number","null"],"description":"Tolerance used for the minimum received"},"trade_size_for_1_percent_impact":{"type":"number","description":"Input amount that moves the price about 1%"},"trade_size_for_5_percent_impact":{"type":"number","description":"Input amount that moves the price about 5%"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VkCLJeAU370dnw5PXc972","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes constant-product AMM swap output, execution price, price impact, minimum received, and the trade size that moves the pool price by 1% or 5%, given pool reserves.","exampleAgentPrompt":"I'm about to swap 10,000 USDC in a pool that has 500,000 USDC as reserve_in and 300 ETH as reserve_out — what's the price impact, execution price, amount I'll receive, and how big a trade would move the price by 1%? Use the default 0.3% fee.","exampleUseCases":[{"title":"Pre-trade slippage check for large swap","prompt":"Before I swap 50,000 USDC into ETH on this pool — reserve_in is 1,000,000 USDC, reserve_out is 600 ETH, fee is 0.3% — tell me my price impact, the amount of ETH I'll get, and what my execution price will be."},{"title":"Finding safe trade size limits","prompt":"I want to keep my price impact under 1% when trading against a pool with 2,000,000 DAI reserve_in and 1,200 WBTC reserve_out. What's the maximum amount I can sell before I hit 1% price impact? Use 0.3% fee."},{"title":"Comparing pool fee tiers on swap outcome","prompt":"Compare the output and price impact of swapping 5,000 USDC in a pool with 800,000 USDC reserve_in and 400 ETH reserve_out at a 0.05% fee versus the default 0.3% fee — how much more ETH do I get with the lower fee tier?"}],"resultDescription":"Returns a JSON object with: amount received after fee and price impact, spot price before trade, execution price, price after trade, fee paid in input tokens, price impact percent, total cost percent (impact + fee), size vs reserve percent, minimum received after slippage tolerance, and trade sizes that would move the pool price by 1% and 5%, plus a plain-language note and data source attribution.","failureModes":["Missing required parameters (reserve_in, reserve_out, amount_in) returns an error","Non-numeric or zero reserve values may cause division-by-zero or invalid computation","Extremely large amount_in relative to reserves may produce degenerate or near-100% price impact results","Invalid fee_percent values outside expected range may produce unexpected results"],"whenToPreferThis":"Use this endpoint when you need constant-product AMM (Uniswap x*y=k formula) swap math computed server-side without connecting to a blockchain node — ideal for pre-trade analysis, UI slippage previews, or agent workflows that need price impact data quickly from raw pool reserve numbers without on-chain calls.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:51:39.881Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-defi-price-impact-calculator-acab91ce"}