nsepython 2.7__tar.gz → 2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nsepython-2.7 → nsepython-2.9}/PKG-INFO +1 -1
- {nsepython-2.7 → nsepython-2.9}/nsepython/rahu.py +11 -4
- {nsepython-2.7 → nsepython-2.9}/nsepython.egg-info/PKG-INFO +1 -1
- {nsepython-2.7 → nsepython-2.9}/setup.py +1 -1
- {nsepython-2.7 → nsepython-2.9}/LICENSE +0 -0
- {nsepython-2.7 → nsepython-2.9}/README.md +0 -0
- {nsepython-2.7 → nsepython-2.9}/nsepython/__init__.py +0 -0
- {nsepython-2.7 → nsepython-2.9}/nsepython.egg-info/SOURCES.txt +0 -0
- {nsepython-2.7 → nsepython-2.9}/nsepython.egg-info/dependency_links.txt +0 -0
- {nsepython-2.7 → nsepython-2.9}/nsepython.egg-info/requires.txt +0 -0
- {nsepython-2.7 → nsepython-2.9}/nsepython.egg-info/top_level.txt +0 -0
- {nsepython-2.7 → nsepython-2.9}/setup.cfg +0 -0
|
@@ -628,6 +628,7 @@ def derivative_history_virgin(symbol,start_date,end_date,instrumentType,expiry_d
|
|
|
628
628
|
logging.info(nsefetch_url)
|
|
629
629
|
logging.info(payload)
|
|
630
630
|
return pd.DataFrame.from_records(payload["data"])
|
|
631
|
+
|
|
631
632
|
def derivative_history(symbol,start_date,end_date,instrumentType,expiry_date,strikePrice="",optionType=""):
|
|
632
633
|
#We are getting the input in text. So it is being converted to Datetime object from String.
|
|
633
634
|
start_date = datetime.datetime.strptime(start_date, "%d-%m-%Y")
|
|
@@ -742,21 +743,21 @@ niftyindices_headers = {
|
|
|
742
743
|
}
|
|
743
744
|
|
|
744
745
|
def index_history(symbol,start_date,end_date):
|
|
745
|
-
data = "{'name':'"+symbol+"','startDate':'"+start_date+"','endDate':'"+end_date+"'}"
|
|
746
|
+
data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + symbol + "'}"}
|
|
746
747
|
payload = requests.post('https://niftyindices.com/Backpage.aspx/getHistoricaldatatabletoString', headers=niftyindices_headers, data=data).json()
|
|
747
748
|
payload = json.loads(payload["d"])
|
|
748
749
|
payload=pd.DataFrame.from_records(payload)
|
|
749
750
|
return payload
|
|
750
751
|
|
|
751
752
|
def index_pe_pb_div(symbol,start_date,end_date):
|
|
752
|
-
data = "{'name':'"+symbol+"','startDate':'"+start_date+"','endDate':'"+end_date+"'}"
|
|
753
|
+
data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + symbol + "'}"}
|
|
753
754
|
payload = requests.post('https://niftyindices.com/Backpage.aspx/getpepbHistoricaldataDBtoString', headers=niftyindices_headers, data=data).json()
|
|
754
755
|
payload = json.loads(payload["d"])
|
|
755
756
|
payload=pd.DataFrame.from_records(payload)
|
|
756
757
|
return payload
|
|
757
758
|
|
|
758
759
|
def index_total_returns(symbol,start_date,end_date):
|
|
759
|
-
data = "{'name':'"+symbol+"','startDate':'"+start_date+"','endDate':'"+end_date+"'}"
|
|
760
|
+
data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + symbol + "'}"}
|
|
760
761
|
payload = requests.post('https://niftyindices.com/Backpage.aspx/getTotalReturnIndexString', headers=niftyindices_headers, data=data).json()
|
|
761
762
|
payload = json.loads(payload["d"])
|
|
762
763
|
payload=pd.DataFrame.from_records(payload)
|
|
@@ -925,4 +926,10 @@ def nse_expirydetails_by_symbol(symbol,meta ="Futures",i=0):
|
|
|
925
926
|
currentExpiry=expiry_dates[i]
|
|
926
927
|
currentExpiry = datetime.datetime.strptime(currentExpiry,'%d-%b-%Y').date()
|
|
927
928
|
dte = (currentExpiry - datetime.datetime.now().date()).days
|
|
928
|
-
return currentExpiry,dte
|
|
929
|
+
return currentExpiry,dte
|
|
930
|
+
|
|
931
|
+
def security_wise_archive(from_date, to_date, symbol, series="ALL"):
|
|
932
|
+
base_url = "https://www.nseindia.com/api/historical/securityArchives"
|
|
933
|
+
url = f"{base_url}?from={from_date}&to={to_date}&symbol={symbol.upper()}&dataType=priceVolumeDeliverable&series={series.upper()}"
|
|
934
|
+
payload = nsefetch(url)
|
|
935
|
+
return pd.DataFrame(payload['data'])
|
|
@@ -6,7 +6,7 @@ with open("README.md", "r") as fh:
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name = 'nsepython',
|
|
8
8
|
packages=setuptools.find_packages(),
|
|
9
|
-
version = '2.
|
|
9
|
+
version = '2.9',
|
|
10
10
|
include_package_data=True,
|
|
11
11
|
description = 'Python library for NSE India APIs',
|
|
12
12
|
long_description=long_description,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|