nsepython 2.91__tar.gz → 2.93__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nsepython
3
- Version: 2.91
3
+ Version: 2.93
4
4
  Summary: Python library for NSE India APIs
5
5
  Home-page: https://github.com/aeron7/nsepython
6
6
  Author: Aeron7
@@ -34,7 +34,7 @@ if(mode=='local'):
34
34
  def nsefetch(payload):
35
35
  try:
36
36
  output = requests.get(payload,headers=headers).json()
37
- print(output)
37
+ #print(output)
38
38
  except ValueError:
39
39
  s =requests.Session()
40
40
  output = s.get("http://nseindia.com",headers=headers)
@@ -692,7 +692,7 @@ def expiry_history(symbol,start_date="",end_date="",type="options"):
692
692
  nsefetch_url = "https://www.nseindia.com/api/historical/fo/derivatives/meta?&from="+start_date+"&to="+end_date+"&symbol="+symbol+""
693
693
  payload = nsefetch(nsefetch_url)
694
694
 
695
- print(payload)
695
+ #print(payload)
696
696
 
697
697
  for key, value in payload['expiryDatesByInstrument'].items():
698
698
  if type.lower() == "options" and "OPT" in key:
@@ -743,22 +743,22 @@ niftyindices_headers = {
743
743
  }
744
744
 
745
745
  def index_history(symbol,start_date,end_date):
746
- data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + indexName + "'}"}
747
- payload = requests.post('https://niftyindices.com/Backpage.aspx/getHistoricaldatatabletoString', headers=niftyindices_headers, data=data).json()
746
+ data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + symbol + "'}"}
747
+ payload = requests.post('https://niftyindices.com/Backpage.aspx/getHistoricaldatatabletoString', headers=niftyindices_headers, json=data).json()
748
748
  payload = json.loads(payload["d"])
749
749
  payload=pd.DataFrame.from_records(payload)
750
750
  return payload
751
751
 
752
752
  def index_pe_pb_div(symbol,start_date,end_date):
753
- data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + indexName + "'}"}
754
- payload = requests.post('https://niftyindices.com/Backpage.aspx/getpepbHistoricaldataDBtoString', headers=niftyindices_headers, data=data).json()
753
+ data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + symbol + "'}"}
754
+ payload = requests.post('https://niftyindices.com/Backpage.aspx/getpepbHistoricaldataDBtoString', headers=niftyindices_headers, json=data).json()
755
755
  payload = json.loads(payload["d"])
756
756
  payload=pd.DataFrame.from_records(payload)
757
757
  return payload
758
758
 
759
759
  def index_total_returns(symbol,start_date,end_date):
760
- data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + indexName + "'}"}
761
- payload = requests.post('https://niftyindices.com/Backpage.aspx/getTotalReturnIndexString', headers=niftyindices_headers, data=data).json()
760
+ data = {'cinfo': "{'name':'" + symbol + "','startDate':'" + start_date + "','endDate':'" + end_date + "','indexName':'" + symbol + "'}"}
761
+ payload = requests.post('https://niftyindices.com/Backpage.aspx/getTotalReturnIndexString', headers=niftyindices_headers, json=data).json()
762
762
  payload = json.loads(payload["d"])
763
763
  payload=pd.DataFrame.from_records(payload)
764
764
  return payload
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nsepython
3
- Version: 2.91
3
+ Version: 2.93
4
4
  Summary: Python library for NSE India APIs
5
5
  Home-page: https://github.com/aeron7/nsepython
6
6
  Author: Aeron7
@@ -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.91',
9
+ version = '2.93',
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