Spaces:
Running
Running
Update index.py
Browse files
index.py
CHANGED
|
@@ -7,7 +7,7 @@ from datetime import datetime, timedelta
|
|
| 7 |
from common import html_card, wrap_html
|
| 8 |
from ta_indi_pat import talib_df
|
| 9 |
import datetime
|
| 10 |
-
|
| 11 |
|
| 12 |
|
| 13 |
def fetch_index(max_rows=200):
|
|
@@ -21,7 +21,7 @@ def fetch_index(max_rows=200):
|
|
| 21 |
# ----------------------------------
|
| 22 |
# Fetch NIFTY 50 data
|
| 23 |
# ----------------------------------
|
| 24 |
-
df =
|
| 25 |
|
| 26 |
if df.empty:
|
| 27 |
return html_card("Error", "No data found for NIFTY 50 (^NSEI).")
|
|
|
|
| 7 |
from common import html_card, wrap_html
|
| 8 |
from ta_indi_pat import talib_df
|
| 9 |
import datetime
|
| 10 |
+
import nse
|
| 11 |
|
| 12 |
|
| 13 |
def fetch_index(max_rows=200):
|
|
|
|
| 21 |
# ----------------------------------
|
| 22 |
# Fetch NIFTY 50 data
|
| 23 |
# ----------------------------------
|
| 24 |
+
df = nse_preopen_df()
|
| 25 |
|
| 26 |
if df.empty:
|
| 27 |
return html_card("Error", "No data found for NIFTY 50 (^NSEI).")
|