{"slug":"saylorinnovations-com-api-defi-price-impact-7a2dce","title":"Constant product swap output, execution price, price impact, minimum received an","host":"saylorinnovations.com","method":"GET","resource":"https://saylorinnovations.com/api/defi/price-impact","category":"code","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.","price_listed":0.01,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":0,"reported_payers_30d":0,"networks":["eip155:137","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"amount_in":"50","fee_percent":"0.3","reserve_in":"2000","reserve_out":"7000000"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"properties":{"amount_in":{"description":"amount you sell","type":"string"},"fee_percent":{"description":"optional pool fee, default 0.3","type":"string"},"reserve_in":{"description":"pool reserve of the token you sell","type":"string"},"reserve_out":{"description":"pool reserve of the token you buy","type":"string"}},"required":["reserve_in","reserve_out","amount_in"],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"properties":{"amount_in":{"description":"Amount sold","type":"number"},"amount_out":{"description":"Amount received after fee and price impact","type":"number"},"execution_price":{"description":"Average price actually received","type":"number"},"fee_paid_in_input":{"description":"Pool fee taken from the input","type":"number"},"minimum_received":{"description":"Output after applying the slippage tolerance","type":"number"},"note":{"description":"Plain-language caveat about how to read and use the result","type":"string"},"price_after_trade":{"description":"Pool price after the trade","type":"number"},"price_impact_percent":{"description":"Price movement caused by the trade, excluding the fee","type":"number"},"size_vs_reserve_percent":{"description":"Trade size as a percent of the input reserve","type":"number"},"slippage_tolerance_percent":{"description":"Tolerance used for the minimum received","type":["number","null"]},"source":{"description":"Where the data or formula comes from","type":"string"},"spot_price":{"description":"Pool price before the trade (output per input)","type":"number"},"total_cost_percent":{"description":"Shortfall versus spot including price impact and fee","type":"number"},"trade_size_for_1_percent_impact":{"description":"Input amount that moves the price about 1%","type":"number"},"trade_size_for_5_percent_impact":{"description":"Input amount that moves the price about 5%","type":"number"}},"required":["amount_out","price_impact_percent"],"type":"object"},"type":{"const":"json","type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Constant product swap output, execution price, price impact, minimum received and the trade size that moves the price 1% or 5%, from pool reserves.","last_updated":"2026-10-20T14:45:38.91Z","schemes":["exact"]}