Quotes
let quote = sdk.quote.getQuote({
tokenIn, //WETH
tokenOut, //MATIC,
amountIn: ethers.utils.parseUnits("20", tokenIn.decimals),
slippagePercent: .5,
//optionally set max rounds for the quote
//maxRounds: 10,
//optionall set a max fixed gas price to apply to the quote fees
//maxFixedGas: ethers.utils.parseUnits("10", 9)
});quote = sdk.quote.get_quote(
token_in=token_in, # WETH
token_out=token_out, # MATIC,
amount_in=dexible.common.as_units(20, token_in.decimals),
slippage_percent=.5,
## optionally set max rounds for the quote
# max_rounds=10,
## optionall set a max fixed gas price to apply to the quote fees
# max_fixed_gas=dexible.common.as_units(10, 9)
){
id: 13,
tokenIn: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
tokenOut: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
amountInPerRound: '20000000000000000000',
amountOutPerRound: '41162692560851345024700',
maxNetOutput: '41162576735049726266880',
minNetOutput: '40956418895145987335127',
networkId: 1,
rounds: 1,
costPercentage: 0.0016816710779981633,
minTotalFees: 68914601737519830000,
maxTotalFees: 69120759577423570000,
expires: '2021-07-12T22:06:54.687Z'
}Last updated