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')
# Get historical values of total TVL
response = llama.get_historical_tvl()
# Get protocol TVL
response = llama.get_protocol_tvl(name='uniswap')