v2
latestOpenAPI 3.1.02026-07-316132736.5 KBGet swap quote with transaction details
Get a swap quote with optimized routing across multiple DEXs and liquidity sources. Returns estimated output amount, slippage, and a serialized transaction ready to be signed. Either amount (human-readable) or amountRaw (raw amount as string) must be provided, but not both.
Query parameters
Mobula chain id. EVM: evm:<integer> (e.g. evm:1, evm:8453, evm:42161). Solana: solana:solana. TON: ton:mainnet or ton:testnet.
Mobula chain id. EVM: evm:<integer> (e.g. evm:1, evm:8453, evm:42161). Solana: solana:solana. TON: ton:mainnet or ton:testnet.
Sell token address. Native identifiers — EVM: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (EIP-7528). Solana native SOL: So11111111111111111111111111111111111111111. Use wrapped SOL / WSOL mint So11111111111111111111111111111111111111112 only when swapping WSOL token-account balance. TON: EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c.
Sell token address. Native identifiers — EVM: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (EIP-7528). Solana native SOL: So11111111111111111111111111111111111111111. Use wrapped SOL / WSOL mint So11111111111111111111111111111111111111112 only when swapping WSOL token-account balance. TON: EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c.
Buy token address. Same native identifier rules as tokenIn.
Buy token address. Same native identifier rules as tokenIn.
Human-readable amount (e.g. "1.5" for 1.5 tokens). Converted server-side: raw = amount × 10^decimals. Mutually exclusive with amountRaw.
Human-readable amount (e.g. "1.5" for 1.5 tokens). Converted server-side: raw = amount × 10^decimals. Mutually exclusive with amountRaw.
Raw amount as a digit-only string (e.g. "1500000" for 1.5 USDC at 6 decimals). Use this when you already have the bigint to avoid float precision loss. Mutually exclusive with amount.
Raw amount as a digit-only string (e.g. "1500000" for 1.5 USDC at 6 decimals). Use this when you already have the bigint to avoid float precision loss. Mutually exclusive with amount.
Slippage tolerance in % (0-100, default 1). Quote rejects if expected output drops below this threshold.
Slippage tolerance in % (0-100, default 1). Quote rejects if expected output drops below this threshold.
Optional market impact guard in %. If the computed marketImpactPercentage is greater than this value, the quote is rejected with HTTP 400.
User wallet address — recipient of tokenOut, signer for the broadcast tx, fee context.
User wallet address — recipient of tokenOut, signer for the broadcast tx, fee context.
EVM only. When true, MobulaRouter v2.19.0+ sells the taker’s entire ERC20 tokenIn balance at execution time; amountRaw/amount is used only to select the route and calculate the minimum output. Requires a Mobula route and is refused on aggregator routes.
EVM only. When true, MobulaRouter v2.19.0+ sells the taker’s entire ERC20 tokenIn balance at execution time; amountRaw/amount is used only to select the route and calculate the minimum output. Requires a Mobula route and is refused on aggregator routes.
DEX-level deny list (CSV). Example: pump-amm,raydium.
DEX-level allow list (CSV). Example: uniswap-v3,uniswap-v4.
Pin routing to a single pool (e.g. when you want a specific Uniswap V3 fee tier).
Pin routing to a single pool (e.g. when you want a specific Uniswap V3 fee tier).
Aggregator filter (CSV) — jupiter, kyberswap, lifi, naos. Omit to let the API pick.
Aggregator filter (CSV) — jupiter, kyberswap, lifi, naos. Omit to let the API pick.
Solana only. auto, low, medium, high, veryHigh, or microLamports per CU as a number string.
Solana only. auto, low, medium, high, veryHigh, or microLamports per CU as a number string.
Solana only. true for dynamic CU limit, or a fixed integer (default 400 000).
Solana only. true for dynamic CU limit, or a fixed integer (default 400 000).
Solana only. Jito tip in lamports — adds a transfer to one of the Jito tip accounts for fast landing.
Solana only. Jito tip in lamports — adds a transfer to one of the Jito tip accounts for fast landing.
Caller referral fee in % (0-99). Mobula skims a 20% platform cut off the top. Requires feeWallet.
Wallet that receives the caller referral fee. Required when feePercentage > 0.
Wallet that receives the caller referral fee. Required when feePercentage > 0.
Minimum caller referral fee in native-token units. Currently honored on TON native-input swaps; requires feeWallet.
Solana only. Mint of a token in which to charge a flat MINIMUM fee (paired with minFeesTokenRaw). Charged via a separate transfer to feeWallet, independent of the swap route. Requires feeWallet.
Solana only. Mint of a token in which to charge a flat MINIMUM fee (paired with minFeesTokenRaw). Charged via a separate transfer to feeWallet, independent of the swap route. Requires feeWallet.
Solana only. Raw amount (smallest unit) of feeToken to charge as a flat minimum fee. The swap reverts if the user lacks balance.
Solana only. Fee abstraction — wallet that signs/pays for the tx (separate from walletAddress).
Solana only. Fee abstraction — wallet that signs/pays for the tx (separate from walletAddress).
Solana only. true returns N candidate transactions over a durable nonce — race them across landers (Jito, Nozomi, 0slot). Only one commits.
Solana only. true returns N candidate transactions over a durable nonce — race them across landers (Jito, Nozomi, 0slot). Only one commits.
Per-lander tip when multiLander=true. Defaults to each lander's minimum.
Per-lander tip when multiLander=true. Defaults to each lander's minimum.
Response
Swap quoting response
Example response
{
"data": {
"amountOutTokens": "245.123",
"slippagePercentage": 1,
"amountInUSD": 200.45,
"amountOutUSD": 199.87,
"marketImpactPercentage": 0.04,
"poolFeesPercentage": 0.25,
"tokenIn": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"logo": "https://metadata.mobula.io/assets/logos/evm_8453_0x8335…"
},
"tokenOut": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"logo": "https://metadata.mobula.io/assets/logos/evm_8453_0x8335…"
},
"details": {
"route": {
"hops": [
{
"tokenIn": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"logo": "https://metadata.mobula.io/assets/logos/evm_8453_0x8335…"
},
"tokenOut": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"logo": "https://metadata.mobula.io/assets/logos/evm_8453_0x8335…"
},
"amountInTokens": "1.0",
"amountOutTokens": "245.1",
"exchange": "Raydium",
"poolType": "CLMM",
"feePercentage": 0.25,
"feeBps": 25
}
],
"totalFeePercentage": 0.25,
"aggregator": "jupiter"
}
},
"fee": {
"amount": "0.001",
"percentage": 0.5,
"wallet": "0xCALLER…",
"deductedFrom": "input"
},
"solana": {
"transaction": {
"serialized": "AQABAuObQ8Adqk1eqZxRMJg4r6vGtXq9k0...base64...",
"variant": "versioned"
},
"lastValidBlockHeight": 269450123
}
}
}