Skip to main content
Glama
Alexander-Panov

Finam MCP Server

account_get_trades

Retrieve account trade history from the Finam trading platform by specifying date ranges and result limits for transaction analysis.

Instructions

Получение истории по сделкам аккаунта

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_timeYes
end_timeYes
limitNo

Implementation Reference

  • The FastMCP tool handler for 'get_trades', which due to the 'account' prefix becomes the 'account_get_trades' tool. It delegates to the FinamClient.get_trades method.
    @account_mcp.tool(tags={"account"}) async def get_trades(start_time: AwareDatetime, end_time: AwareDatetime, limit: int = 10) -> GetTradesResponse: """Получение истории по сделкам аккаунта""" return await get_finam_client().get_trades(start_time, end_time, limit)
  • src/main.py:12-12 (registration)
    Mounting the account_mcp server with 'account' prefix onto the main FinamMCP server, prefixing its tools (e.g., 'get_trades' -> 'account_get_trades').
    finam_mcp.mount(account_mcp, prefix="account")
  • Registration of the 'get_trades' tool on the account_mcp FastMCP instance using the @tool decorator.
    @account_mcp.tool(tags={"account"})
  • Helper method in FinamClient that implements the core logic for fetching trades by wrapping the finam_trade_api client call.
    async def get_trades(self, start_time: datetime, end_time: datetime, limit: int = 10): return await self.client.account.get_trades( GetTradesRequest(account_id=self.account_id, start_time=start_time.isoformat(), end_time=end_time.isoformat(), limit=limit))
  • Pydantic model used for the input parameters to the underlying API client for get_trades.
    class GetTradesRequest(GetTransactionsRequest): account_id: str start_time: str end_time: str limit: int

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