get_derivatives_summary
Retrieve volume details for a specific perpetual protocol, including aggregated or broken-down charts, using protocol slug as input. Exclude charts as needed for streamlined data.
Instructions
GET /api/summary/derivatives/{protocol}
Volume Details about a specific perp protocol.
Parameters:
protocol: protocol slug (e.g., 'hyperliquid')
exclude_total_data_chart: true to exclude aggregated chart from response
exclude_total_data_chart_breakdown: true to exclude broken down chart from response
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exclude_total_data_chart | No | ||
| exclude_total_data_chart_breakdown | No | ||
| protocol | Yes |
Implementation Reference
- defillama_server.py:483-503 (handler)The main handler function for the get_derivatives_summary tool. It is registered via the @mcp.tool() decorator and implements the logic to query the DefiLlama API for volume details of a specific derivatives protocol, using parameters for protocol and chart exclusions.@mcp.tool() async def get_derivatives_summary( protocol: str, exclude_total_data_chart: bool = False, exclude_total_data_chart_breakdown: bool = False ) -> str: """GET /api/summary/derivatives/{protocol} Volume Details about a specific perp protocol. Parameters: protocol: protocol slug (e.g., 'hyperliquid') exclude_total_data_chart: true to exclude aggregated chart from response exclude_total_data_chart_breakdown: true to exclude broken down chart from response """ params = { 'excludeTotalDataChart': str(exclude_total_data_chart).lower(), 'excludeTotalDataChartBreakdown': str(exclude_total_data_chart_breakdown).lower() } result = await make_request('GET', f'/api/summary/derivatives/{protocol}', params) return str(result)