Swap Quote
Get a token swap quote based on an input or output value.
Below are the two methods to get a quote for a swap from a given route using JSON-RPC or REST-API:
Contract ID: SaucerSwapV1RouterV3
When providing HBAR in the path array, use the wrapped HBAR token ID (WHBAR).
Get Output Quote from Input Amount
⛽ No gas cost
Get the output amounts from a given input amount and a swap route.
Function name: getAmountsOut
Parameter Name
Description
uint amountIn
The input token amount in its smallest unit
address[] path
An ordered list of token EVM addresses
Code Overview
Get Input Quote from Output Amount
⛽ No gas cost
Get the input amounts from a given output amount and a swap route.
Function name: getAmountsIn
Parameter Name
Description
uint amountOut
The output token amount in its smallest unit
address[] path
An ordered list of token EVM addresses
Code Overview
Last updated