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:
Contract ID: SaucerSwapV1RouterV3
When providing HBAR in the path array, use the wrapped HBAR token ID (WHBAR).
⛽ No gas cost
Get the output amounts from a given input amount and a swap route.
Function name: getAmountsOut
Parameter Name | Description |
---|---|
⛽ No gas cost
Get the input amounts from a given output amount and a swap route.
Function name: getAmountsIn
Parameter Name | Description |
---|---|
uint amountIn
The input token amount in its smallest unit
address[] path
An ordered list of token EVM addresses
uint amountOut
The output token amount in its smallest unit
address[] path
An ordered list of token EVM addresses