Defillama Data Aggregator
by @deanpeng-dotcom
Professional DeFi data aggregator that provides unified access to TVL, protocols, chains, and yields data from DefiLlama. Supports multiple output formats (J...
clawhub install defillama-data-aggregatorπ About This Skill
name: defillama-data-aggregator description: Professional DeFi data aggregator that provides unified access to TVL, protocols, chains, and yields data from DefiLlama. Supports multiple output formats (JSON/Table/CSV), health monitoring, and security validation. homepage: https://github.com/AntalphaAI/defillama-data-aggregator version: 1.0.3 author: AntalphaAI emoji: "π" tags: defi,web3,crypto,tvl,data,blockchain,yields,defillama metadata: openclaw: requires: bins: ["node", "npm"] env: [] install: command: "npm install" repository: https://github.com/AntalphaAI/defillama-data-aggregator
DefiLlama Data Aggregator
> Professional DeFi data at your fingertips. Query TVL, protocols, chains, and yields from DefiLlama with a single command.
What This Skill Does
Quick Start
# Get total DeFi TVL
node {skillDir}/src/index.js defillama tvlGet protocol TVL
node {skillDir}/src/index.js defillama protocol --name aaveGet top protocols by TVL
node {skillDir}/src/index.js defillama protocols --limit 10 --sort tvl --format tableGet chain TVL
node {skillDir}/src/index.js defillama chain --name ethereumFind high-yield pools
node {skillDir}/src/index.js defillama yields --min-apy 10 --chain ethereum --limit 20Check API health
node {skillDir}/src/index.js health
Commands
TVL Commands
| Command | Description | Example |
|---------|-------------|---------|
| tvl | Get total DeFi TVL | node {skillDir}/src/index.js defillama tvl |
| protocol --name | Get protocol TVL | node {skillDir}/src/index.js defillama protocol --name uniswap |
| chain --name | Get chain TVL | node {skillDir}/src/index.js defillama chain --name solana |
Protocol Commands
| Command | Description | Example |
|---------|-------------|---------|
| protocols | List all protocols | node {skillDir}/src/index.js defillama protocols |
| protocols --category | Filter by category | node {skillDir}/src/index.js defillama protocols --category lending |
| protocols --min-tvl | Filter by minimum TVL | node {skillDir}/src/index.js defillama protocols --min-tvl 100000000 |
| protocols --limit | Limit results | node {skillDir}/src/index.js defillama protocols --limit 20 |
Yield Commands
| Command | Description | Example |
|---------|-------------|---------|
| yields | List yield pools | node {skillDir}/src/index.js defillama yields |
| yields --min-apy | Filter by minimum APY | node {skillDir}/src/index.js defillama yields --min-apy 15 |
| yields --chain | Filter by chain | node {skillDir}/src/index.js defillama yields --chain arbitrum |
| yields --min-tvl | Filter by minimum TVL | node {skillDir}/src/index.js defillama yields --min-tvl 1000000 |
| yields --stablecoin | Stablecoin pools only | node {skillDir}/src/index.js defillama yields --stablecoin |
Utility Commands
| Command | Description | Example |
|---------|-------------|---------|
| health | Check API health | node {skillDir}/src/index.js health |
| status | Show system status | node {skillDir}/src/index.js status |
Output Formats
All data commands support multiple output formats:
# Pretty format (default, human-readable)
node {skillDir}/src/index.js defillama tvl --format prettyJSON format (for scripts and parsing)
node {skillDir}/src/index.js defillama tvl --format jsonTable format (for quick overview)
node {skillDir}/src/index.js defillama protocols --limit 10 --format tableCSV format (for spreadsheets)
node {skillDir}/src/index.js defillama protocols --limit 50 --format csv
Use Cases
For DeFi Investors
"Show me the top 10 lending protocols by TVL"
"Find yield pools on Ethereum with APY above 15%"
"What is the current TVL of Aave?"
For Data Analysts
"Export all protocols data to CSV"
"Get the TVL distribution across chains"
"Compare lending vs DEX TVL"
For Developers
"Check if DefiLlama API is healthy"
"Get protocol data in JSON format"
"Find pools with minimum 1M TVL"
Security Features
Security Notes
https://api.llama.fi (DefiLlama API)
- https://yields.llama.fi (DefiLlama Yields API)
Installation
Prerequisites
Setup
cd {skillDir}
npm install
API Reference
DefiLlama Endpoints Used
| Endpoint | Description |
|----------|-------------|
| https://api.llama.fi/tvl | Total DeFi TVL |
| https://api.llama.fi/protocols | All protocols |
| https://api.llama.fi/protocol/{name} | Protocol details |
| https://api.llama.fi/chains | All chains |
| https://yields.llama.fi/pools | Yield pools |
Error Handling
The skill provides user-friendly error messages:
| Error Type | Message | |------------|---------| | Invalid protocol name | "Only alphanumeric characters and hyphens allowed" | | Invalid chain name | "Only alphanumeric characters, spaces, and hyphens allowed" | | Network error | "Check internet connection and try again" | | Rate limit | "Rate limit exceeded, please wait" | | API unavailable | "Service temporarily unavailable" |
Examples
Get Top Protocols
node {skillDir}/src/index.js defillama protocols --limit 10 --sort tvl --format table
Find High-Yield Pools
node {skillDir}/src/index.js defillama yields --min-apy 20 --min-tvl 1000000 --limit 5
Check Health
node {skillDir}/src/index.js health
Troubleshooting
Protocol Not Found
aave-v3 not aave v3)Chain Not Found
ethereum not Ethereum)polygon-pos)No Results from Yields
--min-apy or --min-tvl thresholdsNetwork Errors
Version: 1.0.3 Last Updated: 2026-03-31 Maintainer: AntalphaAI License: MIT
β‘ When to Use
π‘ Examples
Get Top Protocols
node {skillDir}/src/index.js defillama protocols --limit 10 --sort tvl --format table
Find High-Yield Pools
node {skillDir}/src/index.js defillama yields --min-apy 20 --min-tvl 1000000 --limit 5
Check Health
node {skillDir}/src/index.js health
βοΈ Configuration
cd {skillDir}
npm install
π Tips & Best Practices
Protocol Not Found
aave-v3 not aave v3)Chain Not Found
ethereum not Ethereum)polygon-pos)No Results from Yields
--min-apy or --min-tvl thresholdsNetwork Errors
Version: 1.0.3 Last Updated: 2026-03-31 Maintainer: AntalphaAI License: MIT