nepseman-api
Unofficial async Python client for Nepal Stock Exchange (NEPSE) market data. Not affiliated with NEPSE or nepalstock.com.np. Use at your own risk.
Reverse-engineers the authentication layer of nepalstock.com.np — including WASM-based token obfuscation and salt-based payload signing — with no dependency on any third-party NEPSE library.
Installation
pip install nepseman-api
Quick Start
import asyncio
from nepseman_api import NepseClient
async def main():
async with NepseClient() as nepse:
# Market status
status = await nepse.market_status()
print(status)
# Today's prices
prices = await nepse.today_price()
print(prices[:5])
# Price history for a stock
history = await nepse.price_history("NABIL")
print(history[:5])
asyncio.run(main())
Available Methods
Market
await nepse.market_status() # Open/closed status
await nepse.is_market_open() # Returns True/False
await nepse.market_summary() # Today's summary (turnover, transactions)
await nepse.supply_demand() # Market-wide supply & demand
Prices
await nepse.today_price() # All stock prices
await nepse.today_price(business_date="2026-06-10") # Specific date
await nepse.live_market() # Live ticker (trading hours only)
await nepse.price_volume() # Price/volume stats
Top Lists
await nepse.top_gainers() # Top gaining stocks
await nepse.top_losers() # Top losing stocks
await nepse.top_turnover() # Top by turnover
await nepse.top_trade() # Top by trade count
await nepse.top_transaction() # Top by transactions
Indices
await nepse.nepse_index() # NEPSE index value
await nepse.nepse_subindices() # All sector subindices
await nepse.index_graph("banking") # Historical graph data
Securities
await nepse.company_list() # All listed companies
await nepse.security_list() # All securities with IDs
await nepse.sector_scrips() # Grouped by sector
await nepse.company_details("NABIL") # Company details
await nepse.daily_graph("NABIL") # Intraday graph
await nepse.price_history("NABIL") # OHLCV history (1 year default)
await nepse.price_history(
"NABIL",
start_date="2025-01-01",
end_date="2025-12-31",
size=500,
)
await nepse.market_depth("NABIL") # Bid/ask depth (trading hours only)
Bulk History
# Fetch history for multiple stocks in parallel
results = await nepse.bulk_price_history(
["NABIL", "NICA", "ADBL"],
start_date="2025-01-01",
concurrency=5,
)
# {"NABIL": [...], "NICA": [...], "ADBL": [...]}
Floorsheet
await nepse.floor_sheet() # All trade records (paginated)
await nepse.floor_sheet(page=1, size=500)
await nepse.floor_sheet_of("NABIL") # Filtered by symbol (first 500 rows only)
Note:
floor_sheet_of()scans only the firstsizefloorsheet records. NEPSE does not expose a per-symbol endpoint. For complete results, iteratefloor_sheet(page=N)and filter manually.
Index Names
Valid values for index_graph():
nepse, sensitive, float, sensitive_float, banking, dev_bank,
finance, hotel_tourism, hydro, investment, life_insurance,
manufacturing, microfinance, mutual_fund, non_life_insurance,
others, trading
Notes
- Trading hours —
live_market()andmarket_depth()only return data Sun–Thu 11:00–15:00 NST - Floorsheet —
floor_sheet_of()filters client-side from the general floorsheet (NEPSE does not expose a per-symbol endpoint) - SSL — NEPSE serves an incomplete certificate chain; the client bypasses SSL verification automatically
Live API
Don't want to run Python? Use the hosted REST API:
Base URL: https://nepseman-api-production.up.railway.app
curl https://nepseman-api-production.up.railway.app/api/v1/market/status
curl https://nepseman-api-production.up.railway.app/api/v1/prices/today
curl https://nepseman-api-production.up.railway.app/api/v1/securities/NABIL
Interactive docs: https://nepseman-api-production.up.railway.app/docs
Disclaimer
This project is unofficial and not affiliated with NEPSE or nepalstock.com.np. It reverse-engineers the public-facing web interface for educational and personal use. Data accuracy is not guaranteed. Do not use in production trading systems.
License
MIT
Metadata
Release files for nepseman-api 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nepseman_api-1.0.1.tar.gz | 16.5 kB | Without provenance | Details for nepseman_api-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nepseman_api-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for nepseman_api-1.0.1-py3-none-any.whl |
Total release size: 33.0 kB
Release files / nepseman_api-1.0.1.tar.gz
| Download URL | nepseman_api-1.0.1.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6f15b5378940ef4bec6c862c3c52dc2406b5cb254c0fee50f22337ce42d27c4
|
|
BLAKE2b-256 checksum How to use checksums |
1a0f1f3ce1cdf1c72ad4a505bf3565d145748f3cef3afd2818542d8402c9fbf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / nepseman_api-1.0.1-py3-none-any.whl
| Download URL | nepseman_api-1.0.1-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5b75a9860cff204267678ce4435dab14df75559c4fe6344195521d390ed189c
|
|
BLAKE2b-256 checksum How to use checksums |
ae362c388d30e714277e6ae7996307f5e5afeed356aad1e6ae71dfe1a68f3b87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for nepseman-api 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.