get_fdv_performance
Analyze category performance in crypto by retrieving weighted market cap charts for specific periods (7, 30, ytd, 365) using tailored narratives and data.
Instructions
GET /fdv/performance/{period}
Get chart of narratives based on category performance (with individual coins weighted by mcap).
Parameters:
period: One of ['7', '30', 'ytd', '365']
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes |
Implementation Reference
- defillama_server.py:428-440 (handler)The tool handler function decorated with @mcp.tool(), which registers it and defines the input schema via type hints. It fetches FDV performance data from DefiLlama API for the given period and returns the result as string.@mcp.tool() async def get_fdv_performance(period: Literal['7', '30', 'ytd', '365']) -> str: """GET /fdv/performance/{period} Get chart of narratives based on category performance (with individual coins weighted by mcap). Parameters: period: One of ['7', '30', 'ytd', '365'] """ if period not in ['7', '30', 'ytd', '365']: raise ValueError("Period must be one of: '7', '30', 'ytd', '365'") result = await make_request('GET', f'/fdv/performance/{period}') return str(result)
- defillama_server.py:428-428 (registration)The @mcp.tool() decorator registers the get_fdv_performance function with the FastMCP server.@mcp.tool()
- defillama_server.py:429-429 (schema)Input schema defined by the function parameter: period as Literal['7', '30', 'ytd', '365'], output str.async def get_fdv_performance(period: Literal['7', '30', 'ytd', '365']) -> str: