# TokenGuard DeFi Analytics Endpoint

> TokenGuard DeFi Analytics Endpoint is a paid API for AI agents from eltociear-tokenguard.hf.space, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Retrieves DeFi protocol analytics including TVL, staking, borrowing data, and chain breakdowns for a named protocol

## Facts

- Endpoint: POST https://eltociear-tokenguard.hf.space/defi
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokenguard-defi-analytics-endpoint-83391f92
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NuP4UNz2FKAa3XouEh9l5

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tokenguard-defi-analytics-endpoint-83391f92 -d '<json body>'
```

Example prompt: Can you pull up the DeFi analytics for Aave — I want to see its total TVL, how much is staked and borrowed, and which chains it's most active on?

## When to prefer this

Use this endpoint when you need structured DeFi protocol-level analytics — specifically TVL by chain, staking, and borrowing metrics — for a named protocol like Aave, Compound, or Curve. Prefer this over generic crypto price APIs when you need DeFi-specific on-chain intelligence rather than spot prices.

## Known failure modes

- Unknown protocol slug returns empty or error response
- Protocol not indexed returns null or 404-equivalent
- Micropayment failure via x402 prevents call from executing
- Stale data if underlying on-chain data source hasn't updated recently
- Invalid POST body format returns validation error

## How this service works

DeFi protocol TVL breakdown by chain, category, description, staking/borrowed TVL (DeFiLlama, free, no key). Covers 3000+ protocols.

## Output

Returns a JSON object with the protocol's canonical name, slug, DeFi category (e.g. Lending), a breakdown of TVL by top chains, total staking in USD, total borrowed in USD, and aggregate total TVL in USD.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "slug": {
   "type": "string",
   "description": "DeFiLlama protocol slug (e.g. 'aave', 'uniswap', 'compound')"
  },
  "include_history": {
   "type": "boolean",
   "description": "Include 30d TVL history (default false)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "Aave",
  "slug": "aave",
  "category": "Lending",
  "top_chains": [
   {
    "chain": "Ethereum",
    "tvl_usd": 9800000000
   }
  ],
  "staking_usd": 198000000,
  "borrowed_usd": 7500000000,
  "total_tvl_usd": 12500000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenguard-defi-analytics-endpoint-83391f92/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eltociear-tokenguard.hf.space](https://www.zero.xyz/host/eltociear-tokenguard.hf.space/llms.txt)
