tradeBySourceAmount()
The function parameters must include the list of orders (tradeActions) to interact with.
Using the SDK is highly recommended. See Performing Trades for details.
Function tradeBySourceAmount()
This function will trade the exact amount of indicated source tokens for as many target tokens as possible.
Function Arguments
tradeActionamount
needs to follow the relevant token decimal.
tradeBySourceAmount, follows the sourceToken decimals
Example
While all required data is available on-chain, it is recommended to use the Carbon DeFi SDK.
To trade directly with the ETH token, use the contract address: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
Last updated