Build
Frontend Tutorials
toolkit
Function.getquote

@zetachain/toolkit / getQuote

getQuote(this, inputAmount, inputToken, outputToken): Promise<object>

Retrieves a quote for swapping input ZRC20 token to output ZRC20 token.

this: ZetaChainClient

inputAmount: string

The amount of input ZRC20 token.

inputToken: string

outputToken: string

Promise<object>

  • An object containing the output amount and its decimals.

amount

amount: any

decimals

decimals: any = outputDecimals

getQuote.ts:144 (opens in a new tab)