get_company_insider_deals
Retrieve insider trading data for Vietnam-listed companies to analyze executive and major shareholder transactions.
Instructions
Get company insider deals from stock market
Args:
symbol: str
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrameInput Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:199-216 (handler)The handler function decorated with @server.tool(), which registers and implements the 'get_company_insider_deals' tool. It retrieves insider deals for a given company symbol using the vnstock library's TCBSCompany and returns the data in JSON or DataFrame format.
@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