Get historical and current TVL data for any DeFi protocol via x402 micropayment.
What it does
The `/defi/tvl` endpoint on the DeFi Intelligence API returns Total Value Locked (TVL) data for a specified DeFi protocol. It accepts a single required query parameter `protocol` (a protocol slug such as "aave" or "uniswap") and returns TVL figures. The endpoint is part of a broader suite of 26 DeFi security and analytics endpoints hosted at defi.hugen.tokyo, covering token audits, bridge routing, gas prices, rugpull detection, and more.
Payment is handled via the x402 protocol at $0.01 USDC per call on Base. No API keys or rate limits are required for direct x402 usage; callers simply satisfy the 402 payment challenge. Alternative access methods include a broker API (with a free API key providing $0.05 credit), an MCP server at mcp.hugen.tokyo, and a Python SDK (`x402-pay`). The endpoint is live and returns a 402 challenge with a sample response showing protocol name and TVL value.
The API is documented via an OpenAPI 3.1 spec at `/openapi.json` and a Swagger UI at `/docs`. Response schemas for the TVL endpoint are not explicitly defined in the OpenAPI spec (the 200 response schema is empty), so the exact response structure must be inferred from the sample in the 402 challenge, which shows fields like `protocol` and `tvl`.
Capabilities
Use cases
- —Query current TVL for a specific DeFi protocol (e.g., Aave, Uniswap) in an agent workflow
- —Monitor TVL changes across protocols for portfolio or risk dashboards
- —Feed TVL data into automated DeFi strategy evaluation pipelines
- —Compare protocol TVL as part of due-diligence before bridging or depositing funds
Fit
Best for
- —AI agents needing on-demand DeFi protocol TVL data without API key setup
- —Developers who want pay-per-call DeFi analytics without subscription commitments
- —Workflows that combine TVL with other endpoints on the same API (security, bridge, gas)
Not for
- —High-frequency bulk TVL polling where per-call micropayments become expensive
- —Users who need free, unlimited TVL data (DefiLlama's public API may be more suitable)
- —Historical TVL time-series with granular timestamps (response schema unclear on this)
Quick start
# Using the x402-pay Python SDK
pip install x402-pay
import x402_pay
response = x402_pay.get(
"https://defi.hugen.tokyo/defi/tvl?protocol=aave"
)
print(response.json())Example
Response
{
"tvl": 12500000000,
"protocol": "aave"
}Endpoint
Quality
The endpoint is live (402 challenge captured) with a full OpenAPI spec, but the response schema for /defi/tvl is empty — the only example comes from the 402 challenge sample. No dedicated docs page, pricing page, or detailed field descriptions exist. Price is clear ($0.01 USDC on Base).
Warnings
- —Response schema for /defi/tvl is not defined in the OpenAPI spec; the example response is inferred from the 402 challenge sample only.
- —No dedicated documentation beyond the Swagger UI; field semantics (e.g., whether TVL is USD-denominated, whether historical data is included) are unspecified.
- —Root URL returns 404; no landing page or README available.
Citations
- —The API describes itself as '26 DeFi security and data endpoints — token audits, bridge routing, protocol analytics' with x402 payment per call.https://defi.hugen.tokyo/docs
- —The /defi/tvl endpoint requires a 'protocol' query parameter (protocol slug) and is a GET request.https://defi.hugen.tokyo/openapi.json
- —Payment is $0.01 USDC on Base per call, with broker, MCP, and SDK alternatives available.https://defi.hugen.tokyo/defi/tvl
- —The 402 challenge sample response includes fields 'protocol' and 'tvl'.https://defi.hugen.tokyo/defi/tvl