get_all_symbols
Retrieve all stock symbols from Vietnam's stock market to access comprehensive market data, supporting JSON or DataFrame output formats for analysis.
Instructions
Get all symbols from stock market
Args:
output_format: Literal['json', 'dataframe'] = 'json'
Returns:
pd.DataFrame or json
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_format | No | json |
Implementation Reference
- src/vnstock_mcp/server.py:364-379 (handler)Handler function for the get_all_symbols tool. Registered via @server.tool(). Fetches all stock symbols using VCIListing.symbols_by_exchange() and returns as JSON string or pandas DataFrame based on output_format parameter.@server.tool() def get_all_symbols(output_format: Literal["json", "dataframe"] = "json"): """ Get all symbols from stock market Args: output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame or json """ listing = VCIListing() df = listing.symbols_by_exchange() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df