Optional
options?: { A Promise resolving to an object containing the taken amount, spend amount and result of the calculation.
import { getExpectedOutput } from '@clober/v2-sdk'
const { takenAmount, spentAmount } = await getExpectedOutput({
chainId: 421614,
inputToken: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
outputToken: '0x0000000000000000000000000000000000000000',
amountIn: '1000.123', // spend 1000.123 USDC
})
Calculates the expected output for a given input amount, based on the provided market data.