get_transactions
Retrieve transaction history for deposits, withdrawals, orders, dividends, and fees from Trading 212 investment accounts to track financial activity and analyze portfolio performance.
Instructions
Get transaction history including deposits, withdrawals, orders, dividends, and fees
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Pagination cursor for fetching next page | |
| limit | No | Maximum number of results to return |
Implementation Reference
- src/client.ts:296-311 (handler)The actual implementation of getTransactions on the client class.
async getTransactions(params?: { cursor?: number; limit?: number; }): Promise<{ items: Transaction[]; nextPagePath?: string }> { const queryParams = new URLSearchParams(); if (params?.cursor) queryParams.append('cursor', params.cursor.toString()); if (params?.limit) queryParams.append('limit', params.limit.toString()); const endpoint = `/equity/history/transactions${queryParams.toString() ? `?${queryParams.toString()}` : ''}`; const response = await this.request<{ items: unknown[]; nextPagePath?: string }>(endpoint); return { items: z.array(TransactionSchema).parse(response.items), nextPagePath: response.nextPagePath, }; } - src/index.ts:825-836 (handler)The MCP tool handler for 'get_transactions' which calls the client method.
case 'get_transactions': { const { cursor, limit } = PaginatedInputSchema.parse(args); const transactions = await client.getTransactions({ cursor, limit }); return { content: [ { type: 'text', text: JSON.stringify(transactions, null, 2), }, ], }; }