get_options_summary
Retrieve historical options trading volume summaries for specific protocols to analyze decentralized exchange activity and market trends.
Instructions
GET /api/summary/options/{protocol}
Get summary of options dex volume with historical data.
Parameters:
protocol: protocol slug (e.g., 'lyra')
data_type: desired data type (default: 'dailyNotionalVolume')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| protocol | Yes | ||
| data_type | No | dailyNotionalVolume |
Implementation Reference
- defillama_server.py:858-873 (handler)The handler function for the 'get_options_summary' tool. It makes an API request to DefiLlama's /api/summary/options/{protocol} endpoint with the specified data_type parameter, returning the JSON response as a string. The @mcp.tool() decorator registers this function as a tool.@mcp.tool() async def get_options_summary( protocol: str, data_type: Literal['dailyPremiumVolume', 'dailyNotionalVolume'] = 'dailyNotionalVolume' ) -> str: """GET /api/summary/options/{protocol} Get summary of options dex volume with historical data. Parameters: protocol: protocol slug (e.g., 'lyra') data_type: desired data type (default: 'dailyNotionalVolume') """ params = {'dataType': data_type} result = await make_request('GET', f'/api/summary/options/{protocol}', params) return str(result)
- defillama_server.py:858-858 (registration)The @mcp.tool() decorator registers the get_options_summary function as an MCP tool.@mcp.tool()
- defillama_server.py:860-861 (schema)Input schema defined by function parameters: protocol (str, required), data_type (Literal['dailyPremiumVolume', 'dailyNotionalVolume'], default='dailyNotionalVolume'). The docstring provides further description.protocol: str, data_type: Literal['dailyPremiumVolume', 'dailyNotionalVolume'] = 'dailyNotionalVolume'