const result = await sdk.quoteAll({
srcTokenBlockchain: 'ETH',
srcTokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
srcTokenAmount: '1000',
dstTokenBlockchain: 'POLYGON',
dstTokenAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', // USDC
showFailedRoutes: true,
});
// Best route
const best = result.routes[0];
console.log(best.providerType, best.estimate.destinationTokenAmount);
// All routes
result.routes.forEach(route => {
console.log(route.providerType, '→', route.estimate.destinationTokenAmount);
});
// Failed routes (when showFailedRoutes: true)
result.failed?.forEach(fail => {
console.log(fail.providerType, 'failed:', fail.data.reason);
});