/DeFiLlama

Unofficial DeFi Llama API client in python

Primary LanguagePythonApache License 2.0Apache-2.0

DeFiLlama

Python 3.6 Python 3.7 Python 3.8 Python 3.9

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')

# Get historical values of total TVL
response = llama.get_historical_tvl()

# Get protocol TVL
response = llama.get_protocol_tvl(name='uniswap')