Skip to main content
Glama
darved2305

groww-mcp

by darved2305

get_top_movers

Retrieve the top 5 gaining and losing stocks for the current trading day to monitor market performance.

Instructions

Top 5 gainers and losers for the day

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'get_top_movers' MCP tool, which fetches market movers via the growwClient and formats them into a text report.
    // ── get_top_movers ────────────────────────────────────────
    server.tool(
      "get_top_movers",
      "Top 5 gainers and losers for the day",
      {},
      async () => {
        try {
          const { gainers, losers } = await growwClient.getTopMovers();
    
          const gLines = gainers.map((g, i) =>
            `  ${i + 1}. ${g.symbol.padEnd(12)} ${formatCurrencyExact(g.ltp).padStart(12)}  ${formatPercent(g.changePercent)}`
          );
          const lLines = losers.map((l, i) =>
            `  ${i + 1}. ${l.symbol.padEnd(12)} ${formatCurrencyExact(l.ltp).padStart(12)}  ${formatPercent(l.changePercent)}`
          );
    
          const text = [
            `🏆 TOP MOVERS — ${new Date().toLocaleDateString("en-IN", { timeZone: "Asia/Kolkata" })}`,
            `${"─".repeat(50)}`,
            `📈 GAINERS`,
            ...gLines,
            ``,
            `📉 LOSERS`,
            ...lLines,
            ``,
            `As of ${nowIST()}`,
          ].join("\n");
          return mcpText(text);
        } catch (err) {
          return mcpError(normalizeError(err));
        }
      }
    );

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/darved2305/groww-mcp'

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