Skip to main content
Glama

get_pool_history

Retrieve historical pool data including past winners, price changes, pool sizes, and share distribution to analyze trends and calibrate competition strategies.

Instructions

Get historical pool results. Shows past winners, price changes, pool sizes, and share distribution. Use this to calibrate your strategy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of historical pools to return (max 100)

Implementation Reference

  • The get_pool_history tool handler that fetches historical pool data via a GET request to the Conviction.fm API, processes the results, and returns them in a formatted string.
    // ── Tool: get_pool_history ──
    
    server.tool(
      "get_pool_history",
      "Get historical pool results. Shows past winners, price changes, pool sizes, and share distribution. Use this to calibrate your strategy.",
      {
        limit: z.number().min(1).max(100).default(20).describe("Number of historical pools to return (max 100)"),
      },
      async ({ limit }) => {
        const data = (await apiGet(`pool-state?mode=history&limit=${limit}`)) as any;
        const pools = data.pools || [];
    
        if (pools.length === 0) {
          return { content: [{ type: "text", text: "No historical data available yet." }] };
        }
    
        const lines = pools.map((p: any) => {
          const aChange = p.tokenA?.priceChange24h?.toFixed(2) ?? "?";
          const bChange = p.tokenB?.priceChange24h?.toFixed(2) ?? "?";
          const total = p.totalPoolUsdc?.toFixed(0) ?? "?";
          const aShare = p.tokenA?.poolSharePercent?.toFixed(0) ?? "?";
          const bShare = p.tokenB?.poolSharePercent?.toFixed(0) ?? "?";
          return `${p.tokenPairKey}: Winner=${p.winnerTokenId ?? "?"} | ${p.tokenA?.id}=${aChange}% ${p.tokenB?.id}=${bChange}% | $${total} pool (${aShare}/${bShare})`;
        });
    
        return {
          content: [
            {
              type: "text",
              text: `# Pool History (${pools.length} results)\n\n${lines.join("\n")}\n\n_Use this data to calibrate your strategy._`,
            },
          ],
        };
      }
    );

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/abcxz/conviction-fm'

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