Skip to main content
defi-cli is an agent-first DeFi retrieval CLI with a stable automation contract:
  • Stable JSON envelope + deterministic field naming
  • Stable exit codes
  • Canonical chain and asset IDs (CAIP-2 / CAIP-19)
  • Canonical amount handling (base units + decimal normalization)

Start here

Example

defi providers list --results-only
[
  {
    "name": "defillama",
    "type": "market+bridge-data",
    "requires_key": false,
    "capabilities": ["chains.top", "chains.assets", "protocols.top", "protocols.categories", "bridge.list", "bridge.details"],
    "key_env_var": "DEFI_DEFILLAMA_API_KEY"
  },
  {
    "name": "kamino",
    "type": "lending+yield",
    "requires_key": false,
    "capabilities": ["lend.markets", "lend.rates", "yield.opportunities", "yield.history"]
  },
  {
    "name": "jupiter",
    "type": "swap",
    "requires_key": false,
    "capabilities": ["swap.quote"],
    "key_env_var": "DEFI_JUPITER_API_KEY"
  }
]

Key-gated routes

Most commands are keyless. Key requirements are driven by upstream providers, not by CLI licensing/auth.
RouteEnv var
swap quote --provider 1inchDEFI_1INCH_API_KEY
swap quote --provider uniswapDEFI_UNISWAP_API_KEY
swap quote --provider jupiterDEFI_JUPITER_API_KEY (optional for higher limits)
chains assetsDEFI_DEFILLAMA_API_KEY
bridge listDEFI_DEFILLAMA_API_KEY
bridge detailsDEFI_DEFILLAMA_API_KEY
Bungee quotes are keyless by default. Dedicated backend mode requires both DEFI_BUNGEE_API_KEY and DEFI_BUNGEE_AFFILIATE.

Lending and yield routing

lend markets, lend rates, yield opportunities, and yield history use direct protocol adapters:
  • aave
  • morpho
  • kamino (Solana mainnet)

Next