npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nepsehub

v1.0.2

Published

TypeScript library and CLI for Nepal Stock Exchange (NEPSE) real-time and historical market data.

Readme

nepsehub

npm version License: MIT TypeScript

A TypeScript library and command-line tool (CLI) for accessing real-time and historical Nepal Stock Exchange (NEPSE) market data directly from official exchange endpoints.


Quick Start

Use with npx (No installation required)

# Get live quote for Nabil Bank
npx nepsehub stock NABIL

# View NEPSE market summary and indices
npx nepsehub market

# View top gainers of the session
npx nepsehub gainers

Install Globally as CLI

npm install -g nepsehub

Executable name nepsehub is now available globally:

nepsehub stock NABIL
nepsehub market
nepsehub gainers
nepsehub losers
nepsehub active
nepsehub history NABIL --limit 10
nepsehub search "Bank"

Install as Library in your Project

npm install nepsehub
# or
pnpm add nepsehub
# or
yarn add nepsehub

Library API Reference

1. getQuote(symbol: string)

Fetches the latest trading metrics for a given stock ticker symbol.

import { getQuote } from 'nepsehub';

async function main() {
  const quote = await getQuote('NABIL');
  console.log(quote);
}

main();

Response (StockQuote):

{
  "symbol": "NABIL",
  "securityId": 131,
  "companyName": "Nabil Bank Limited",
  "sector": "Commercial Banks",
  "lastTradedPrice": 545,
  "closePrice": 545,
  "openPrice": 550,
  "highPrice": 552,
  "lowPrice": 544.2,
  "previousClose": 548.5,
  "pointChange": -3.5,
  "percentageChange": -0.64,
  "totalTradedQuantity": 38251,
  "totalTradedValue": 20904592.3,
  "totalTrades": 416,
  "fiftyTwoWeekHigh": 568,
  "fiftyTwoWeekLow": 471,
  "averageTradedPrice": 546.51,
  "lastUpdatedTime": "2026-08-21 14:59:58.028540000",
  "activeStatus": "A"
}

2. getMarketSummary()

Fetches the overall NEPSE market turnover, volume, transactions, and major index values.

import { getMarketSummary } from 'nepsehub';

const summary = await getMarketSummary();
console.log(`NEPSE Index: ${summary.indices.nepse.currentValue} (${summary.indices.nepse.percentageChange}%)`);
console.log(`Total Turnover: Rs. ${summary.totalTurnoverRs.toLocaleString('en-IN')}`);

3. getHistory(symbol: string, options?: HistoryOptions)

Retrieves historical OHLCV price records for a stock.

import { getHistory } from 'nepsehub';

// Get last 15 trading days
const history = await getHistory('NABIL', { limit: 15 });

history.forEach((h) => {
  console.log(`${h.date} | Close: ${h.close} | Vol: ${h.volume}`);
});

4. searchStocks(query: string)

Searches actively listed NEPSE companies by ticker symbol or full company name.

import { searchStocks } from 'nepsehub';

const banks = await searchStocks('Bank');
console.log(`Found ${banks.length} bank securities.`);

5. Top Movers (getTopGainers, getTopLosers, getMostActive)

import { getTopGainers, getTopLosers, getMostActive } from 'nepsehub';

const [gainers, losers, active] = await Promise.all([
  getTopGainers(),
  getTopLosers(),
  getMostActive(),
]);

CLI Commands & Options

nepsehub -V, --version

Check the currently installed version of nepsehub.

nepsehub -V

nepsehub stock <symbol>

Get real-time quote for a stock.

nepsehub stock NABIL
nepsehub stock SHIVM --json
nepsehub stock NABIL --watch --interval 3000

nepsehub market

Get market overview, indices, total turnover and status.

nepsehub market
nepsehub market --json

nepsehub history <symbol>

Get historical OHLCV data with trend sparkline.

nepsehub history NABIL --limit 30
nepsehub history GBIME --json

nepsehub search <query>

Search stocks by symbol or company name.

nepsehub search Microfinance
nepsehub search Hydro

nepsehub gainers & nepsehub losers

List top 10 price gainers / losers of the day.

nepsehub gainers
nepsehub losers

nepsehub active

List top 10 most active stocks by trading turnover.

nepsehub active

Testing & Development

Run unit test suite with Vitest:

npm test

Build library and CLI distribution bundles:

npm run build

License

MIT License. Copyright (c) 2026.