Skip to main content
Glama
ariesanhthu

VNStock MCP Server

by ariesanhthu

get_quote_intraday_price

Retrieve intraday stock price data for Vietnam market symbols to analyze real-time trading patterns and price movements.

Instructions

Get quote intraday price from stock market
Args:
    symbol: str (symbol to get intraday price)
    page_size: int = 500 (max: 100000) (number of rows to return)
    last_time: str = None (last time to get intraday price from)
    output_format: Literal['json', 'dataframe'] = 'json'
Returns:
    pd.DataFrame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
page_sizeNo
last_timeNo
output_formatNojson

Implementation Reference

  • The handler function for the 'get_quote_intraday_price' tool. It uses vnstock.Quote to fetch intraday price data with pagination and optional last_time filter, returning the result as JSON or pandas DataFrame.
    @server.tool()
    def get_quote_intraday_price(
        symbol: str,
        page_size: int = 100,
        last_time: str = None,
        output_format: Literal["json", "dataframe"] = "json",
    ):
        """
        Get quote intraday price from stock market
        Args:
            symbol: str (symbol to get intraday price)
            page_size: int = 500 (max: 100000) (number of rows to return)
            last_time: str = None (last time to get intraday price from)
            output_format: Literal['json', 'dataframe'] = 'json'
        Returns:
            pd.DataFrame
        """
        quote = Quote(symbol=symbol, source="VCI")
        df = quote.intraday(page_size=page_size, last_time=last_time)
        if output_format == "json":
            return df.to_json(orient="records", force_ascii=False)
        else:
            return df
  • The @server.tool() decorator registers the get_quote_intraday_price function as an MCP tool.
    @server.tool()
  • Input schema defined by the function parameters with type hints and defaults.
        symbol: str,
        page_size: int = 100,
        last_time: str = None,
        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