TWAP
const twap = new TWAPSwap({
amountIn: units.inBNETH("1"),
tokenIn: weth,
tokenOut: matic,
slippage: new Slippage(.5, false),
timeWindowSeconds: 86400,
priceRange: {
basePrice: new Price({
inAmount: units.inBNETH("1"),
inToken: weth,
outAmount: units.inBNETH("2000"),
outToken: matic
}),
upperBoundPercent: 5
},
customizations: {
dexFilters: {
include: [MainnetDexFilter.SushiSwap]
}
}
});maxNumberRounds Warning
Price Range
Last updated
Was this helpful?