π€οΈFetch Quote
Requesting the Optimal Execution Route
//Request optimal from WETH on Ethereum Mainnet to Sol on Solana
const quoteParams = {
srcChain: 1, // Ethereum mainnet
destChain: 8453, // Base chain
srcToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
destToken: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', // WBTC
amount: '1000000000000000000', // 1 ETH (in wei)
senderAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
affiliateWallet: '0x123...', // Your affiliate wallet
affiliateFee: '1', // 1% affiliate fee
slippage: 0.5, // 0.5% slippage tolerance
destinationAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
dynamicSlippage: true // Enable dynamic slippage for Solana
};
const quote = await client.fetchQuote(quoteParams);Available parameters
Parameter
Description
Type
Last updated