Unofficial DeFi Llama API client in python
For detailed information about the API endpoints, see DeFi Llama API Documentation
use pip to install:
pip install DeFiLlama
Endpoints are accessible without an API key.
from defillama import DefiLlama
# initialize api client
llama = DefiLlama()
# Get all protocols data
response = llama.get_all_protocols()
# Get a protocol data
response = llama.get_protocol(name='uniswap')
Data from stablecoins dashboard
# List all stablecoins along with their circulating amounts
response = llama.get_stablecoins()
# Get historical mcap sum of all stablecoins in a chain
response = llama.get_stablecoins_chains_all_historical_mcap_sum(chain='Ethereum', stablecoin_id=1)