Skip to main content
Glama

getPoolTransactions

Retrieve recent transactions for a specific pool, including swaps, adds, and removes. Specify network and pool address to access detailed activity data, with options for pagination and cursor-based navigation.

Instructions

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

Input Schema

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

Implementation Reference

  • The handler function that constructs the DexPaprika API endpoint for retrieving transactions of a specific pool on a network, fetches the data using the helper fetchFromAPI, and formats it with formatMcpResponse for MCP response.
    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); }
  • Zod schema defining the input parameters for the getPoolTransactions tool, including required network and poolAddress, and optional pagination parameters.
    { 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:218-236 (registration)
    The server.tool registration call that defines the 'getPoolTransactions' tool, including its 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); } );
  • Shared helper function used by getPoolTransactions (and other tools) to make API requests to DexPaprika with comprehensive error handling for common issues like 410 (deprecated endpoints) and 429 (rate limits).
    async function fetchFromAPI(endpoint) { try { const response = await fetch(`${API_BASE_URL}${endpoint}`); if (!response.ok) { if (response.status === 410) { throw new Error( 'This endpoint has been permanently removed. Please use network-specific endpoints instead. ' + 'For example, use /networks/{network}/pools instead of /pools. ' + 'Get available networks first using the getNetworks function.' ); } if (response.status === 429) { throw new Error( 'Rate limit exceeded. You have reached the maximum number of requests allowed for the free tier. ' + 'To increase your rate limits and access additional features, please consider upgrading to a paid plan at https://docs.dexpaprika.com/' ); } throw new Error(`API request failed with status ${response.status}`); } return await response.json(); } catch (error) { console.error(`Error fetching from API: ${error.message}`); throw error; } }
  • Shared helper function used by getPoolTransactions (and other tools) to format API responses into the MCP-standard text content structure.
    function formatMcpResponse(data) { return { content: [ { type: "text", text: JSON.stringify(data) } ] }; }

Other Tools

Related Tools

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

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