← all AgentPay tools

defi_tvl

DeFi protocol Total Value Locked from DeFiLlama. Returns top 10 or a specific protocol..

Free defi x402 protocol no API key · no wallet

When agents use this

You need the Total Value Locked in a specific DeFi protocol or want to compare the top protocols by TVL.

Parameters

nametyperequireddescription
protocolstringnoProtocol name or slug, e.g. 'uniswap', 'aave', 'lido'. Leave empty for top 10.

Returns

tvl, change_1h, change_1d, change_7d, chains[], category for the protocol (or top 10 list)

Example response

{
  "protocol": "aave",
  "tvl": 23800000000.0,
  "change_1h": 0.12,
  "change_1d": -1.43,
  "change_7d": 3.21,
  "chains": [
    "Ethereum",
    "Polygon",
    "Avalanche",
    "Base"
  ],
  "category": "Lending",
  "source": "defillama"
}

Call it — HTTP (x402)

curl -X POST https://agentpay.tools/tools/defi_tvl/call \
  -H 'Content-Type: application/json' \
  -d '{"parameters": {}, "agent_address": "<your wallet or any identifier>"}'

Call it — Python SDK

from agentpay import quickstart  # pip install agentpay-x402

s = quickstart(max_spend=0.10)   # hard budget cap; mints a wallet, no funding needed
r = s.call("defi_tvl", {})
print(r.data)                    # + r.cost, r.tx, r.network — full receipt

Call it — MCP

npx -y @romudille/agentpay-mcp   # keyless; exposes defi_tvl to any MCP agent runtime
All tools · x402 delivery scores · Receipt ledger · Guides · llms.txt · AgentPay