Skip to main content
Glama
TeleKashOracle

telekash-mcp-server

get_market_stats

Retrieve aggregate statistics across prediction markets including totals, categories, sources, and trading volume for market overview and portfolio allocation decisions.

Instructions

Get aggregate statistics across all prediction markets — totals, categories, sources, and volume.

Returns total market count, active markets, category distribution, source breakdown (Kalshi vs Polymarket), and aggregate trading volume. Use for market overview, portfolio allocation decisions, or understanding the prediction market landscape.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler implementation for get_market_stats, querying telekash_markets and aggregating results by category and source.
    async function getMarketStats(supabase: SupabaseClient): Promise<ToolResult> {
      const { data: markets, error } = await supabase
        .from("telekash_markets")
        .select("id, status, category, source");
      if (error) throw new Error(`Stats error: ${error.message}`);
    
      const all = markets || [];
      const byCategory: Record<string, number> = {};
      const bySource: Record<string, number> = {};
      for (const m of all) {
        byCategory[m.category || "other"] =
          (byCategory[m.category || "other"] || 0) + 1;
        bySource[m.source || "unknown"] =
          (bySource[m.source || "unknown"] || 0) + 1;
  • The tool registration/dispatch logic within the main tool handler switch block.
    case "get_market_stats":
      return getMarketStats(supabase);
  • The MCP tool definition and schema for get_market_stats.
    {
      name: "get_market_stats",
      description: `Get aggregate statistics — total markets, categories, sources, and volume.`,
      inputSchema: { type: "object", properties: {}, required: [] },
    },

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/TeleKashOracle/mcp-server'

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