execute_swap
After simulation, execute the token swap via Uniswap V3. Returns a transaction ID for status tracking.
Instructions
Executes a token swap via Uniswap V3. You MUST call simulate_swap first and pass the returned simulation_id here. Returns a transaction_id to track the status with get_transaction_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | No | Chain ID. Default: 1 (Ethereum mainnet). | |
| to_token | Yes | Token to buy. Must match simulate_swap call. | |
| amount_in | Yes | Amount to sell. Must match simulate_swap call. | |
| from_token | Yes | Token to sell. Must match simulate_swap call. | |
| simulation_id | Yes | The simulation_id returned by simulate_swap. Required for safety. | |
| slippage_tolerance | No | Max slippage tolerance in percentage. Example: 0.5 = 0.5%. |