Skip to main content

Chain IDs

--chain, --from, and --to accept:
  • CAIP-2: eip155:1
  • Numeric EVM chain ID: 1
  • Alias: ethereum, base, hyperevm, megaeth, gnosis, taiko, etc.
  • Solana mainnet alias/CAIP-2: solana or solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
defi-cli normalizes these to canonical CAIP-2 IDs in output.

Asset IDs

Asset inputs accept:
  • Symbol: USDC
  • Token address: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
  • CAIP-19: eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
  • Solana CAIP-19: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Output always returns canonical CAIP-19 in fields like asset_id, from_asset_id, to_asset_id.

Amount semantics

For swap and bridge quotes:
  • --amount is base units (recommended for automation)
  • --amount-decimal is human decimal form
  • for swaps, these map to --type exact-input (default)
  • for swaps with --type exact-output, use --amount-out or --amount-out-decimal
  • passing both base+decimal variants for the same side returns a usage error
Output includes both normalized forms:
"trade_type": "exact-input",
"input_amount": {
  "amount_base_units": "1000000",
  "amount_decimal": "1",
  "decimals": 6
}

Important caveats

  • Symbol parsing depends on the local bootstrap token registry.
  • On chains without symbol coverage, pass address or CAIP-19 directly.
  • Solana support is mainnet-only (solana / solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp).
  • Solana devnet/testnet aliases and custom Solana CAIP-2 references are rejected.
  • MegaETH bootstrap symbol support currently includes MEGA, WETH, and USDT (USDT resolves to the chain USDT0 contract).
See Chain Aliases.