swap
Exchange tokens through a DEX aggregator with built-in fee. Non-custodial, using your private key.
Instructions
Swap tokens via a DEX aggregator with our built-in fee; non-custodial.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gas | No | Gas limit. | |
| chain | No | Which chain family to act on. | evm |
| nonce | Yes | Account nonce for this transaction. | |
| chain_id | No | EVM chain id (137 = Polygon). | |
| buy_token | Yes | Token address to buy. | |
| sell_token | Yes | Token address to sell. | |
| private_key | Yes | The caller's own private key. Used transiently to sign; never stored (non-custodial). | |
| sell_amount | Yes | Amount of sell_token (base units). | |
| fee_recipient | No | Optional address to receive the integrator fee. | |
| max_fee_per_gas | Yes | EIP-1559 max fee per gas (wei). | |
| max_priority_fee_per_gas | Yes | EIP-1559 priority fee per gas (wei). |