# x402.ottoai.services DeFi Protocol Analytics

> x402.ottoai.services DeFi Protocol Analytics is a paid API for AI agents from x402.ottoai.services, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns DeFi protocol analytics including TVL rankings, chain breakdowns, gainers/losers, and per-protocol deep dives.

## Facts

- Endpoint: GET https://x402.ottoai.services/defi-analytics
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-ottoai-services-7151a6b6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3A_lOtgZ-cvZWvDRVkKzZ

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 x402-ottoai-services-7151a6b6
```

Example prompt: Give me a DeFi market overview — show the top protocols by TVL, which ones are gaining or losing, and break it down by chain. Then do a deep dive on Aave specifically.

## When to prefer this

Use this endpoint when you need a broad DeFi market overview (TVL rankings, gainers/losers, chain breakdowns) or a focused deep dive on a specific protocol. Prefer this over general crypto price endpoints when the user cares specifically about DeFi protocol metrics and TVL rather than token prices or yield rates.

## Known failure modes

- Invalid or unrecognized protocol slug returns an error or empty result
- Network or upstream data provider outage returns a failed status
- Missing required input wrapper causes schema validation error
- Rate limiting or payment failure results in 402 payment required

## How this service works

Where DeFi capital is flowing — TVL rankings, fastest-growing vs bleeding protocols, chain-by-chain breakdown, and per-protocol deep dives. Track capital rotation and protocol health. Powered by DefiLlama.

## Output

A text report (string) with DeFi protocol analytics: TVL rankings across protocols, chain-level breakdown, top gainers and losers, and optionally a detailed view for a specific protocol if a slug is provided.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {}
 }
}
```

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "protocol": {
       "type": "string",
       "description": "Protocol slug for detailed view (optional — omit for DeFi overview)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "status",
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "description": "Report object on success, error string on failure"
      },
      "meta": {
       "type": "object",
       "required": [
        "generatedAt",
        "degraded",
        "sourceHealth"
       ],
       "properties": {
        "degraded": {
         "type": "boolean"
        },
        "generatedAt": {
         "type": "string"
        },
        "sourceHealth": {
         "type": "object"
        },
        "stalenessSec": {
         "type": [
          "number",
          "null"
         ]
        }
       },
       "description": "Freshness. generatedAt = when we built this response. stalenessSec = age of our cached snapshot, absent on live pass-throughs. dataAsOf = vintage of the observations. degraded = an older good version was served."
      },
      "report": {
       "type": "string",
       "description": "DEPRECATED mirror of data.report — kept so pre-2026-08-10 integrations keep working."
      },
      "status": {
       "enum": [
        "success",
        "failed"
       ],
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-ottoai-services-7151a6b6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.ottoai.services](https://www.zero.xyz/host/x402.ottoai.services/llms.txt)
