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
| Chain | chainId | Native |
|---|---|---|
| Ethereum | evm:1 | ETH |
| Optimism | evm:10 | ETH |
| BNB Chain | evm:56 | BNB |
| Polygon | evm:137 | POL |
| Base | evm:8453 | ETH |
| Arbitrum | evm:42161 | ETH |
| Avalanche | evm:43114 | AVAX |
| Linea, zkSync, Scroll, Mantle, Blast, Mode, Manta, Taiko, Sei, Cronos, Fantom, Gnosis, Celo, Moonbeam, Kava, Metis, opBNB, Polygon zkEVM, Merlin, BOB, Cyber, Fuse, IoTeX, Conflux, Astar zkEVM, ZKFair, XLayer, ZetaChain, Klaytn | evm:N | varies |
MOBULA_CHAIN_MAP in the chains package.
Request
| Param | Required | Notes |
|---|---|---|
chainId | ✓ | evm:<integer> (e.g. evm:8453 for Base) |
tokenIn / tokenOut | ✓ | Token contract address (lowercased OR checksummed). Native = 0xEee… |
amount or amountRaw | ✓ | Human ("0.1") or raw wei ("100000000000000000") |
walletAddress | ✓ | User’s EVM address (0x…) |
slippage | – | % (0-100, default 1) |
feePercentage | – | Caller referral fee 0-99% |
feeWallet | – | Required when feePercentage > 0 |
onlyRouters | – | Comma-list of kyberswap,lifi,naos |
excludedProtocols / onlyProtocols | – | DEX-level filter |
Response — data.evm
data.evm.transaction fields
| Field | Type | Description |
|---|---|---|
to | 0x… | MobulaRouter contract on the target chain |
from | 0x… | Echo of walletAddress |
data | 0x… | Encoded call to MobulaRouter — pass through verbatim to your wallet |
value | string wei | Native token to attach (= amountIn for native-in swaps, else 0) |
gasLimit | string? | Suggested gas (your wallet may simulate to refine) |
gasPrice / maxFeePerGas / maxPriorityFeePerGas | string? wei | Filled per chain (legacy or EIP-1559) |
nonce | number? | Optional — wallet picks if omitted |
chainId | number | EIP-155 chain id matching chainId query param |
approvalAddress | 0x…? | Where the user must approve() the sell token (defaults to to) |
approvals | {token, spender}[]? | Pre-flight approval list — execute these before eth_sendTransaction |
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.