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
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_market_status"
}
}Input 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)); } } );