eshan6704 commited on
Commit
36afc06
·
verified ·
1 Parent(s): 8d2a9d3

Update app/stock.py

Browse files
Files changed (1) hide show
  1. app/stock.py +3 -3
app/stock.py CHANGED
@@ -99,17 +99,17 @@ def fetch_intraday(symbol, indicators=None,b2_save=False):
99
  # DAILY
100
  # ================================================================
101
 
102
- def fetch_daily(symbol,b2_save=False):
103
  key = f"daily_{symbol}"
104
 
105
  if persist.exists(key, "html"):
106
  cached = persist.load(key, "html")
107
  if cached is not False:
108
- print(f"[{dt.now().strftime('%Y-%m-%d %H:%M:%S')}] Using cached daily for {symbol}")
109
  return cached
110
 
111
  try:
112
- df = daily(symbol)
113
  if df is None or df is False or df.empty:
114
  return wrap_html(f"<h1>No daily data for {symbol}</h1>")
115
 
 
99
  # DAILY
100
  # ================================================================
101
 
102
+ def fetch_daily(symbol,date_end,b2_save=False):
103
  key = f"daily_{symbol}"
104
 
105
  if persist.exists(key, "html"):
106
  cached = persist.load(key, "html")
107
  if cached is not False:
108
+ print(f"[{date_end}] Using cached daily for {symbol}")
109
  return cached
110
 
111
  try:
112
+ df = daily(symbol,date_start,date_end)
113
  if df is None or df is False or df.empty:
114
  return wrap_html(f"<h1>No daily data for {symbol}</h1>")
115