@lacspace/market-clock
Holiday-aware, timezone-correct trading clock — is NSE/BSE open now, next open/close, pre-open, holidays. Bring your own exchange spec. Zero-dependency.
npm i @lacspace/market-clockUsage
import { MarketClock, NSE } from "@lacspace/market-clock";
const nse = new MarketClock(NSE);
nse.isOpen(); // true / false, right now (IST-correct from any timezone)
nse.status(); // "open" | "pre-open" | "closed"
nse.isHoliday(); // is today an exchange holiday?
nse.nextOpen(); // Date — next session open
nse.nextClose(); // Date — next session close
nse.msToClose(); // ms remaining until close (0 if not open)Exports 4
BSEMarketClockNSEcreateClockKeywords
market-hourstrading-hoursstock-marketnsebsemarket-open
More in StockKit
@lacspace/indicators
Streaming technical indicators (RSI, MACD, EMA, Bollinger, ATR, Supertrend, ADX, VWAP) with O(1) incremental updates for live price feeds. Zero-dependency.
@lacspace/marketStock-market money math — P&L, returns, CAGR, XIRR, tick-size rounding, circuit limits, position sizing and an Indian brokerage & charges calculator (STT, GST, SEBI, stamp). Zero-dependency.
@lacspace/paper-tradeHeadless paper-trading engine — virtual wallet, market/limit/stop orders that fill against live prices, positions, holdings and live P&L. The simulator core behind StockYatra. Zero-dependency.