defi_protocol_fees

Pack: defillama · Endpoint: https://gateway.pipeworx.io/defillama/mcp

Check daily fees and revenue for a DeFi protocol. Returns fee trends to analyze profitability and income changes over time.

Parameters

NameTypeRequiredDescription
protocolstringyesProtocol slug (e.g., “aave”, “uniswap”, “lido”)
data_typestringnoType of data: “dailyFees” or “dailyRevenue” (default: “dailyFees”)

Example call

Arguments

{
  "protocol": "uniswap"
}

curl

curl -X POST https://gateway.pipeworx.io/defillama/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"defi_protocol_fees","arguments":{"protocol":"uniswap"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('defi_protocol_fees', {
  "protocol": "uniswap"
});

More examples

{
  "protocol": "aave",
  "data_type": "dailyRevenue"
}

Response shape

Always returns: protocol, data_type, name, daily_chart_last_30

FieldTypeDescription
protocolstringProtocol slug
data_typestringType of fee data returned
namestringProtocol name
total_24hnumber | nullTotal fees/revenue in last 24 hours in USD
total_48h_to_24hnumber | nullTotal fees/revenue 48h-24h ago in USD
total_7dnumber | nullTotal fees/revenue last 7 days in USD
total_30dnumber | nullTotal fees/revenue last 30 days in USD
total_all_timenumber | nullTotal fees/revenue all time in USD
daily_chart_last_30arrayLast 30 days of daily data
Full JSON Schema
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "Protocol slug"
    },
    "data_type": {
      "type": "string",
      "enum": [
        "dailyFees",
        "dailyRevenue"
      ],
      "description": "Type of fee data returned"
    },
    "name": {
      "type": "string",
      "description": "Protocol name"
    },
    "total_24h": {
      "type": [
        "number",
        "null"
      ],
      "description": "Total fees/revenue in last 24 hours in USD"
    },
    "total_48h_to_24h": {
      "type": [
        "number",
        "null"
      ],
      "description": "Total fees/revenue 48h-24h ago in USD"
    },
    "total_7d": {
      "type": [
        "number",
        "null"
      ],
      "description": "Total fees/revenue last 7 days in USD"
    },
    "total_30d": {
      "type": [
        "number",
        "null"
      ],
      "description": "Total fees/revenue last 30 days in USD"
    },
    "total_all_time": {
      "type": [
        "number",
        "null"
      ],
      "description": "Total fees/revenue all time in USD"
    },
    "daily_chart_last_30": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "ISO date (YYYY-MM-DD)"
          },
          "value": {
            "type": "number",
            "description": "Daily fees/revenue in USD"
          }
        },
        "required": [
          "date",
          "value"
        ]
      },
      "description": "Last 30 days of daily data"
    }
  },
  "required": [
    "protocol",
    "data_type",
    "name",
    "daily_chart_last_30"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "defillama": {
      "url": "https://gateway.pipeworx.io/defillama/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026