Skip to main content
Glama
Alexander-Panov

Finam MCP Server

order_get_list

Retrieve a list of orders for your trading account to monitor and manage positions on the Finam platform.

Instructions

Получение списка заявок для аккаунта

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function `get_list` for retrieving orders list. Tool name becomes `order_get_list` due to mounting with `prefix='order'`.
    @order_mcp.tool(tags={"order"}) async def get_list() -> OrdersResponse: """Получение списка заявок для аккаунта""" return await get_finam_client().get_orders()
  • src/main.py:15-15 (registration)
    Registers the order_mcp tools with prefix 'order', transforming `get_list` to `order_get_list`.
    finam_mcp.mount(order_mcp, prefix="order")
  • Pydantic schema for the tool's response: list of OrderState objects.
    class OrdersResponse(BaseModel): """Список торговых заявок""" orders: list[OrderState] = Field(..., description="Заявки")
  • Client-side implementation of fetching orders, called via get_finam_client().get_orders().
    async def get_orders(self, account_id: str) -> OrdersResponse: """Получение списка заявок для аккаунта""" response, ok = await self._exec_request( self.RequestMethod.GET, self._url.format(account_id=account_id), ) if not ok: err = ErrorModel(**response) raise FinamTradeApiError(f"code={err.code} | message={err.message} | details={err.details}") return OrdersResponse(**response)
  • Utility function to retrieve the shared FinamClient instance from MCP context.
    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