DefiLlama API for Openclaw

A powerful CLI tool for fetching comprehensive DeFi market data, including TVL, yields, and token prices, via the DefiLlama API.

poploli2
v0.1.0
Feb 26, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install defillama-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install defillama-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is DefiLlama API?

The DefiLlama API skill is a robust command-line interface designed to bridge the gap between raw decentralized finance data and actionable insights. By leveraging the industry-leading DefiLlama data ecosystem, this skill allows users to query Total Value Locked (TVL) across protocols and chains, track stablecoin dominance, and monitor real-time token pricing. It is an essential component for developers and analysts using Openclaw Skills to automate DeFi research and portfolio monitoring.

This skill provides a unified interface to access both public and Pro-tier DefiLlama endpoints, ensuring that users have the most granular data available for their decentralized finance projects. Whether you are tracking protocol fees or monitoring bridge transactions, this tool streamlines the data retrieval process directly within your terminal, making it an indispensable asset for those building complex financial models or automated trading strategies.

DefiLlama API Use Cases

  • Monitoring Total Value Locked (TVL) for specific protocols or entire blockchain ecosystems.
  • Tracking stablecoin market share and dominance across different networks.
  • Fetching historical and real-time token prices using Coingecko slugs or contract addresses.
  • Analyzing protocol revenue, fees, and daily premium volumes for DEXs and options.
  • Researching token unlocks, venture capital raises, and institutional crypto data for investment analysis.

How DefiLlama API Works

  1. The user initiates a command through the src/run.py script using the uv Python package manager.
  2. The skill parses the command-line arguments to identify the specific DefiLlama module requested, such as TVL, Coins, or Yields.
  3. The tool authenticates with the DefiLlama API, utilizing an optional DEFILLAMA_API_KEY to access Pro features if provided.
  4. Data is fetched from the relevant DefiLlama endpoint based on the provided parameters like protocol name, chain, or contract address.
  5. The skill processes the raw JSON response and outputs the structured DeFi data directly to the console for the user to view or pipe into other Openclaw Skills.

DefiLlama API Setup

First, ensure you have the uv package manager installed on your system. You can install it via Homebrew:

brew install uv

Navigate to the skill's base directory and configure your optional Pro API key if you require access to advanced endpoints:

# Optional: Set your Pro API key
export DEFILLAMA_API_KEY="your_api_key_here"

All commands must be executed through the central runner script using uv:

uv run src/run.py tvl protocols

DefiLlama API Data Schema & Taxonomy

The skill interacts with various DefiLlama data structures. The following table summarizes the data schema for core modules:

Category Key Data Points Required ID Format
TVL Protocol TVL, Chain TVL, Historical Data protocol-slug (e.g., aave)
Coins Current Price, Confidence, Decimals chain:address or coingecko:slug
Stablecoins Circulating Supply, Peg Type, Prices stablecoin-id (integer)
Yields APY, Pool TVL, IL Risk Metadata pool-uuid
Bridges Transaction volume, chain-specific flows bridge-id

DefiLlama API Advanced Features

  • Pro-tier integration for exclusive data points like token liquidity, narrative performance, and institutional institutional data (DAT).
  • Multi-module support covering 14+ different DeFi categories from cross-chain bridges to ETFs.
  • Flexible token identification supporting both native on-chain addresses and Coingecko-mapped slugs.
  • Historical data retrieval capabilities for performing deep-dive trend analysis and backtesting.
  • High-performance execution powered by the uv runtime, ensuring minimal latency when fetching large DeFi datasets.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0