NEPSE API Pro is the most advanced, high-performance, and comprehensive unofficial API for the Nepal Stock Exchange (NEPSE). Developed by Diwas Khatri, this tool is designed for developers, financial analysts, and algorithmic traders who need reliable, real-time access to the Nepal stock market.
This is not just another scraper. It is a production-ready API that handles the complexities of the NEPSE website automatically.
- β‘ Real-time Market Data: Get live stock prices, LTP, and market status instantly.
- π Comprehensive Coverage: Access Today's Price, Indices, Sub-Indices, and Floorsheet data.
- π’ Deep Insights: Detailed market depth, company profiles, and security lists.
- π Performance Tracking: Real-time Top Gainers, Losers, Turnover, Volume, and Transactions.
- π‘οΈ Advanced Security: Automatically handles NEPSE's complex authentication and WASM-based token parsing.
- π Anti-Blocking: Built-in User-Agent rotation and optimized request handling.
Install the official api-nepse package from PyPI:
pip install api-nepseRun the server with a single command:
api-nepseYour API will be live at http://localhost:8080. View the interactive documentation at http://localhost:8080/docs.
import requests
# Fetch Today's Price from NEPSE
response = requests.get("http://localhost:8080/api/v1/market/today-price")
data = response.json()
if data["status"] == "success":
for stock in data["data"]:
print(f"{stock['symbol']}: Rs. {stock['lastTradedPrice']}")// Get Live Market Status
fetch('http://localhost:8080/api/v1/market/live')
.then(res => res.json())
.then(json => console.log("Live Data:", json.data))
.catch(err => console.error("API Error:", err));| Category | Endpoint | Description |
|---|---|---|
| Market | GET /api/v1/market/status |
Real-time Market Open/Closed status |
| Market | GET /api/v1/market/today-price |
Complete Today's Price list |
| Market | GET /api/v1/market/live |
Live stock prices during trading hours |
| Indices | GET /api/v1/indices |
All NEPSE and Sub-Indices |
| Performers | GET /api/v1/top/gainers |
Top 10 Gaining stocks |
| Advanced | GET /api/v1/market/floorsheet |
Real-time Floorsheet transactions |
Diwas Khatri is a passionate developer specializing in automation, financial tools, and API development.
- π GitHub: BalochLeader
- π’ Telegram: @BalochLeader
- π§ Contact: Reach out for custom API solutions or collaborations.
This project is licensed under the MIT License.
Disclaimer: This is an unofficial API. It is intended for educational and informational purposes only. It is not affiliated with or endorsed by the Nepal Stock Exchange (NEPSE). Use responsibly.