Endpoint
Query Parameters
The amount of input tokens in wei format. For tokens with 18 decimals, multiply the amount by 10^18.Example:
"1000000000000000000"
for 1 ETHThe address of the input token.Example:
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
for ETHThe address of the output token.Example:
"0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
for USDCIf true, the amount parameter represents the desired output amount instead of input amount.
Default:
false
If true, only direct swaps between the input and output tokens will be considered.
Default:
false
Array of protocol names to exclude from routing.
Default:
[]
Response
Indicates if the request was successful.
Type of swap route
Details about the input token.
Details about the output token.
The estimated amount of output tokens in wei format.
Estimated gas cost for the swap in wei.
Estimated gas cost in USD.
Array of route segments with detailed swap information.