transaction_same_chain_swap
Swap tokens on the same blockchain by specifying input token, amount, output token, recipient, and slippage tolerance. Optionally set affiliate fee and priority level to control trade execution.
Instructions
Create a same-chain token swap transaction via deBridge
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainId | Yes | Chain ID (native or deBridge internal) | |
| tokenIn | Yes | Input token address | |
| tokenInAmount | Yes | Amount in smallest units | |
| tokenOut | Yes | Output token address | |
| tokenOutRecipient | Yes | Address on the source chain to receive target tokens | |
| slippage | No | Slippage tolerance or 'auto' | |
| tokenOutAmount | No | Expected output amount or 'auto' | |
| affiliateFeePercent | No | Affiliate fee percentage | |
| affiliateFeeRecipient | No | Wallet address to receive affiliate fees | |
| senderAddress | No | Transaction submitter address | |
| srcChainPriorityLevel | No | Priority level: 'normal' or 'aggressive' (default: 'normal') |