Skip to main content

Unofficial Python Api for NSE India stock exchange

Project description

💰 NseIndiaApi

An unofficial Python API for the NSE India stock exchange.

Python version: >= 3.10

If you ❤️ my work so far, please 🌟 this repo.

👽 Documentation

https://bennythadikaran.github.io/NseIndiaApi

Updates

🔥 Usage

Install with Pip

pip install -U nse

The class accepts a single argument download_folder, a str filepath, or a pathlib object. The folder stores cookie and any downloaded files.

Simple example

from nse import NSE
from pathlib import Path

# Working directory
DIR = Path(__file__).parent

nse = NSE(download_folder=DIR)

status = nse.status()

advDec = nse.advanceDecline()

nse.exit() # close requests session

Using with statement

with NSE(download_folder=DIR) as nse:
    status = nse.status()

    advDec = nse.advanceDecline()

Samples folder

The src/samples folder contains sample outputs of various methods. The filenames match the method names. The output has been truncated in some places but demonstrates the overall structure of responses.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nse-0.2.4.tar.gz (32.4 kB view hashes)

Uploaded Source

Built Distribution

nse-0.2.4-py3-none-any.whl (21.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page