fetchSwapQuote
See the full code here.
fetchSwapQuote( params: SwapParams, maxGroupSize?: number, feeBps?: number | bigint, referrer?: string,): Promise<SwapQuote>
Returns
Returns a Promise
that, when resolved, provides a SwapQuote
object which contains the following fields:
interface SwapQuote { quoteAmount: bigint; priceImpact: number; microalgoTxnsFee: number; txnPayload: string;}
Parameters
# The set of parameters used for executing the swapparams: SwapParams# The maximum group size of the txn (min 3, max 16)maxGroupSize?: number# The fee percentage expressed as fixed percentage of input amount (4 d.p)feeBps?: number | bigint# The referral address of the protocol using Folks Routerreferrer?: string