getPoolTransactions
Retrieve recent transaction history for any liquidity pool across multiple blockchains, displaying swaps, liquidity additions, and removals to monitor pool activity and trading patterns.
Instructions
Get recent transactions for a specific pool. Shows swaps, adds, removes. Requires network and pool address.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Transaction ID used for cursor-based pagination | |
| limit | No | Number of items per page (max 100) | |
| network | Yes | Network ID from getNetworks (e.g., "ethereum", "solana") | |
| page | No | Page number for pagination (up to 100 pages) | |
| poolAddress | Yes | Pool address or identifier |
Implementation Reference
- src/index.js:212-230 (registration)Full registration of the getPoolTransactions tool, including schema (input parameters with Zod validation), inline handler function that builds the API endpoint for pool transactions and fetches data using the shared fetchFromAPI helper, and formats the response.server.tool( 'getPoolTransactions', 'Get recent transactions for a specific pool. Shows swaps, adds, removes. Requires network and pool address.', { network: z.string().describe('Network ID from getNetworks (e.g., "ethereum", "solana")'), poolAddress: z.string().describe('Pool address or identifier'), page: z.number().optional().default(0).describe('Page number for pagination (up to 100 pages)'), limit: z.number().optional().default(10).describe('Number of items per page (max 100)'), cursor: z.string().optional().describe('Transaction ID used for cursor-based pagination') }, async ({ network, poolAddress, page, limit, cursor }) => { let endpoint = `/networks/${network}/pools/${poolAddress}/transactions?page=${page}&limit=${limit}`; if (cursor) { endpoint += `&cursor=${encodeURIComponent(cursor)}`; } const data = await fetchFromAPI(endpoint); return formatMcpResponse(data); } );