get_market_status
Check if the NSE and BSE stock exchanges are currently open for trading to determine when to execute orders or analyze market data.
Instructions
Check if NSE/BSE is currently open for trading
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/market.ts:137-156 (handler)The handler for get_market_status, which fetches market status from the growwClient and formats the response.
server.tool( "get_market_status", "Check if NSE/BSE is currently open for trading", {}, async () => { try { const statuses = await growwClient.getMarketStatus(); const lines = statuses.map((s) => { const icon = s.status === "OPEN" ? "🟢" : s.status === "PRE_OPEN" ? "🟡" : "🔴"; return `${icon} ${s.exchange}: ${s.status} — ${s.message}`; }); const text = [`🏛️ MARKET STATUS`, `${"─".repeat(40)}`, ...lines, ``, `As of ${nowIST()}`].join("\n"); return mcpText(text); } catch (err) { return mcpError(normalizeError(err)); } } );