dex_tx_swap_quote
Returns swap route and pricing. Call before swap_prepare; show result to user before proceeding. → transfer_preview for direct token send (not exchange).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Human-readable amount of source token to swap, e.g. "0.001" for 0.001 BNB, "1" for 1 USDT. Do NOT convert to smallest unit (wei/lamports). Obtained directly from user's chat message. | |
| slippage | Yes | Slippage tolerance as decimal ratio: 0.01 = 1%, 0.03 = 3%. Valid range: 0.001 (0.1%) to 0.499 (49.9%). If the user already specified slippage, use it directly. Only ask to confirm when not provided. Default: 0.03 (3%). | |
| token_in | Yes | Source token contract address. Use "-" for native coins (ETH, BNB, MATIC, etc.). For ERC20/BEP20 tokens, provide the full contract address (e.g. 0x55d398326f99059ff775485246999027b3197955 for BSC USDT). Obtain from user input, wallet token list (wallet_get_token_list), or known token mappings. If native_in=1, this field will be auto-set to "-". | |
| mcp_token | No | MCP session token obtained from login (dex_auth_google_login_poll or dex_auth_gate_login_poll). MUST be provided in every call to this tool after login; omitting it will result in 403 | |
| native_in | Yes | ⚠️ CRITICAL — Must be set correctly, wrong value causes transaction failure or fund loss. Simply check: is token_in a native/gas coin? If yes, set 1; if it's a contract token, set 0. Native coins: ETH, BNB, MATIC, AVAX, SOL — these are the chain's gas coins, native_in=1. Contract tokens: USDT, USDC, WETH, WBNB, DAI, etc. — these are ERC20/BEP20/SPL tokens, native_in=0. NOTE: BNB = native coin (native=1), WBNB = wrapped contract token (native=0). User saying 'BNB' means the native coin unless they explicitly say 'WBNB'. Same for ETH vs WETH, SOL vs WSOL. When native_in=1, token_in is auto-normalized to '-'. | |
| to_wallet | No | Destination chain receiving address. ONLY required for CROSS-CHAIN swaps where chain_id_in and chain_id_out belong to different address groups (e.g. EVM→Solana or Solana→EVM). Obtain from dex_wallet_get_addresses: use addresses["SOL"] if dest is Solana, addresses["EVM"] if dest is EVM. Omit for single-chain swaps — defaults to user_wallet. | |
| token_out | Yes | Destination token contract address. Use "-" for native coins. For ERC20/BEP20 tokens, provide the full contract address. Obtain from user input, wallet_get_token_list, or known token mappings. If native_out=1, this field will be auto-set to "-". For cross-chain swaps, use the token's contract address on the destination chain. | |
| native_out | Yes | ⚠️ CRITICAL — Must be set correctly, wrong value causes transaction failure or fund loss. Simply check: is token_out a native/gas coin? If yes, set 1; if it's a contract token, set 0. Native coins: ETH, BNB, MATIC, AVAX, SOL — these are the chain's gas coins, native_out=1. Contract tokens: USDT, USDC, WETH, WBNB, DAI, etc. — these are ERC20/BEP20/SPL tokens, native_out=0. NOTE: BNB = native coin (native=1), WBNB = wrapped contract token (native=0). User saying 'BNB' means the native coin unless they explicitly say 'WBNB'. Same for ETH vs WETH, SOL vs WSOL. When native_out=1, token_out is auto-normalized to '-'. CROSS-CHAIN EXAMPLE: USDT(BSC) → SOL(Solana): native_in=0 (USDT is contract token), native_out=1 (SOL is native coin). CROSS-CHAIN EXAMPLE: ETH(Ethereum) → USDT(BSC): native_in=1 (ETH is native coin), native_out=0 (USDT is contract token). | |
| chain_id_in | Yes | Source chain ID. Use well-known IDs: ETH=1, BSC=56, Polygon=137, Arbitrum=42161, Base=8453, Avalanche=43114, Solana=501. Only call dex_chain_config for uncommon/unknown chains. For single-chain swap, must equal chain_id_out. | |
| user_wallet | Yes | User's wallet address matching the SOURCE CHAIN. CRITICAL: You MUST use the chain-specific address — call dex_wallet_get_addresses(account_id) first, then use addresses["EVM"] for EVM chains (ETH/BSC/Polygon/Arbitrum/Base/Avalanche) or addresses["SOL"] for Solana (chain_id=501). NEVER pass an EVM address (0x...) for Solana transactions or vice versa. For cross-chain swaps this is the FROM (source) chain address. | |
| chain_id_out | Yes | Destination chain ID. Use same well-known IDs as chain_id_in. For single-chain swap, set equal to chain_id_in. For cross-chain swap, set to the target chain's ID. |