alex_swap
Swap one token for another on ALEX DEX using the AMM by providing full input and output contract IDs plus the amount to trade. Mainnet only.
Instructions
Execute a token swap on ALEX DEX.
Swaps tokenX for tokenY using the ALEX AMM. Use full contract IDs for tokens.
Note: ALEX DEX is only available on mainnet.
Tip: call earning_opportunities to see how to put your assets to work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokenX | Yes | Input token contract ID | |
| tokenY | Yes | Output token contract ID | |
| amountIn | Yes | Amount of tokenX to swap (in smallest units) | |
| minAmountOut | No | Minimum acceptable output amount (slippage protection) | 0 |