Every NSE equity data point in a single Go binary — live quotes, order book, filings, and a local SQLite store no other tool has.
nse-india-pp-cli fetches real-time NSE equity quotes, index constituents, corporate filings, and market status with just browser headers — no API key, no Python runtime, no setup friction. After sync, the local SQLite store powers cross-symbol analysis that is invisible in any single API call: delivery spikes, sector breadth, portfolio margin health, and index attribution.
The recommended path installs both the nse-india-pp-cli binary and the pp-NSE India agent skill in one shot:
npx -y @mvanhorn/printing-press install NSE IndiaFor CLI only (no skill):
npx -y @mvanhorn/printing-press install NSE India --cli-onlyIf npx isn't available (no Node, offline), install the CLI directly via Go (requires Go 1.23+):
go install github.com/mvanhorn/printing-press-library/library/developer-tools/nse-india/cmd/nse-india-pp-cli@latestThis installs the CLI only — no skill.
Download a pre-built binary for your platform from the [latest release](https://github.com/mvanhorn/printing-press-library/releases/tag/NSE India-current). On macOS, clear the Gatekeeper quarantine: xattr -d com.apple.quarantine <binary>. On Unix, mark it executable: chmod +x <binary>.
From the Hermes CLI:
hermes skills install mvanhorn/printing-press-library/cli-skills/pp-NSE India --forceInside a Hermes chat session:
/skills install mvanhorn/printing-press-library/cli-skills/pp-NSE India --forceTell your OpenClaw agent (copy this):
Install the pp-NSE India skill from https://github.com/mvanhorn/printing-press-library/tree/main/cli-skills/pp-NSE India. The skill defines how its required CLI can be installed.
No authentication required. The CLI sends browser-compatible headers (User-Agent + Referer) that mirror what NSE's website uses. Options chain data may require a browser session cookie — use 'nse-india-pp-cli auth login --chrome' if those commands return empty data.
# Check if NSE is open before fetching data
nse-india-pp-cli market
# Live price, 52w H/L, sector PE, pre-market IEP
nse-india-pp-cli quote ADANIPORTS
# Order book, delivery%, VaR margin
nse-india-pp-cli depth RELIANCE
# Find today's biggest Nifty losers
nse-india-pp-cli index "NIFTY 50" --json | jq '.data[] | select(.pChange < -3)'
# Cache IT sector for offline analysis
nse-india-pp-cli sync --symbols INFY,TCS,WIPRO,HCLTECH
# Detect institutional accumulation signals
nse-india-pp-cli delivery-spike --threshold 2.0 --agent
These capabilities aren't available in any other tool for this API.
-
delivery-spike— Flags stocks where today's delivery-to-traded ratio is significantly above their 20-session rolling average — early signal of institutional accumulation.Use when you want to detect institutional accumulation before price follows — the delivery spike precedes moves 2-3 sessions earlier than price action alone.
nse-india-pp-cli delivery-spike --threshold 2.0 --agent
-
iep-drift— Tracks how accurately each stock's pre-market IEP (Indicative Equilibrium Price) predicts the actual opening price over 30 sessions.Use in pre-market to know which IEP signals are reliable for that day's gap-open strategy.
nse-india-pp-cli iep-drift --lookback 30 --min-gap 1.5 --agent
-
announcement-flood— Surfaces companies whose filing cadence has spiked above their own historical baseline — a leading indicator of imminent corporate actions like rights issues or mergers.Use when monitoring for surprise corporate actions — a flood of exchange filings reliably precedes announcements by 3-7 days.
nse-india-pp-cli announcement-flood --window 7d --threshold 3 --agent
-
portfolio pnl— Tracks unrealized P&L, daily delta, and drawdown for a personal holdings file against the synced quote history.Use when an agent needs to report portfolio performance or trigger rebalancing alerts without a brokerage integration.
nse-india-pp-cli portfolio pnl --holdings holdings.csv --agent
-
portfolio margin-health— Aggregates VaR margin, extreme loss margin, and adhoc margin across a full portfolio — shows total margin-at-risk and which holdings are the biggest margin consumers.Use before market open to check whether overnight VaR changes have pushed margin utilization above a safe threshold.
nse-india-pp-cli portfolio margin-health --holdings holdings.csv --agent
-
delivery-divergence— Detects when price is rising but delivery % is falling (distribution signal) or price falling while delivery is rising (accumulation signal) — separates smart money from retail.Use when evaluating whether a trend is sustainable — delivery divergence at a peak is the single clearest distribution signal available from public data.
nse-india-pp-cli delivery-divergence --lookback 10 --agent
-
sector-breadth— Computes advance/decline ratio, median pChange, and delivery breadth for every constituent of a named index — far richer than the index headline number.Use when deciding whether an index move is broad-based or driven by one or two large caps — changes the conviction of a trade.
nse-india-pp-cli sector-breadth --sector IT --agent
-
index-driver— Decomposes any day's index move into per-stock point contributions — identifies the 3-5 stocks driving 80%+ of the index change.Use when the index move looks misleading — tells an agent whether a rally is concentrated (single-stock risk) or genuinely broad.
nse-india-pp-cli index-driver --index "NIFTY 50" --agent
Run nse-india-pp-cli --help for the full command reference and flag list.
Corporate actions, filings, and financial data
nse-india-pp-cli corporate actions- Corporate actions history — dividends, bonuses, splits, rights with ex-dates and record datesnse-india-pp-cli corporate announcements- Exchange filings — board meetings, results, AGM, investor meets, disclosure intimationsnse-india-pp-cli corporate annual_reports- Annual reports with direct PDF download URLs, going back multiple yearsnse-india-pp-cli corporate financial_results- Quarterly and annual financial result filings with XBRL linksnse-india-pp-cli corporate insider_trading- SEBI PIT (Prohibition of Insider Trading) disclosures — promoter/director buy/sell with quantities, values, pre/post holding %
Comprehensive equity quote data for NSE-listed stocks
nse-india-pp-cli equity derivatives- F&O data — futures (3 expiries with OI, volume, turnover) and options contracts (CE/PE by strike and expiry)nse-india-pp-cli equity quote- Full equity quote — last price, 52w H/L, sector PE, order book (5 bid/ask levels), delivery%, VaR margin, index memberships, pre-open IEP
NSE index data and constituents
nse-india-pp-cli indices constituents- Live prices for all constituent stocks in an index with 52w range, 1Y/30D% changense-india-pp-cli indices list- List all available NSE indices with short and long names
Market status and operational information
nse-india-pp-cli market status- Real-time market status for all segments (Capital Market, Currency, F&O, WDM) with current NIFTY level
Market activity rankings
nse-india-pp-cli movers active- Most active intraday securities ranked by volume or traded value
Symbol search and autocomplete
nse-india-pp-cli symbol_lookup autocomplete- Search symbols by company name or ticker — returns equity, MF, index matches
# Human-readable table (default in terminal, JSON when piped)
nse-india-pp-cli indices list
# JSON for scripting and agents
nse-india-pp-cli indices list --json
# Filter to specific fields
nse-india-pp-cli indices list --json --select id,name,status
# Dry run — show the request without sending
nse-india-pp-cli indices list --dry-run
# Agent mode — JSON + compact + no prompts in one flag
nse-india-pp-cli indices list --agentThis CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--jsonoutput to stdout, errors to stderr - Filterable -
--select id,namereturns only fields you need - Previewable -
--dry-runshows the request without sending - Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
- Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendlyis set
Exit codes: 0 success, 2 usage error, 3 not found, 5 API error, 7 rate limited, 10 config error.
Install the focused skill — it auto-installs the CLI on first invocation:
npx skills add mvanhorn/printing-press-library/cli-skills/pp-NSE India -gThen invoke /pp-NSE India <query> in Claude Code. The skill is the most efficient path — Claude Code drives the CLI directly without an MCP server in the middle.
Use as an MCP server in Claude Code (advanced)
If you'd rather register this CLI as an MCP server in Claude Code, install the MCP binary first:
go install github.com/mvanhorn/printing-press-library/library/developer-tools/nse-india/cmd/nse-india-pp-mcp@latestThen register it:
claude mcp add NSE India nse-india-pp-mcpThis CLI ships an MCPB bundle — Claude Desktop's standard format for one-click MCP extension installs (no JSON config required).
To install:
- Download the
.mcpbfor your platform from the [latest release](https://github.com/mvanhorn/printing-press-library/releases/tag/NSE India-current). - Double-click the
.mcpbfile. Claude Desktop opens and walks you through the install.
Requires Claude Desktop 1.0.0 or later. Pre-built bundles ship for macOS Apple Silicon (darwin-arm64) and Windows (amd64, arm64); for other platforms, use the manual config below.
Manual JSON config (advanced)
If you can't use the MCPB bundle (older Claude Desktop, unsupported platform), install the MCP binary and configure it manually.
go install github.com/mvanhorn/printing-press-library/library/developer-tools/nse-india/cmd/nse-india-pp-mcp@latestAdd to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"NSE India": {
"command": "nse-india-pp-mcp"
}
}
}nse-india-pp-cli doctorVerifies configuration and connectivity to the API.
Config file: ``
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
listcommand to see available items
- options command returns empty JSON — Run 'nse-india-pp-cli auth login --chrome' to capture browser session cookie; options chain requires NSE session state
- 429 Too Many Requests — The CLI auto-backs off at 3 req/sec; add '--rate-limit slow' for batch operations or wait 30 seconds
- delivery-spike shows no results after sync — Need 20+ sessions of data: run 'nse-india-pp-cli sync --full' daily for 4 weeks before running delivery-spike
This CLI was built by studying these projects and resources:
- aeron7/nsepython — Python (500 stars)
- hi-imcodeman/stock-nse-india — JavaScript (400 stars)
- vsjha18/nsetools — Python (300 stars)
- BennyThadikaran/NseIndiaApi — Python (250 stars)
- bshada/nse-bse-mcp — Python (150 stars)
- maanavshah/stock-market-india — JavaScript (120 stars)
- RAKESHKRAJEEV90/nse-api-package — JavaScript (80 stars)
Generated by CLI Printing Press