Skip to main content
Glama
xinkuang

China Stock MCP

by xinkuang

get_inner_trade_data

Retrieve internal shareholder trading data for Chinese stocks to analyze company insider transactions and ownership changes.

Instructions

获取公司内部股东交易数据

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes股票代码 (例如: '000001')
output_formatNo输出数据格式: json, csv, xml, excel, markdown, html。默认: markdownmarkdown

Implementation Reference

  • The handler function decorated with @mcp.tool, which registers and implements the 'get_inner_trade_data' MCP tool. It takes a stock symbol and optional output format, fetches internal shareholder trade data from 'xueqiu' source via akshare_one, handles empty data, and returns formatted output.
    @mcp.tool(name="get_inner_trade_data", description="获取公司内部股东交易数据")
    def get_inner_trade_data(
        symbol: Annotated[str, Field(description="股票代码 (例如: '000001')")],
        output_format: Annotated[
            Literal["json", "csv", "xml", "excel", "markdown", "html"],
            Field(description="输出数据格式: json, csv, xml, excel, markdown, html。默认: markdown"),
        ] = "markdown"
    ) -> str:
        """获取公司内部股东交易数据."""
        df = ako.get_inner_trade_data(symbol, source="xueqiu")
        if df.empty:
            df = pd.DataFrame()
        return _format_dataframe_output(df, output_format)
  • The @mcp.tool decorator registers the 'get_inner_trade_data' tool with the MCP server.
    @mcp.tool(name="get_inner_trade_data", description="获取公司内部股东交易数据")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xinkuang/china-stock-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server