Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_quote_price_depth

Retrieve detailed price depth data for Vietnam stock market symbols, showing bid-ask spreads and order book information to analyze market liquidity and trading opportunities.

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
NameRequiredDescriptionDefault
symbolYes
output_formatNojson

Implementation Reference

  • The handler function implements the get_quote_price_depth tool. It uses vnstock.Quote to fetch the price depth data for a given symbol and returns it in JSON or DataFrame format. The @server.tool() decorator registers it with the FastMCP server.
    @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
  • The @server.tool() decorator registers the get_quote_price_depth function as an MCP tool in the FastMCP server.
    @server.tool()
  • Function signature defines the input schema with type hints for symbol (str) and output_format (Literal["json", "dataframe"]). The docstring provides further description.
    def get_quote_price_depth( symbol: str, output_format: Literal["json", "dataframe"] = "json" ):

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ariesanhthu/mcp-server-vietnam-stock-trading'

If you have feedback or need assistance with the MCP directory API, please join our Discord server