library to get NSE India data
Project description
NSElib 2.4.4
Python Library to get publicly available data on new NSE india website.
Release Notes
- Compatible and Tested with Python 3.8 and above
- Future release will be done on requirement basic
Libraries Required
- requests
- beautifulsoup
- numpy
- scipy
- pandas
- lxml
- pandas_market_calendars
For Windows systems you can install Anaconda, this will cover many dependencies (You'll have to install requests and beautifulsoup additionally though)
Installation
Fresh installation
$pip install nselib
Upgrade
$pip install nselib --upgrade
Function list
nselib
- trading_holiday_calendar
Example :
import nselib
data = nselib.trading_holiday_calendar()
Capital Market
- price_volume_and_deliverable_position_data
- price_volume_data
- deliverable_position_data
- bulk_deal_data
- block_deals_data
- short_selling_data
- bhav_copy_with_delivery
- bhav_copy_equities
- equity_list
- fno_equity_list
- fno_index_list
- nifty50_equity_list
- niftynext50_equity_list
- niftymidcap150_equity_list
- niftysmallcap250_equity_list
- india_vix_data
- index_data
- market_watch_all_indices
- fii_dii_trading_activity
- var_begin_day
- var_1st_intra_day
- var_2nd_intra_day
- var_3rd_intra_day
- var_4th_intra_day
- var_end_of_day
- sme_bhav_copy
- sme_band_complete
- week_52_high_low_report
- financial_results_for_equity
- corporate_bond_trade_report
- bhav_copy_sme
- pe_ratio
- corporate_actions_for_equity
- event_calendar_for_equity
- top_gainers_or_losers
- most_active_equities
- total_traded_stocks
Example :
from nselib import capital_market
data = capital_market.price_volume_and_deliverable_position_data(symbol='SBIN', from_date='20-06-2023', to_date='20-07-2023')
OR
data = capital_market.price_volume_and_deliverable_position_data(symbol='SBIN', period='1M')
data = capital_market.bhav_copy_with_delivery(trade_date='20-06-2024')
More functions will be available in future releases...
Derivative
- future_price_volume_data
- option_price_volume_data
- fno_bhav_copy
- participant_wise_open_interest
- participant_wise_trading_volume
- expiry_dates_future
- expiry_dates_option_index
- nse_live_option_chain
- fii_derivatives_statistics
- fno_security_in_ban_period
- live_most_active_underlying
Example :
from nselib import derivatives
data = derivatives.future_price_volume_data(symbol='SBIN', instrument='FUTSTK', from_date='20-06-2023', to_date='20-07-2023')
OR
data = derivatives.price_volume_and_deliverable_position_data(symbol='BANKNIFTY', instrument='FUTIDX', period='1M')
Note: instrument type ( future index = FUTIDX, future stocks = FUTSTK, option index = OPTIDX, option stocks = OPTSTK)
More functions will be available in future releases...
Indices
- index_list
- constituent_stock_list
- live_index_performances
Example :
from nselib import indices
data = indices.constituent_stock_list(index_category='BroadMarketIndices', index_name='Nifty 50')
More functions will be available in future releases...
Debt
- securities_available_for_trading
Example :
from nselib import debt
data = debt.securities_available_for_trading(trade_date='20-12-2025')
More functions will be available in future releases...
How can I contribute?
There are multiple ways in which you can contribute-
Write about your project
There are working on to add many function to this library. NSElib at the moment is short of good documentation. There are a lot of features in NSElib yet to come :( , so till we complete the documentation, I'll need support from the community.
Please write about your projects in blogs, quora answers and other forums, so that people find working examples to get started.
Raising issues, bugs, enhancement requests
For quick resolution please raise issues both here on issue page. I'll try my best to address the issues quickly on github as and when I get notified, but raising it on stackoverflow will provide you access to a larger group and someone else might solve your problem before I do.
Contact author on LinkedIn
Submit patches
If you have fixed an issue or added a new feature, please fork this repository, make your changes and submit a pull request. Here's good article on how to do this.
Looking forward for healthy participation from community.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nselib-2.4.4.tar.gz.
File metadata
- Download URL: nselib-2.4.4.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d541a14b86132820489887e8b59f248e2b7bbeb8101ecfe73b6babc8f58b3b1
|
|
| MD5 |
2a8c83a8af9266af441e35baf981c5fd
|
|
| BLAKE2b-256 |
f54660fd5e01abf6a3a836fca094f9667dd6f650cd1f4fcf2ec866785ecbfcd4
|
File details
Details for the file nselib-2.4.4-py3-none-any.whl.
File metadata
- Download URL: nselib-2.4.4-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e89a330c55c76fa7ebe459ebd871812b35cee2031e00e1c4d3f68990f5bbd95
|
|
| MD5 |
47377ff05364b0161c9aaa6b43611da4
|
|
| BLAKE2b-256 |
85177a3f4bc10d4e50f8914885b162fefa595c3ac9084e4b297a0fb44b7bda8a
|