get_onchain_dex_pool_endpoints
Access endpoints for on-chain DEX and pool analytics to analyze liquidity, trading pairs, OHLCV data, trader statistics, and trading activity across multiple networks and protocols. Gain insights into decentralized exchange ecosystems and trading metrics.
Instructions
Get all endpoints in the "On-Chain DEX & Pool Analytics" category. Endpoints for analyzing decentralized exchange pools, liquidity data, trading pairs, DEX rankings, pool filtering, trending pools, OHLCV data for pools/tokens, trading volume analysis, comprehensive on-chain trading metrics across multiple networks and DEXs, real-time DEX trading analytics, advanced token trading intelligence with DEXScreener-style metrics, trader statistics (makers, buyers, sellers), aggregated trading data by tokens, volume breakdowns, trading activity analysis, exchange platform analysis, comprehensive exchange ecosystem metrics including user statistics, DEX volume analytics across protocols and chains, and options trading analytics with protocol-specific data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/dynamic-tools.ts:149-182 (handler)Dynamic creation of the 'get_onchain_dex_pool_endpoints' tool including its handler function. The handler fetches tools for the 'On-Chain DEX & Pool Analytics' category using getAllToolsInCategory and returns a formatted list of tool names and descriptions.const categoryTools = ToolRegistry.map(category => { const categorySchema = z.object({}); const categoryEndpointName = category.name; return { metadata: { resource: 'dynamic_tools', operation: 'read' as const, tags: ['category'], }, tool: { name: categoryEndpointName, description: `Get all endpoints in the "${category.category}" category. ${category.description}`, inputSchema: zodToInputSchema(categorySchema), }, handler: async ( args: Record<string, unknown> | undefined, ): Promise<any> => { const toolsInCategory = getAllToolsInCategory(category.category); return asTextContentResult({ category: category.category, description: category.description, tools: toolsInCategory.map((tool ) => ({ name: tool.name, description: tool.description })), }); }, }; }); return [getEndpointTool, callEndpointTool, ...categoryTools];
- src/toolRegistry.ts:56-112 (registration)Registry entry defining the 'get_onchain_dex_pool_endpoints' category name, description, and list of underlying tools it aggregates.{ "category": "On-Chain DEX & Pool Analytics", "name": "get_onchain_dex_pool_endpoints", "description": "Endpoints for analyzing decentralized exchange pools, liquidity data, trading pairs, DEX rankings, pool filtering, trending pools, OHLCV data for pools/tokens, trading volume analysis, comprehensive on-chain trading metrics across multiple networks and DEXs, real-time DEX trading analytics, advanced token trading intelligence with DEXScreener-style metrics, trader statistics (makers, buyers, sellers), aggregated trading data by tokens, volume breakdowns, trading activity analysis, exchange platform analysis, comprehensive exchange ecosystem metrics including user statistics, DEX volume analytics across protocols and chains, and options trading analytics with protocol-specific data.", "tools": [ "onchain_categories_browser", "pools_onchain_categories_browser", "networks_onchain_new_pools_browser", "network_networks_onchain_new_pools_browser", "networks_onchain_trending_pools_browser", "network_networks_onchain_trending_pools_browser", "networks_onchain_dexes_browser", "pools_networks_onchain_dexes_browser", "networks_onchain_pools_browser", "address_networks_onchain_pools_browser", "pools_networks_onchain_info_browser", "timeframe_pools_networks_onchain_ohlcv_browser", "pools_networks_onchain_trades_browser", "timeframe_tokens_networks_onchain_ohlcv_browser", "tokens_networks_onchain_pools_browser", "tokens_networks_onchain_trades_browser", "pools_onchain_megafilter_browser", "pools_onchain_trending_search_browser", "search_onchain_pools_browser", "addresses_networks_simple_onchain_token_price_browser", "retrieve_token_transactions", "fetch_trading_pair_metrics", "fetch_multiple_pairs_metrics", "search_filter_pairs", "fetch_pair_information", "list_token_pairs", "fetch_token_pairs_details", "retrieve_liquidity_information", "fetch_liquidity_lock_details", "search_exchange_platforms", "describe_onchain_transaction", "exchanges_data", "exchange_details", "exchange_tickers_data", "exchange_volume_chart", "exchange_volume_chart_range", "derivatives_tickers_data", "derivatives_exchanges_data", "derivative_exchange_details", "network_trending_pools", "multi_pools_data", "network_exchanges_list", "pair_chart_metadata", // "token_liquidity_metadata", // not working (getting something went wrong) "dex_volumes_overview", "dex_volume_specific", "dex_volumes_chain_specific", "options_trading_overview", "options_trading_by_chain", "options_protocol_summary", ] },
- src/toolRegistry.ts:298-314 (helper)Helper function called by the handler to retrieve the list of supported tools matching the names in the category's tools array.export function getAllToolsInCategory(category: string){ let categoryUsed = ToolRegistry.find(tool => tool.category === category); if(!categoryUsed){ return [] } const allWrappedTools = supportedTools // return all the tools from wrapped tools that are in the category (name match) let toolsInCategory = []; for (const tool of categoryUsed.tools){ const wrappedTool = allWrappedTools.find(wrappedTool => wrappedTool.name === tool); if(wrappedTool){ toolsInCategory.push(wrappedTool); } else console.log(`Tool ${tool} not found in wrapped tools`); } return toolsInCategory; }
- src/dynamic-tools.ts:6-82 (helper)Helper function used by the handler to format the result as MCP text content, with truncation for large responses.export function asTextContentResult(result: Object): any { // return {data: result} // Estimate token count (roughly 4 chars per token) const MAX_TOKENS = 25000; const CHARS_PER_TOKEN = 4; const maxChar = MAX_TOKENS * CHARS_PER_TOKEN; // ~100,000 chars for 25k tokens const jsonString = JSON.stringify(result, null, 2); if (jsonString.length > maxChar) { // Try to intelligently truncate if it's an array if (Array.isArray(result)) { const truncatedArray = result.slice(0, Math.floor(result.length * maxChar / jsonString.length)); const truncatedJson = JSON.stringify({ results: truncatedArray, truncated: true, originalLength: result.length, returnedLength: truncatedArray.length, message: "Response truncated due to size limits. Consider using pagination." }, null, 2); return { content: [ { type: 'text', text: truncatedJson, }, ], }; } // For objects with results array if (typeof result === 'object' && result !== null && 'results' in result && Array.isArray((result as any).results)) { const originalResults = (result as any).results; const estimatedItemSize = jsonString.length / originalResults.length; const maxItems = Math.floor(maxChar / estimatedItemSize); const truncatedResult = { ...result, results: originalResults.slice(0, maxItems), truncated: true, originalCount: originalResults.length, returnedCount: maxItems, message: "Response truncated due to size limits. Use pagination parameters (limit/offset) for more results." }; return { content: [ { type: 'text', text: JSON.stringify(truncatedResult, null, 2), }, ], }; } // Fallback to simple truncation const truncated = jsonString.substring(0, maxChar) + '\n... [TRUNCATED DUE TO SIZE LIMITS]'; return { content: [ { type: 'text', text: truncated, }, ], }; } return { content: [ { type: 'text', text: jsonString, }, ], }; }