get_fdv_performance
Retrieve performance charts for crypto narratives by category, weighted by market capitalization, across specified time periods.
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)Handler function implementing the get_fdv_performance tool. Registered via @mcp.tool() decorator. Validates period input, fetches data from DefiLlama API /fdv/performance/{period}, and returns JSON string. Type hints provide input schema (period as Literal).@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)