Spaces:
Running
Running
Update app/nsepythonmodified.py
Browse files- app/nsepythonmodified.py +2 -2
app/nsepythonmodified.py
CHANGED
|
@@ -264,7 +264,7 @@ def nse_bhavcopy(d): return pd.read_csv("https://archives.nseindia.com/products/
|
|
| 264 |
def nse_bulkdeals(): return pd.read_csv("https://archives.nseindia.com/content/equities/bulk.csv").to_html()
|
| 265 |
def nse_blockdeals(): return pd.read_csv("https://archives.nseindia.com/content/equities/block.csv").to_html()
|
| 266 |
|
| 267 |
-
def nse_preopen(key
|
| 268 |
p=nsefetch("https://www.nseindia.com/api/market-data-pre-open?key="+key)
|
| 269 |
return {"data":df_from_data(p.pop("data")), "rem":df_from_data([p])}
|
| 270 |
|
|
@@ -320,7 +320,7 @@ def nse_stock_hist(start, end, symbol, series="ALL"):
|
|
| 320 |
return pd.DataFrame(payload["data"])
|
| 321 |
|
| 322 |
|
| 323 |
-
def nse_index_live(name
|
| 324 |
p=nsefetch(f"https://www.nseindia.com/api/equity-stockIndices?index={name.replace(' ','%20')}")
|
| 325 |
return {"data":df_from_data(p.pop("data")) if "data" in p else pd.DataFrame(), "rem":df_from_data([p])}
|
| 326 |
|
|
|
|
| 264 |
def nse_bulkdeals(): return pd.read_csv("https://archives.nseindia.com/content/equities/bulk.csv").to_html()
|
| 265 |
def nse_blockdeals(): return pd.read_csv("https://archives.nseindia.com/content/equities/block.csv").to_html()
|
| 266 |
|
| 267 |
+
def nse_preopen(key):
|
| 268 |
p=nsefetch("https://www.nseindia.com/api/market-data-pre-open?key="+key)
|
| 269 |
return {"data":df_from_data(p.pop("data")), "rem":df_from_data([p])}
|
| 270 |
|
|
|
|
| 320 |
return pd.DataFrame(payload["data"])
|
| 321 |
|
| 322 |
|
| 323 |
+
def nse_index_live(name):
|
| 324 |
p=nsefetch(f"https://www.nseindia.com/api/equity-stockIndices?index={name.replace(' ','%20')}")
|
| 325 |
return {"data":df_from_data(p.pop("data")) if "data" in p else pd.DataFrame(), "rem":df_from_data([p])}
|
| 326 |
|