Skip to main content
Glama
darved2305

groww-mcp

by darved2305

get_order_status

Check real-time status of a specific order by providing the order ID to track execution and completion details.

Instructions

Real-time status of a specific order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder ID to check

Implementation Reference

  • The handler for the "get_order_status" tool, which uses `growwClient` to fetch order details and formats the output.
    // ── get_order_status ──────────────────────────────────────
    server.tool(
      "get_order_status",
      "Real-time status of a specific order",
      {
        order_id: z.string().describe("Order ID to check"),
      },
      async ({ order_id }) => {
        try {
          const o = await growwClient.getOrderStatus(order_id);
    
          const statusEmoji: Record<string, string> = {
            EXECUTED: "✅", PENDING: "⏳", CANCELLED: "❌", REJECTED: "🚫", PARTIAL: "🔶",
          };
          const emoji = statusEmoji[o.status] || "❓";
    
          const text = [
            `${emoji} ORDER STATUS`,
            `${"─".repeat(40)}`,
            `Order ID:  ${o.orderId}`,
            `Symbol:    ${o.symbol}.${o.exchange}`,
            `Action:    ${o.orderType} / ${o.priceType} / ${o.productType}`,
            `Quantity:  ${o.quantity}${o.filledQuantity > 0 ? ` (filled: ${o.filledQuantity})` : ""}`,
            o.price > 0 ? `Price:     ${formatCurrencyExact(o.price)}` : `Price:     MARKET`,
            o.avgFilledPrice > 0 ? `Avg Fill:  ${formatCurrencyExact(o.avgFilledPrice)}` : "",
            `Status:    ${o.status}`,
            o.remarks ? `Remarks:   ${o.remarks}` : "",
            ``,
            `As of ${nowIST()}`,
          ].filter(Boolean).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