Skip to main content
Glama
Alexander-Panov

Finam MCP Server

market_data_get_last_quote

Retrieve the most recent quote for a financial instrument, including bid/ask prices, open/close values, last trade price, and daily trading volumes.

Instructions

получение последней котировки инструмента (цена покупки/продажи, цена открытия/закрытия, цена последней сделки, дневной объем сделок, объем покупки/продажи)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYessymbol в формате: SYMBOL@MIC (например, YDEX@MISX)

Implementation Reference

  • The core handler function for the 'market_data_get_last_quote' tool (prefixed from 'get_last_quote'). It retrieves the last quote using the Finam client.
    @market_data_mcp.tool(tags={"market_data"}) async def get_last_quote(symbol: Symbol) -> QuoteResponse: """получение последней котировки инструмента (цена покупки/продажи, цена открытия/закрытия, цена последней сделки, дневной объем сделок, объем покупки/продажи)""" return await get_finam_client().get_last_quote(symbol)
  • src/main.py:13-13 (registration)
    Mounts the market_data_mcp FastMCP instance with 'market_data' prefix, enabling tool names like 'market_data_get_last_quote'.
    finam_mcp.mount(market_data_mcp, prefix="market_data")
  • Pydantic schema definition for the 'symbol' input parameter used in the tool.
    Symbol: type[str] = Annotated[ str, Field( description="symbol в формате: SYMBOL@MIC (например, YDEX@MISX)", pattern=r"^[A-Z0-9]+@[A-Z]+$", # Regex валидация examples=["YDEX@MISX", "SBER@TQBR"] ) ]
  • Utility function to obtain the FinamClient instance from the MCP context, used by the handler.
    def get_finam_client() -> FinamClient: return get_context().get_state("finam_client")

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/Alexander-Panov/finam-mcp'

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