index_weight_top10
Retrieve the top 10 weighted stocks for a specific Chinese stock market index to analyze index composition and major holdings.
Instructions
获取指数权重股前十
Args:
index_code: 指数代码
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index_code | No | SZ000002 |
Implementation Reference
- main.py:332-340 (handler)The handler function for the 'index_weight_top10' tool. It is registered via the @mcp.tool() decorator, fetches data using pysnowball.ball.index_weight_top10(index_code), processes it with process_data, and returns a dict. The input schema is defined by the type hint index_code: str (default 'SZ000002') and docstring.@mcp.tool() def index_weight_top10(index_code: str="SZ000002") -> dict: """获取指数权重股前十 Args: index_code: 指数代码 """ result = ball.index_weight_top10(index_code) return process_data(result)