b70d36b7002b
Find optimal route between tokens (direct routes, zaps)
Query parameters
Chain ID of the network to execute the transaction on
Ethereum address of the wallet to send the transaction from
Routing strategy to use
Controls how quote is built based on execution mode
Flag that indicates if gained tokenOut should be sent to EOA
Ethereum address of the receiver of the tokenOut
Ethereum address of the spender of the tokenIn
Ethereum address of the receiver of any dust tokens that might be produced during the execution of actions
Amount of tokenIn to swap in wei
[ "1000000000000000000" ]
Minimum amount out in wei. If specified, slippage should not be specified
Slippage in basis points (1/10000). e.g. 50 = 0.50%. If specified, minAmountOut should not be specified
Fee in basis points per amountIn. Use 1-100. All-zero fees are ignored. Collection is on the source chain unless a cross-chain route sets destinationFeeReceiver.
[ "100" ]
The Ethereum address that receives the source-chain fee and remains the fallback when destination collection does not apply. Required if fee is provided.
Optional destination-chain fee receiver. For a cross-chain route with destination execution, the requested fee is collected atomically from the delivered bridge asset on the destination chain. Otherwise feeReceiver remains the source-chain receiver.
A list of swap aggregators to be ignored from consideration
A list of standards to be ignored from consideration
A list of bridges to be ignored from consideration
Controls cross-chain route complexity. direct uses only a bridge, source allows routing before the bridge, destination allows routing after the bridge, sourceOrDestination allows routing on either chain but not both, and full allows routing on both chains
Referral code that will be included in an on-chain event.
Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
[ "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ]
Ethereum address of the token to swap to. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
[ "0x6b175474e89094c44da98b954eedeac495271d0f" ]
Chain ID of the network to bridge to and receive tokenOut
Response
Example response
{
"metadata": {
"bridgeRefundAssets": [
{
"token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"recipient": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"symbol": "USDC"
}
]
},
"route": [
{
"via": "cctp-forwarder"
}
]
}