get_inner_trade_data
Retrieve insider trading data for specific companies to analyze executive and institutional stock transactions.
Instructions
Get company insider trading data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock symbol/ticker (e.g. '000001') |
Implementation Reference
- src/akshare_one_mcp/server.py:227-233 (handler)The handler function for the 'get_inner_trade_data' MCP tool. It is decorated with @mcp.tool, which handles both execution and registration to the FastMCP server instance. The function fetches insider trading data for a given stock symbol using the akshare_one library and returns it as JSON.@mcp.tool def get_inner_trade_data( symbol: Annotated[str, Field(description="Stock symbol/ticker (e.g. '000001')")], ) -> str: """Get company insider trading data.""" df = ako.get_inner_trade_data(symbol, source="xueqiu") return df.to_json(orient="records") or "[]"
- src/akshare_one_mcp/server.py:227-227 (registration)The @mcp.tool decorator registers the get_inner_trade_data function as an MCP tool on the FastMCP instance defined earlier in the file.@mcp.tool
- Pydantic-based input schema defined via Annotated type hints with Field descriptions for the tool parameters and return type.def get_inner_trade_data( symbol: Annotated[str, Field(description="Stock symbol/ticker (e.g. '000001')")], ) -> str: