get_fees_summary
Retrieve a summary of protocol fees and revenue, including historical data, for specified crypto protocols using API parameters like protocol slug and data type.
Instructions
GET /api/summary/fees/{protocol}
Get summary of protocol fees and revenue with historical data.
Parameters:
protocol: protocol slug (e.g., 'lyra')
data_type: desired data type (default: 'dailyFees')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_type | No | dailyFees | |
| protocol | Yes |
Implementation Reference
- defillama_server.py:875-890 (handler)The main handler function for the 'get_fees_summary' tool. It is decorated with @mcp.tool() for registration and implements the logic to fetch fees or revenue summary for a given protocol from the DefiLlama API using the make_request helper.@mcp.tool() async def get_fees_summary( protocol: str, data_type: Literal['dailyFees', 'dailyRevenue'] = 'dailyFees' ) -> str: """GET /api/summary/fees/{protocol} Get summary of protocol fees and revenue with historical data. Parameters: protocol: protocol slug (e.g., 'lyra') data_type: desired data type (default: 'dailyFees') """ params = {'dataType': data_type} result = await make_request('GET', f'/api/summary/fees/{protocol}', params) return str(result)