DeFiLlama

Unofficial DeFi Llama API client.


Keywords
defillama, python, python3, rest-api
License
Apache-2.0
Install
pip install DeFiLlama==1.0.1

Documentation

DeFiLlama

Python 3.7 Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12

License

Build

Unofficial DeFi Llama API client in python

For detailed information about the API endpoints, see DeFi Llama API Documentation

Installation:

use pip to install:

pip install DeFiLlama

Authentication:

Endpoints are accessible without an API key.


Example usage:

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)

Donate & Help maintain the library

Paypal