Multiple Swap Aggregator
Get Multiple Swap Router
To find best route for swap
const quoter = new AggregatorQuoter('mainnet');
const singleQuoteQueryParams: SingleQuoteQueryParams = {
tokenIn: '0x2::sui::SUI',
tokenOut: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN',
amountIn: '1000000000',
includeSources: null, //optional
excludeSources: null, //optional
commission: null, //optional, and will be explain later
maxHops: null, //optional: default and max is 3
splitDistributionPercent: null, //optional: default 1 and max 100
excludePools: null, //optional: list pool you want excude example: 0xpool1,0xpool2
};
const multipleQuoteQueryParams: SingleQuoteQueryParams[] = [singleQuoteQueryParams, singleQuoteQueryParams2]
const routes = await quoter.getMultipleRoutes(multipleQuoteQueryParams);Build Transaction for multiple aggregator swap
Normal case if you want fast swap
Return coin for later use
Commission
Last updated
Was this helpful?

