Get a swap quote with transaction details for executing a token swap across multiple blockchains and DEXs.
chainId (required) — The blockchain identifier (e.g., evm:1, solana, ethereum)tokenIn (required) — Address of the token to swap from (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native tokens)tokenOut (required) — Address of the token to swap to (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native tokens)amount (required if amountRaw not provided) — Human-readable amount of tokenIn to swap (e.g., "1.5" for 1.5 tokens). This will be converted to raw amount by multiplying by 10^decimals.amountRaw (required if amount not provided) — Raw amount as a string (e.g., "1500000" for 1.5 USDC with 6 decimals). This is the exact amount that will be used in the swap without conversion. Must be a positive integer string.walletAddress (required) — Wallet address that will execute the swapslippage (optional) — Maximum acceptable slippage percentage (0-100). Default: 1excludedProtocols (optional) — Comma-separated list of factory addresses to exclude from routing. Can be any factory address.onlyProtocols (optional) — Comma-separated list of tradable pool types to restrict routing to (e.g., uniswap-v2, uniswap-v3, raydium-amm). Only valid tradable pool types will be considered; non-tradable types will be filtered out.poolAddress (optional) — Specific pool address to use for the swaponlyRouters (optional) — Comma-separated list of routers to use for routing (e.g., jupiter, kyberswap, lifi). Only the specified routers will be used for the swap. Supported values: jupiter (Solana), kyberswap (EVM), lifi (EVM)feePercentage (optional) — Fee percentage to charge on the swap (0.01 to 99). Default: 0 (no fee).
feeWallet required - fees go to the protocol.feeWallet.feeWallet (optional, Solana only) — Wallet address to receive fees. Must be a valid Solana wallet address. Only required on Solana when feePercentage is set.amount OR amountRaw must be provided (but not both).
decimals property that determines how many decimal places they support:
amount="1.5" becomes 1500000 raw unitsamount="0.0001" becomes 100000000000000 raw units (1e14)amountRaw="1500000" represents 1.5 USDCamount:
amountRaw:
feeWallet.solana (object, optional) — Solana transaction container
transaction (object) — Transaction details
serialized (string) — Base64 encoded serialized transactionvariant (enum: legacy | versioned) — Transaction variantlastValidBlockHeight (number) — The last block height at which the blockhash used in this transaction is valid. Use this to check if the transaction has expired before sending.estimatedAmountOut (string, optional) — Estimated output amount in tokenOut’s base unitsestimatedSlippage (number, optional) — Estimated slippage percentagerequestId (string) — Unique identifier for tracking this request. Keep this ID and provide it to the Mobula team if you encounter any issues.fee (object, optional) — Fee details (only present if fee was applied)
amount (string) — Fee amount in human-readable formatpercentage (number) — Fee percentage that was appliedwallet (string) — Wallet address receiving the feedeductedFrom (enum: input | output) — Whether fee was deducted from input (buy) or output (sell)error (string, optional) — Error message if the quote failed. If you receive an error, please report it to the Mobula team along with the requestId for faster resolution.0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native tokens (ETH, BNB, MATIC, etc.)So11111111111111111111111111111111111111111 for native SOL (ends with 1) - this is what users typically hold in their walletSo11111111111111111111111111111111111111112 (ends with 2) is Wrapped SOL (WSOL) - only use this if you specifically hold WSOL tokensamount for human-readable amounts (e.g., "1.5" for 1.5 tokens). The API will automatically convert to raw units using the token’s decimals.amountRaw for raw amounts as a string (e.g., "1500000" for 1.5 USDC with 6 decimals). This avoids precision loss and is useful when you already have the raw amount.amount OR amountRaw must be provided, but not both.requestId from the response. In case of any issues or errors, provide this ID to the Mobula team for faster troubleshooting and resolution.jupiter (Solana only), kyberswap (EVM chains), and lifi (EVM chains). You can specify multiple routers by separating them with commas. If not specified, all available routers for the chain will be used.feePercentage and feeWallet must be provided together:
tokenIn is SOL/WSOL → Fee is deducted from input before the swaptokenOut is SOL/WSOL → Fee is deducted from output after the swap (weighted by slippage)requestId for troubleshooting purposesvariant field (legacy or versioned)requestId for troubleshooting purposesevm fieldThe blockchain identifier (e.g., evm:1, solana, ethereum)
Address of the token to swap from (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native tokens)
Address of the token to swap to (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native tokens)
Human-readable amount of tokenIn to swap (e.g., "1.5" for 1.5 tokens). Will be converted to raw amount by multiplying by 10^decimals. Either amount or amountRaw must be provided (but not both).
Raw amount as a string (e.g., "1500000" for 1.5 USDC with 6 decimals). This is the exact amount that will be used in the swap without conversion. Must be a positive integer string. Either amount or amountRaw must be provided (but not both).
Wallet address that will execute the swap
Maximum acceptable slippage percentage (0-100)
Comma-separated list of factory addresses to exclude from routing. Can be any factory address.
Comma-separated list of tradable pool types to restrict routing to (e.g., uniswap-v2, uniswap-v3, raydium-amm). Only valid tradable pool types will be considered; non-tradable types will be filtered out.
Specific pool address to use for the swap