Skip to main content
Glama

getPoolTransactions

Retrieve recent swap, add, and remove transactions for a specific liquidity pool on supported blockchains to monitor trading activity and analyze pool dynamics.

Instructions

Get recent transactions for a specific pool. Shows swaps, adds, removes. Requires network and pool address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork ID from getNetworks (e.g., "ethereum", "solana")
poolAddressYesPool address or identifier
pageNoPage number for pagination (up to 100 pages)
limitNoNumber of items per page (max 100)
cursorNoTransaction ID used for cursor-based pagination

Implementation Reference

  • The handler function for the getPoolTransactions tool. It constructs an API endpoint based on the input parameters (network, poolAddress, page, limit, cursor) and fetches transaction data using fetchFromAPI, then formats it with formatMcpResponse.
    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); }
  • The input schema for the getPoolTransactions tool, defined using Zod (z.object implied), with parameters for network, poolAddress, page, limit, and optional cursor.
    { 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') },
  • src/index.js:212-230 (registration)
    The registration of the getPoolTransactions tool using server.tool(), including the tool name, description, input schema, and inline handler function.
    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); } );

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/infinity-smithpl/dexpaprika-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server