data.evm. See the Swap Quoting page for the full input parameters.
Native sentinel
tokenIn / tokenOut for the chain’s native token (ETH on Ethereum/L2s, BNB on BNB Chain, MATIC on Polygon, AVAX on Avalanche, …). The router wraps/unwraps automatically.
Supported chains
Full list of integer chain IDs: see
MOBULA_CHAIN_MAP in the chains package.
Request
Send output to another address
SetrecipientAddress when the taker and output recipient differ. walletAddress still supplies tokenIn, signs the transaction, pays gas, and owns any required token allowance; MobulaRouter sends the final tokenOut amount to recipientAddress.
Sell the entire ERC-20 balance
SetsellEntireBalance=true for deposit or relay flows where the exact balance is not known when requesting the quote. You must still provide exactly one of amount or amountRaw: it is used to select the route and calculate the absolute minimum output, while MobulaRouter reads and sells the walletAddress balance at execution time.
tokenInmust be an ERC-20 token. Native-token input is rejected.- Use a realistic estimate: if the execution-time balance differs materially, the route and absolute minimum output are still based on the quoted amount.
- The allowance granted to
approvalAddressmust cover the complete balance present at execution. - The target chain must run MobulaRouter v2.19.0 or later, and the API must find a Mobula route.
onlyRouters,onlyProtocols, and aggregator fallback are incompatible; the API returns an error rather than silently selling only the estimated amount.
Response — data.evm
data.evm.transaction fields
Signing
/swap/send call needed for EVM (the call goes straight from the user’s wallet to their RPC).
Routing
All EVM swaps go through MobulaRouter, deployed identically on each supported chain. Under the hood it dispatches to the best aggregator (KyberSwap, NAOS, Li.Fi) — pick one explicitly viaonlyRouters or let the API choose. DEX filtering (Uniswap V2/V3/V4, Curve, Balancer, PancakeSwap, Aerodrome, Velodrome, Sushi, …) via onlyProtocols / excludedProtocols.
Limits
- Approvals required for any non-native sell token. Always check
approvals[]and execute first. - Gas estimation —
gasLimitis a router-level upper bound. Wallets typically simulate to tighten. - Address case — both lowercased and EIP-55 checksummed accepted on input.