get_options_overview
Retrieve summaries of volumes and historical data for options DEXs using configurable parameters to refine results, such as excluding aggregated or broken-down charts and specifying data types.
Instructions
GET /api/overview/options
List all options dexs along with summaries of their volumes and dataType history data.
Parameters:
exclude_total_data_chart: true to exclude aggregated chart from response
exclude_total_data_chart_breakdown: true to exclude broken down chart from response
data_type: desired data type (default: 'dailyNotionalVolume')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_type | No | dailyNotionalVolume | |
| exclude_total_data_chart | No | ||
| exclude_total_data_chart_breakdown | No |
Implementation Reference
- defillama_server.py:810-831 (handler)The handler function for 'get_options_overview' tool. Decorated with @mcp.tool() for registration. Defines input schema via type annotations and docstring. Implements API call to DefiLlama /api/overview/options endpoint.@mcp.tool() async def get_options_overview( exclude_total_data_chart: bool = True, exclude_total_data_chart_breakdown: bool = True, data_type: Literal['dailyPremiumVolume', 'dailyNotionalVolume'] = 'dailyNotionalVolume' ) -> str: """GET /api/overview/options List all options dexs along with summaries of their volumes and dataType history data. Parameters: exclude_total_data_chart: true to exclude aggregated chart from response exclude_total_data_chart_breakdown: true to exclude broken down chart from response data_type: desired data type (default: 'dailyNotionalVolume') """ params = { 'excludeTotalDataChart': str(exclude_total_data_chart).lower(), 'excludeTotalDataChartBreakdown': str(exclude_total_data_chart_breakdown).lower(), 'dataType': data_type } result = await make_request('GET', '/api/overview/options', params) return str(result)
- defillama_server.py:30-38 (helper)Shared helper function used by get_options_overview (and other tools) to make HTTP requests to the DefiLlama API.async def make_request(method: str, endpoint: str, params: Optional[Dict[str, Any]] = None) -> Any: """Make a request to the DefiLlama API.""" try: response = await client.request(method, endpoint, params=params) response.raise_for_status() return response.json() except Exception as e: return f"Error: {str(e)}"