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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@writeshh/nepse-sdk

v0.1.2

Published

Node.js wrapper around NepseUnofficialApi (Python)

Downloads

15

Readme

NEPSE SDK

Node.js wrapper around the Python library NepseUnofficialApi. It invokes a small Python bridge to access the underlying functionality.

Upstream library: https://github.com/basic-bgnr/NepseUnofficialApi

Install

npm i @writeshh/nepse-sdk
  • Requires Python >= 3.11.
  • On install, this package will try to create a local virtual environment at .venv and install the upstream Python lib into it. If that fails (e.g., macOS PEP 668 externally managed Python), it falls back to user/pipx installs and will show guidance.

Manual alternative if needed:

pipx install git+https://github.com/basic-bgnr/NepseUnofficialApi
# or
pip3 install --user git+https://github.com/basic-bgnr/NepseUnofficialApi

Configuration

  • The bridge prefers .venv/bin/python (or Windows Scripts/python.exe) recorded in bridge/.python_path.
  • Override Python path with env: NEPSE_NODE_PYTHON=/path/to/python node ...

Usage (Node API)

const { NepseNode } = require('@writeshh/nepse-sdk');

(async () => {
  const nepse = new NepseNode();

  // Basic
  const companies = await nepse.getCompanyList();
  const summary = await nepse.getSummary();

  // With args
  const details = await nepse.getCompanyDetails('NABIL');
  const floors = await nepse.getFloorSheetOf('NABIL', '2024-12-11');

  console.log(companies.length, summary.length, details?.symbol, floors.length);
})();

TypeScript usage:

import { NepseNode, CompanyBasicInfo } from '@writeshh/nepse-sdk';

const nepse = new NepseNode();

async function main() {
  const companies: CompanyBasicInfo[] = await nepse.getCompanyList();
  console.log(companies[0].symbol);
}

main();

Available methods (mirrors upstream):

  • No-arg: getCompanyList, getSecurityList, getSectorScrips, getLiveMarket, getPriceVolume, getSummary, getTopTenTradeScrips, getTopTenTransactionScrips, getTopTenTurnoverScrips, getSupplyDemand, getTopGainers, getTopLosers, isNepseOpen, getNepseIndex, getNepseSubIndices, getDailyNepseIndexGraph, getDailySensitiveIndexGraph, getDailyFloatIndexGraph, getDailySensitiveFloatIndexGraph, getDailyBankSubindexGraph, getDailyDevelopmentBankSubindexGraph, getDailyFinanceSubindexGraph, getDailyHotelTourismSubindexGraph, getDailyHydroSubindexGraph, getDailyInvestmentSubindexGraph, getDailyLifeInsuranceSubindexGraph, getDailyManufacturingSubindexGraph, getDailyMicrofinanceSubindexGraph, getDailyMutualfundSubindexGraph, getDailyNonLifeInsuranceSubindexGraph, getDailyOthersSubindexGraph, getDailyTradingSubindexGraph.
  • With args: getFloorSheetOf(symbol, businessDate), getCompanyDetails(symbol), getDailyScripPriceGraph(symbol), getCompanyPriceVolumeHistory(symbol, startDate, endDate), getSymbolMarketDepth(symbol).

Upstream example routes that inspired this mapping: https://github.com/basic-bgnr/NepseUnofficialApi/blob/master/example/NepseServer.py

CLI

nepse-node companies
nepse-node floorsheet
nepse-node summary
nepse-node live
nepse-node depth NABIL
nepse-node company NABIL

Troubleshooting

  • SSL certificate errors: upstream suggests temporarily disabling TLS verification or installing missing CA certs. See their README: https://github.com/basic-bgnr/NepseUnofficialApi
  • macOS PEP 668 (externally managed Python): prefer the built-in .venv, or use pipx as shown above.