{"slug":"agents-204-168-199-108-sslip-io-v1-crypto-swap-quote-801a0e","title":"Exact constant-product (x·y=k) swap maths from pool reserves, so a trading agent","host":"agents.204-168-199-108.sslip.io","method":"GET","resource":"https://agents.204-168-199-108.sslip.io/v1/crypto/swap-quote","category":"code","description":"Exact constant-product (x·y=k) swap maths from pool reserves, so a trading agent can check a quote before it signs: exact-input (amount out) or exact-output (amount in needed), mid vs execution price, price impact %, fee paid, total cost vs mid, min_amount_out / max_amount_in for your slippage, and ","price_listed":0.002,"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":["aws:base","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"amount_in":"10","reserve_in":"1000","reserve_out":"3500000"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"additionalProperties":false,"properties":{"amount_in":{"description":"Exact input amount (or give amount_out)","type":"string"},"amount_out":{"description":"Exact output wanted (instead of amount_in)","type":"string"},"fee_bps":{"description":"Pool fee in basis points (default 30 = 0.3%)","type":"string"},"reserve_in":{"description":"Pool reserve of the token you sell (human units)","type":"string"},"reserve_out":{"description":"Pool reserve of the token you buy (human units)","type":"string"},"slippage_bps":{"description":"Slippage tolerance in bps (default 50 = 0.5%)","type":"string"}},"required":["reserve_in","reserve_out"],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Exact constant-product (x·y=k) swap maths from pool reserves, so a trading agent can check a quote before it signs: exact-input (amount out) or exact-output (amount in needed), mid vs execution price, price impact %, fee paid, total cost vs mid, min_amount_out / max_amount_in for your slippage, and the pool price after the trade. Warns on high impact. Works for Uniswap v2, SushiSwap, PancakeSwap v2, Aerodrome volatile pools. Pure maths, instant.","last_updated":"2026-11-27T17:17:03.386Z","schemes":["exact"]}