get_company_insider_deals
Retrieve insider trading transactions for Vietnamese companies to monitor executive and major shareholder activities in the stock market.
Instructions
Get company insider deals from stock market
Args:
symbol: str
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrame
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:199-217 (handler)The handler function implementing the get_company_insider_deals tool. It uses TCBSCompany from vnstock to fetch insider deals for a given symbol and returns the data as JSON or DataFrame.@server.tool() def get_company_insider_deals( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get company insider deals from stock market Args: symbol: str output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ equity = TCBSCompany(symbol=symbol) df = equity.insider_deals() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df
- src/vnstock_mcp/server.py:199-199 (registration)The @server.tool() decorator registers the get_company_insider_deals function as an MCP tool.@server.tool()
- src/vnstock_mcp/server.py:201-202 (schema)Input schema defined by function parameters with type hints: symbol (str), output_format (Literal["json", "dataframe"] default "json"). Docstring provides further description.symbol: str, output_format: Literal["json", "dataframe"] = "json" ):