get_price_board
Retrieve current price board data for specified Vietnam stock symbols, returning results in JSON or DataFrame format for market analysis.
Instructions
Get price board from stock market
Args:
symbols: list[str] (list of symbols to get price board)
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrame
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | ||
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:753-771 (handler)The handler function for the 'get_price_board' tool. It is registered via the @server.tool() decorator in FastMCP. Fetches price board data for given symbols using VCITrading and returns as JSON or pandas DataFrame.@server.tool() def get_price_board( symbols: list[str], output_format: Literal["json", "dataframe"] = "json" ): """ Get price board from stock market Args: symbols: list[str] (list of symbols to get price board) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ trading = VCITrading() df = trading.price_board(symbols_list=symbols) if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df
- src/vnstock_mcp/server.py:753-753 (registration)The @server.tool() decorator registers the get_price_board function as an MCP tool.@server.tool()
- src/vnstock_mcp/server.py:757-762 (schema)Docstring and type hints define the input schema (symbols: list[str], output_format: Literal["json", "dataframe"]) and output (pd.DataFrame or JSON). FastMCP uses this for tool schema.""" Get price board from stock market Args: symbols: list[str] (list of symbols to get price board) output_format: Literal['json', 'dataframe'] = 'json' Returns: