Swap Quote
Get a token swap quote based on an input or output value.
Last updated
Get a token swap quote based on an input or output value.
Last updated
Below are the two methods to get a quote for a swap from a given route using JSON-RPC or REST-API:
⛽ No gas cost
Get the output amounts from a given input amount and a swap route.
Function name: getAmountsOut
uint amountIn
The input token amount in its smallest unit
address[] path
An ordered list of token EVM addresses
Resources:
⛽ No gas cost
Get the input amounts from a given output amount and a swap route.
Function name: getAmountsIn
uint amountOut
The output token amount in its smallest unit
address[] path
An ordered list of token EVM addresses
Resources: