Skip to main content
Single endpoint, same shape as Solana / TON. The EVM-specific calldata sits under data.evm. See the Swap Quoting page for the full input parameters.

Native sentinel

Standard EIP-7528 placeholder — use this 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

Set recipientAddress 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.
This works with Mobula routes and supported aggregator routes. Use a valid, non-zero EVM address. For native-token output, a contract recipient must be able to receive the chain’s native currency.

Sell the entire ERC-20 balance

Set sellEntireBalance=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.
  • tokenIn must 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 approvalAddress must 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

The wallet broadcasts directly — no /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 via onlyRouters 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 estimationgasLimit is a router-level upper bound. Wallets typically simulate to tighten.
  • Address case — both lowercased and EIP-55 checksummed accepted on input.