Request a Quote
Request a quote for a swap (amount, route, and pricing).
Last updated
import { RoutingEngineSDK } from 'routing-engine-sdk';
const sdk = new RoutingEngineSDK({
api: { apiKey: 'your-api-key' },
});
try {
const response = await sdk.quote.request({
fromChain: 'arbitrum',
toChain: 'avax',
tokenIn: 'TBTC',
tokenOut: 'WETH',
network: 'mainnet',
amount: '100.00',
slippageBps: 75,
recipient: '0x1234567890123456789012345678901234567890',
});
console.log('Quote ID:', response.data.quoteId);
console.log('First route:', response.data.routes[0]?.routeId);
} catch (error) {
console.error(error);
}