Skip to main content
Glama
Alexander-Panov

Finam MCP Server

order_get

Retrieve detailed information about a specific trading order from the Finam platform using its unique order ID.

Instructions

Получение информации о конкретном ордере

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes

Implementation Reference

  • MCP tool handler for 'order_get': retrieves specific order details by ID via Finam client.
    @order_mcp.tool(tags={"order"}) async def get(order_id: str) -> OrderState: """Получение информации о конкретном ордере""" return await get_finam_client().get_order(order_id)
  • Pydantic model for OrderState, defining the output structure of the order_get tool.
    class OrderState(BaseModel): """Состояние заявки""" order_id: str = Field(..., description="Идентификатор заявки") exec_id: str | None = Field(None, description="Идентификатор исполнения") status: OrderStatus = Field(..., description="Статус заявки") order: Order = Field(..., description="Заявка") transact_at: datetime | None = Field(None, description="Дата и время выставления заявки") accept_at: datetime | None = Field(None, description="Дата и время принятия заявки") withdraw_at: datetime | None = Field(None, description="Дата и время отмены заявки")
  • src/main.py:15-15 (registration)
    Registers the order_mcp tools under 'order_' prefix, naming the 'get' tool as 'order_get'.
    finam_mcp.mount(order_mcp, prefix="order")
  • Utility function to retrieve the FinamClient instance from MCP context, used by the handler.
    def get_finam_client() -> FinamClient: return get_context().get_state("finam_client")
  • No, wrong. Wait, actually for get_order it's line 20.
    return await get_finam_client().get_orders() @order_mcp.tool(tags={"order"}) async def get(order_id: str) -> OrderState: """Получение информации о конкретном ордере""" return await get_finam_client().get_order(order_id)

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