get_quote_price_depth
Retrieve detailed price depth data for Vietnam stocks to analyze market liquidity and order book dynamics. Specify a stock symbol and choose JSON or dataframe output format.
Instructions
Get quote price depth from stock market
Args:
symbol: str (symbol to get price depth)
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:730-747 (handler)The handler function implementing the get_quote_price_depth tool logic, using vnstock.Quote.price_depth(). It is also registered as an MCP tool via the @server.tool() decorator. Supports JSON or DataFrame output.@server.tool() def get_quote_price_depth( symbol: str, output_format: Literal["json", "dataframe"] = "json" ): """ Get quote price depth from stock market Args: symbol: str (symbol to get price depth) output_format: Literal['json', 'dataframe'] = 'json' Returns: pd.DataFrame """ quote = Quote(symbol=symbol, source="VCI") df = quote.price_depth() if output_format == "json": return df.to_json(orient="records", force_ascii=False) else: return df