Skip to main content

1. List providers

defi providers list --results-only

2. Discover market context

defi chains top --limit 10 --results-only --select rank,chain,chain_id,tvl_usd
defi protocols top --category lending --limit 10 --results-only

3. Resolve an asset to canonical ID

defi assets resolve --chain base --asset USDC --results-only
defi assets resolve --chain solana --asset USDC --results-only

4. Query lending markets and rates

defi lend markets --provider aave --chain 1 --asset USDC --limit 5 --results-only
defi lend rates --provider morpho --chain 1 --asset USDC --limit 5 --results-only
defi lend markets --provider kamino --chain solana --asset USDC --limit 5 --results-only
defi lend positions --provider aave --chain 1 --address 0xYourEOA --type all --limit 5 --results-only

5. Rank yield opportunities

defi yield opportunities --chain 1 --asset USDC --providers aave,morpho --limit 10 --results-only
defi yield opportunities --chain solana --asset USDC --providers kamino --limit 10 --results-only
defi yield opportunities --chain 1 --asset USDC --providers aave,morpho --min-tvl-usd 1000000 --limit 10 --results-only
defi yield history --chain 1 --asset USDC --providers aave,morpho --metrics apy_total,tvl_usd --interval day --window 7d --limit 1 --results-only
--providers expects provider names from providers list (aave,morpho,kamino,moonwell), not protocol categories.

6. Get bridge and swap quotes

defi bridge quote --provider across --from 1 --to 8453 --asset USDC --amount 1000000 --results-only
defi bridge quote --provider bungee --from hyperevm --to 8453 --asset USDC --amount 1000000 --results-only

defi swap quote --provider tempo --chain tempo --from-asset pathUSD --to-asset USDC.e --amount 1000000 --results-only
defi swap quote --provider fibrous --chain hyperevm --from-asset USDC --to-asset WHYPE --amount 1000000 --results-only
defi swap quote --provider jupiter --chain solana --from-asset USDC --to-asset SOL --amount 1000000 --results-only

7. Plan an execution (dry-run)

defi swap plan --provider taikoswap --chain taiko --from-asset USDC --to-asset WETH --amount 1000000 --wallet agent-treasury --results-only
defi lend supply plan --provider aave --chain 1 --asset USDC --amount 1000000 --wallet agent-treasury --results-only
defi swap plan --provider tempo --chain tempo --from-asset pathUSD --to-asset USDC.e --amount 1000000 --from-address 0xYourEOA --results-only
Both --wallet (OWS, recommended) and --from-address (local signer) are supported. Tempo plans always use --from-address. See Execution & Signing for setup details.

8. Submit a wallet-backed action

export DEFI_OWS_TOKEN=...
defi lend supply submit --action-id <action_id> --results-only
Wallet-backed submit uses the action’s persisted wallet_id and DEFI_OWS_TOKEN. Local-signer submit uses --private-key or key env vars. See Execution & Signing.

9. Use schema for machine integration

defi schema --results-only
defi schema "yield opportunities" --results-only

10. Add reliability defaults

defi yield opportunities --chain 1 --asset USDC --timeout 12s --retries 2 --max-stale 5m --results-only
Next: Output Contract