Contract ID: SaucerSwapV2QuoterV2
Get output quote from exact input amount
Get the output amount from a given exact input amount and a swap route. Function name:quoteExactInput
No gas cost — read-only call.
The data passed to the ‘path’ parameter follows this format: [token, fee, token, fee, token, …], with each ‘token’ in the route being 20 bytes long and each ‘fee’ being 3 bytes long. Example,
0x0001F4 for a 0.05% fee.Code overview
- JSON RPC
- REST API
Get input quote from exact output amount
Get the input amount from a given exact output amount and a swap route. Function name:quoteExactOutput
No gas cost — read-only call.
The data passed to the ‘path’ parameter follows this format: [token, fee, token, fee, token, …], but reversed (i.e. the first token in the array should be output token), with each ‘token’ in the route being 20 bytes long and each ‘fee’ being 3 bytes long. Example,
0x000BB8 for a 0.30% fee.Code overview
- JSON RPC
- REST API
Next steps
Swap tokens for tokens (V2)
Execute the swap you just quoted.
Fetch all pools (V2)
Find pool fee tiers to build the quote path.
Contract deployments
QuoterV2 and SwapRouter IDs for mainnet and testnet.