get_market_and_price_endpoints
Access real-time and historical cryptocurrency market data, prices, trading volumes, and analytics including CEX trading, derivatives pricing, and social sentiment metrics.
Instructions
Get all endpoints in the "Market Data and Price" category. Endpoints to retrieve real-time and historical cryptocurrency prices, market caps, trading volumes, OHLC data, global market statistics, supported currencies, basic market performance metrics across different timeframes and asset platforms, stablecoin market analytics, stablecoin price tracking, comprehensive stablecoin market cap data across multiple chains, social sentiment-enhanced market metrics including Galaxy Score™ and AltRank™ rankings, centralized exchange (CEX) trading data including real-time tickers, order books, recent trades, candlestick charts, best bid/ask prices, derivatives pricing (index, mark, and premium), and perpetual futures funding rates across major exchanges.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/toolRegistry.ts:4-55 (registration)Registry entry that defines the 'get_market_and_price_endpoints' tool name, category, description, and list of sub-tools it aggregates.{ "category": "Market Data and Price", "name": "get_market_and_price_endpoints", "description": "Endpoints to retrieve real-time and historical cryptocurrency prices, market caps, trading volumes, OHLC data, global market statistics, supported currencies, basic market performance metrics across different timeframes and asset platforms, stablecoin market analytics, stablecoin price tracking, comprehensive stablecoin market cap data across multiple chains, social sentiment-enhanced market metrics including Galaxy Score™ and AltRank™ rankings, centralized exchange (CEX) trading data including real-time tickers, order books, recent trades, candlestick charts, best bid/ask prices, derivatives pricing (index, mark, and premium), and perpetual futures funding rates across major exchanges.", "tools": [ "coins_index", "coins_market_data_browser", "coins_history_browser", "range_coins_market_chart_browser", "range_coins_ohlc_browser", "simple_price_browser", "gainers_losers_browser", "contract_coins_browser", "range_contract_coins_market_chart_browser", "id_simple_token_price_browser", "global_browser", "simple_supported_vs_currencies_browser", // "get_token_prices_browser", defi // "get_historical_prices_browser", defi "retrieve_token_pricing", "fetch_price_chart_data", "fetch_token_mini_charts", "fetch_token_chart_urls", "coin_tickers_data", "coin_historical_chart", "btc_exchange_rates", "global_market_cap_chart", "companies_crypto_treasury", "stablecoins_list", "stablecoin_chains_list", "stablecoin_charts_global", "stablecoin_charts_by_chain", "stablecoin_prices_current", "scan_crypto_market_metrics", "analyze_coin_performance", "browse_supported_stocks", "retrieve_stock_analytics", "trading_pair_ticker_data", "multiple_tickers_data", "trading_pair_orderbook_data", "trading_pair_recent_trades", "trading_pair_candlestick_data", "multiple_pairs_best_prices", "level2_orderbook_data", "derivatives_index_candlestick", "derivatives_mark_candlestick", "perpetual_premium_index_data", "perpetual_funding_rate_current", "perpetual_funding_rate_history", "perpetual_funding_rates_all" ] },
- src/dynamic-tools.ts:148-182 (handler)Code that dynamically creates the tool object for 'get_market_and_price_endpoints' (and other categories), including its empty input schema, description, and handler function that fetches and returns the list of tools in the category.// Create category-specific endpoints that act as list functionality 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/dynamic-tools.ts:6-82 (helper)Helper function called by the handler to format the category tools list as MCP-compatible text content, with automatic 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, }, ], }; }
- src/toolRegistry.ts:298-314 (helper)Helper function invoked by the handler to retrieve the full tool objects matching the names listed in the category registry.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; }