# Heurist Mesh: DeFi Protocol Metrics via DefiLlama

> Heurist Mesh: DeFi Protocol Metrics via DefiLlama is a paid API for AI agents from mesh.heurist.xyz, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Retrieves DeFi protocol metrics including TVL, fees, volume, revenue, deployed chains, and growth trend from DefiLlama data for a given protocol slug.

## Facts

- Endpoint: POST https://mesh.heurist.xyz/x402/solana/agents/DefiLlamaAgent/get_protocol_metrics
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/heurist-mesh-defi-protocol-metrics-via-defillama-98fb8efb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PBV8I3fdZn-XvgZ6puqeG

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 heurist-mesh-defi-protocol-metrics-via-defillama-98fb8efb -d '<json body>'
```

Example prompt: Can you pull up the DeFi metrics for Uniswap — I want to see its TVL, fees, volume, revenue, and which chains it's deployed on? The DefiLlama slug is 'uniswap'.

## When to prefer this

Use this endpoint when you need structured on-chain DeFi protocol analytics (TVL, fees, revenue, volume, chain coverage) sourced from DefiLlama. Prefer it over general web search when you need numeric, machine-readable protocol metrics rather than narrative summaries. It is particularly suited for comparing DeFi protocols, tracking growth trends, or building DeFi research reports where DefiLlama slugs are known.

## Known failure modes

- Invalid or unknown DefiLlama slug returns an error or empty result
- Protocol not indexed by DefiLlama returns no data
- Network timeout or upstream DefiLlama API unavailability
- Payment failure if USDC balance is insufficient for the $0.003 fee
- DEX-specific fields like volume absent for non-DEX protocols

## How this service works

Get metrics for a DeFi protocol including TVL, fees, volume (for DEXes), revenue, deployed chains, and growth trend. Use this tool when you want to analyze a DeFi project. You must input the defillama slug obtained from project knowledge base.

## Output

Returns structured metrics for the requested DeFi protocol including TVL (total value locked), generated fees, trading volume (for DEXes), protocol revenue, list of deployed blockchain networks, and a growth trend indicator derived from DefiLlama data.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "protocol"
     ],
     "properties": {
      "debug": {
       "type": "boolean",
       "default": false,
       "description": "Debug mode flag. ALWAYS use false."
      },
      "protocol": {
       "type": "string",
       "description": "Protocol slug (e.g., 'aave-v3', 'curve-dex')"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "result": {
       "type": "object",
       "additionalProperties": true
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/heurist-mesh-defi-protocol-metrics-via-defillama-98fb8efb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mesh.heurist.xyz](https://www.zero.xyz/host/mesh.heurist.xyz/llms.txt)
