account_get_transactions
Retrieve account transaction history from Finam trading platform. Specify date range to view past trades, deposits, and withdrawals for financial tracking.
Instructions
Получение списка транзакций аккаунта
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start_time | Yes | ||
| end_time | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transactions | Yes |
Implementation Reference
- src/servers/account.py:19-23 (handler)MCP tool handler implementing the account_get_transactions tool (prefixed from get_transactions). Proxies to FinamClient.get_transactions.
@account_mcp.tool(tags={"account"}) async def get_transactions(start_time: AwareDatetime, end_time: AwareDatetime, limit: int = 10) -> GetTransactionsResponse: """Получение списка транзакций аккаунта""" return await get_finam_client().get_transactions(start_time, end_time, limit) - src/main.py:12-12 (registration)Registers the account_mcp server under the 'account' prefix, enabling tool names like 'account_get_transactions'.
finam_mcp.mount(account_mcp, prefix="account") - src/tradeapi/client.py:45-48 (helper)Core helper method in FinamClient that performs the actual API call to fetch transactions.
async def get_transactions(self, start_time: datetime, end_time: datetime, limit: int = 10): return await self.client.account.get_transactions( GetTransactionsRequest(account_id=self.account_id, start_time=start_time.isoformat(), end_time=end_time.isoformat(), limit=limit)) - src/servers/utils.py:6-8 (helper)Utility function to retrieve the FinamClient instance from MCP context state.
def get_finam_client() -> FinamClient: return get_context().get_state("finam_client") - src/servers/account.py:10-10 (registration)Creates the FastMCP instance for account tools, where get_transactions is registered via decorator.
account_mcp = FastMCP(name="FinamAccountServer")