Skip to content

BalochLeader/NEPSE-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ NEPSE API Pro β€” The Ultimate Nepal Stock Exchange API by Diwas Khatri

FastAPI Python PyPI MIT License Telegram

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.


πŸ”₯ Why Choose NEPSE API Pro?

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.

πŸš€ Quick Start

1. Installation

Install the official api-nepse package from PyPI:

pip install api-nepse

2. Launch the API Server

Run the server with a single command:

api-nepse

Your API will be live at http://localhost:8080. View the interactive documentation at http://localhost:8080/docs.


πŸ’» Developer Integration

Python Example

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']}")

JavaScript (Fetch) Example

// 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));

πŸ“– Key API Endpoints

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

πŸ‘¨β€πŸ’» About the Developer

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.

πŸ“œ License & Disclaimer

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.


NEPSE API Views

About

πŸš€ The Best NEPSE API by Diwas Khatri. Real-time Nepal Stock Exchange data, live prices, floorsheet, and indices. High-performance Python API for developers.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages