1Inch
Create DEX swaps using 1Inch
These connectors can be used to utilize 1INCH Dex services; you can calculate gas costs on-chain or calculate orders off-chain to save some gas.
Sell via On-Chain DEXs
Swap tokens from exchanges like kyber, uniswap etc. Calculation is done on-chain, with high gas cost.Copy
Parameter | Type | Description |
| address | The address of the token to buy. |
| address | The address of the token to sell. |
| number | The amount of the token to sell. |
| number | The amount of buyAmt/sellAmt with slippage. |
| number | ID fetches the amount of token to deposit. |
| number | ID stores the amount of token deposited. |
Sell via DEXs with Off-Chain Calculation
Swap tokens from exchanges like kyber, uniswap etc, but with the calculation done off-chain, thus, with a lower gas cost.Copy
Parameter | Type | Description |
| address | The address of the token to buy. |
| address | The address of the token to sell. |
| number | The amount of the token to sell. |
| number | The amount of buyAmt/sellAmt with slippage. |
| array | The distribution of swap across different DEXs. |
| number | To disable a dex. (To disable none: 0) |
| number | ID fetches the amount of token to deposit. |
| number | ID stores the amount of token deposited. |
Sell via On-Chain and Off-Chain Exchanges
Swap tokens from exchanges like kyber, 0x etc, with calculation done off-chain.Copy
Parameter | Type | Description |
| address | The address of the token to buy. |
| address | The address of the token to sell. |
| number | The amount of the token to sell. |
| number | The amount of buyAmt/sellAmt with slippage. |
| number | This is the data from the 1inch API. |
| number | ID fetches the amount of token to deposit. |
| number | ID stores the amount of token deposited. |
Last updated