defillama
$
npx mdskill add TermiX-official/cryptoclaw/defillamaFetch DeFi protocol TVL, yield pools, stablecoin data, and chain analytics from DeFiLlama's free API.
- Helps users access real-time DeFi metrics for investment decisions and market analysis.
- Integrates with DeFiLlama's API endpoints for TVL, yields, stablecoins, and coin prices.
- Uses protocol slugs and filters to retrieve specific data, handling large payloads efficiently.
- Presents results as structured data, often requiring filtering for top results or chain comparisons.
SKILL.md
.github/skills/defillamaView on GitHub ↗
---
name: defillama
description: Query DeFiLlama for TVL, protocol analytics, yield pools, and stablecoin data.
metadata: { "cryptoclaw": { "emoji": "🦙", "always": true } }
---
# DeFiLlama API
Query DeFi protocol TVL, yield farming opportunities, chain analytics, and stablecoin data via the free DeFiLlama API.
## Base URLs
- **TVL & Protocols**: `https://api.llama.fi`
- **Yields**: `https://yields.llama.fi`
- **Stablecoins**: `https://stablecoins.llama.fi`
- **Coins (prices)**: `https://coins.llama.fi`
No API key required. No strict rate limits, but be respectful.
## Endpoints
### Protocol List
```
GET https://api.llama.fi/v2/protocols
```
Returns all tracked protocols with current TVL, chain breakdown, category, and URL. **Large payload** — always filter or limit output to top N results.
### Protocol TVL History
```
GET https://api.llama.fi/v2/tvl/{protocol}
```
- `protocol`: slug from protocols list (see table below)
- Returns daily TVL data points
### Protocol Detail
```
GET https://api.llama.fi/protocol/{protocol}
```
Returns full protocol info: TVL per chain, token breakdown, governance token, audits.
### Chain TVL
```
GET https://api.llama.fi/v2/chains
```
Returns TVL for every tracked chain. Useful for chain comparison.
### Yield Pools
```
GET https://yields.llama.fi/pools
```
Returns all tracked yield pools. **Very large payload** — always filter by chain or project in your output.
Useful fields per pool: `chain`, `project`, `symbol`, `tvlUsd`, `apy`, `apyBase`, `apyReward`, `stablecoin`.
### Stablecoins
```
GET https://stablecoins.llama.fi/stablecoins?includePrices=true
```
Returns all stablecoins with circulating supply, peg data, and chain breakdown.
### Token Prices
```
GET https://coins.llama.fi/prices/current/{coins}
```
- `coins`: comma-separated in format `{chain}:{address}` (e.g., `bsc:0x0E09...`)
- Chain keys: `bsc`, `ethereum`, `polygon`, `arbitrum`, `optimism`, `base`
## Common Protocol Slugs
| Protocol | Slug |
| -------------- | ---------------- |
| PancakeSwap | pancakeswap |
| Uniswap | uniswap |
| Aave V3 | aave-v3 |
| Lido | lido |
| Curve | curve-finance |
| MakerDAO | makerdao |
| Compound | compound-finance |
| GMX | gmx |
| Convex | convex-finance |
| Rocket Pool | rocket-pool |
| Venus | venus |
| Alpaca Finance | alpaca-finance |
| Biswap | biswap |
| Radiant | radiant-v2 |
## Usage Notes
- **Large payloads**: The `/v2/protocols` and `/pools` endpoints return massive JSON arrays. Always extract and present only the top N items relevant to the user's query.
- Combine with CoinGecko for token price context and with `read_contract` for on-chain verification of TVL claims.
- When presenting yield data, always note that APY is historical and not guaranteed.
- Sort pools by TVL to surface safer opportunities first.
## Example Queries
User: "What's the TVL of PancakeSwap?"
→ Fetch `https://api.llama.fi/v2/tvl/pancakeswap`, report latest TVL
User: "Top yield pools on BSC"
→ Fetch `/pools`, filter `chain === "BSC"`, sort by `tvlUsd` desc, show top 10 with APY
User: "Compare TVL across chains"
→ Fetch `/v2/chains`, sort by `tvl` desc, present top 10
More from TermiX-official/cryptoclaw
- aave-bscInteract with Aave V3 lending protocol on BNB Smart Chain (BSC).
- agent-identityRegister and manage on-chain AI agent identity via ERC-8004.
- agentic-commerceCreate, fund, and settle on-chain agent jobs via ERC-8183 Agentic Commerce Protocol.
- binance-address-infoBinance Web3 official skill — query any wallet address for token holdings, balances, and portfolio data across BSC, Base, and Solana. Sourced from github.com/binance/binance-skills-hub.
- binance-market-rankBinance Web3 official skill — crypto market rankings including trending tokens, smart money inflow, social hype, meme ranks, and top trader PnL leaderboards. Sourced from github.com/binance/binance-skills-hub.
- binance-meme-rushBinance Web3 official skill — real-time meme token launchpad tracking and AI-powered trending topic discovery on Solana and BSC. Sourced from github.com/binance/binance-skills-hub.
- binance-spotBinance official spot trading skill — place orders, manage accounts, and access real-time market data via Binance Spot API. Sourced from github.com/binance/binance-skills-hub.
- binance-token-auditBinance Web3 official skill — security audit for token contracts, detecting honeypots, rug pulls, and malicious functions across BSC, Base, Solana, and Ethereum. Sourced from github.com/binance/binance-skills-hub.
- binance-token-infoBinance Web3 official skill — search tokens, retrieve metadata, real-time market data, and candlestick charts across BSC, Base, and Solana. Sourced from github.com/binance/binance-skills-hub.
- binance-trading-signalBinance Web3 official skill — Smart Money on-chain trading signals tracking professional investor buy/sell activity on BSC and Solana. Sourced from github.com/binance/binance-skills-hub.