{"slug":"1gateway-dev-v1-onchain-swap-quote-c9107f","title":"Use when an agent needs a swap quote and price impact before trading","host":"1gateway.dev","method":"GET","resource":"https://1gateway.dev/v1/onchain/swap/quote","category":"market","description":"Use when an agent needs a swap quote and price impact before trading. Input: chain (base, ethereum, arbitrum), from, to (ticker like USDC, ETH or 0x address), amounts (1-5 sizes in from-token units). Output: JSON per size best venue (Uniswap v3 fee tier, Uniswap v2, Aerodrome), amount out, effective","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":2,"reported_payers_30d":1,"networks":["eip155:137","eip155:143","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"amounts":"1000,100000","chain":"base","from":"USDC","to":"ETH"},"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":{"amounts":{"description":"1-5 trade sizes in units of the from token, comma-separated (alias amount)","maxLength":120,"pattern":"^\\d{1,15}(\\.\\d{1,18})?(,\\d{1,15}(\\.\\d{1,18})?){0,4}$","type":"string"},"chain":{"description":"Chain (default base)","enum":["base","ethereum","arbitrum"],"type":"string"},"from":{"description":"Token sold: ticker (USDC, USDT, ETH/WETH, BTC/cbBTC/WBTC, wstETH, DAI, AERO, ARB… per chain) or 0x …","maxLength":42,"pattern":"^(0x[0-9a-fA-F]{40}|[A-Za-z]{2,8})$","type":"string"},"to":{"description":"Token bought (same format)","maxLength":42,"pattern":"^(0x[0-9a-fA-F]{40}|[A-Za-z]{2,8})$","type":"string"}},"required":["from","to","amounts"],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":true,"properties":{"asOf":{"type":"string"},"cache":{"type":"string"},"chain":{"type":"string"},"from":{"additionalProperties":true,"properties":{"decimals":{"type":"integer"},"symbol":{"type":"string"},"token":{"type":"string"}},"type":"object"},"method":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"quotes":{"items":{"additionalProperties":true,"properties":{"amountIn":{"type":"integer"},"best":{"additionalProperties":true,"type":"object"},"venues":{"type":"array"}},"type":"object"},"type":"array"},"spotPrice":{"type":"number"},"spotPriceUnit":{"type":"string"},"to":{"additionalProperties":true,"properties":{"decimals":{"type":"integer"},"symbol":{"type":"string"},"token":{"type":"string"}},"type":"object"}},"required":["chain","from","to","spotPrice","spotPriceUnit","quotes","asOf","cache","method","notes"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Use when an agent needs a swap quote and price impact before trading. Input: chain (base, ethereum, arbitrum), from, to (ticker like USDC, ETH or 0x address), amounts (1-5 sizes in from-token units). Output: JSON per size best venue (Uniswap v3 fee tier, Uniswap v2, Aerodrome), amount out, effective price, price impact %, all venue quotes, spot price. Quote only: no calldata, nothing executed. Example: ?from=USDC&to=ETH&amounts=1000,100000","last_updated":"2026-11-23T00:52:50.272Z","schemes":["exact"]}