# TokenGuard DeFi Protocol Fees API

> TokenGuard DeFi Protocol Fees API 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 30-day fee data across DeFi protocols, categorized by protocol name and type (e.g. DEX), with aggregate protocol counts.

## Facts

- Endpoint: POST https://eltociear-tokenguard.hf.space/fees
- 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-protocol-fees-api-b5215a1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EYkcvFzYjaDb9ehZppLbj

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-protocol-fees-api-b5215a1f -d '<json body>'
```

Example prompt: Pull the 30-day fee data for DeFi protocols from TokenGuard and show me which protocols — especially DEXes like Uniswap — generated the most fees, along with the total number of protocols tracked.

## When to prefer this

Choose this endpoint when you need aggregated DeFi protocol fee data across a wide range of protocols (2000+), especially for comparing fee generation across DEXes, lending protocols, and other DeFi categories over a 30-day window. Prefer this over generic market data APIs when DeFi-native protocol economics and on-chain fee analytics are the primary need.

## Known failure modes

- Invalid or malformed POST body returns 400 error
- Payment not provided or insufficient USDC results in 402 Payment Required
- Protocol filter returns empty array if no matching protocols found
- Service unavailability on Hugging Face Spaces may cause 503 errors
- Rate limiting may occur under high request volume

## How this service works

Protocol fees and revenue ranked by 30d total — top earning DeFi protocols with 24h/7d/30d breakdown (DeFiLlama, free, no key).

## Output

Returns a JSON array of DeFi protocols, each with a name, category (e.g. DEX, lending), and 30-day fee revenue in USD. Also includes a total_protocols count reflecting the full scope of tracked protocols.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer",
   "description": "Max protocols to return (default 20)"
  },
  "data_type": {
   "type": "string",
   "description": "dailyFees or dailyRevenue (default dailyFees)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "protocols": [
   {
    "name": "Uniswap",
    "category": "DEX",
    "fees_30d_usd": 50000000
   }
  ],
  "total_protocols": 2340
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenguard-defi-protocol-fees-api-b5215a1f/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)
