# aiworker-data DeFi Protocol Snapshot

> aiworker-data DeFi Protocol Snapshot is a paid API for AI agents from aiworker.duckdns.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-16).

Returns a real-time snapshot of a single DeFi protocol by DefiLlama slug, including TVL by chain, category, 1d/7d change, and audit info, refreshed every 5 minutes.

## Facts

- Endpoint: GET https://aiworker.duckdns.org/v1/defi/protocol/:slug
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aiworker-data-defi-protocol-snapshot-2555f645
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wvOzdGO24DQIys8Tdv9kI

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 aiworker-data-defi-protocol-snapshot-2555f645
```

Example prompt: Pull up the current DefiLlama snapshot for Uniswap — I want to see its total TVL, how it's broken down by chain, and whether it's changed much over the past week.

## When to prefer this

Use this endpoint when you need fast, structured, per-protocol DeFi data (TVL, chain breakdown, category, audits) sourced from DefiLlama without scraping or parsing HTML. Prefer it over general web scraping when you need machine-readable TVL figures and change metrics for a specific protocol by its canonical DefiLlama slug.

## Known failure modes

- Invalid or unknown slug returns an error or empty response
- Slug with uppercase letters or special characters rejected by pattern validation
- Protocol data may be stale if DefiLlama upstream is delayed beyond 5-minute refresh window
- Rate limiting or payment failure (x402) if USDC payment is not attached or insufficient

## How this service works

Snapshot of one DeFi protocol by DefiLlama slug: TVL by chain, category, 1d/7d change, audits, refreshed every 5 minutes from DefiLlama's protocol summary.

## Output

Returns a JSON object with the protocol's name, slug, DefiLlama URL, category, list of chains, total TVL in USD, TVL broken down by chain, 1-day and 7-day percentage changes, audit status, last updated timestamp, and cache/staleness metadata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "slug"
     ],
     "properties": {
      "slug": {
       "type": "string",
       "pattern": "^[a-z0-9-]{1,64}$"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "stale": {
       "type": "boolean"
      },
      "source": {
       "type": "string"
      },
      "protocol": {
       "type": "object",
       "properties": {
        "url": {
         "type": [
          "string",
          "null"
         ]
        },
        "name": {
         "type": "string"
        },
        "slug": {
         "type": "string"
        },
        "audits": {
         "type": [
          "string",
          "null"
         ]
        },
        "chains": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "tvl_usd": {
         "type": "number"
        },
        "category": {
         "type": [
          "string",
          "null"
         ]
        },
        "change_1d": {
         "type": [
          "number",
          "null"
         ]
        },
        "change_7d": {
         "type": [
          "number",
          "null"
         ]
        },
        "source_url": {
         "type": "string"
        },
        "updated_at": {
         "type": "string"
        },
        "tvl_by_chain": {
         "type": "object",
         "additionalProperties": {
          "type": "number"
         }
        }
       }
      },
      "cache_hit": {
       "type": "boolean"
      },
      "fetched_at": {
       "type": "string"
      },
      "source_url": {
       "type": "string"
      },
      "attribution": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aiworker-data-defi-protocol-snapshot-2555f645/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aiworker.duckdns.org](https://www.zero.xyz/host/aiworker.duckdns.org/llms.txt)
