eshan6704 commited on
Commit
e5a4607
·
verified ·
1 Parent(s): 97cd7bd

Update daily.py

Browse files
Files changed (1) hide show
  1. daily.py +3 -2
daily.py CHANGED
@@ -4,13 +4,14 @@ import pandas as pd
4
  from ta_indi_pat import patterns, indicators
5
  from common import html_card, wrap_html
6
 
7
- def fetch_daily_full_table(symbol):
8
  """
9
  Fetch daily OHLCV data, calculate indicators + patterns, return as HTML table.
10
  """
11
  try:
12
  # --- Fetch historical data ---
13
- df = yf.download(symbol + ".NS", period="6mo", interval="1d")
 
14
  if df.empty:
15
  return html_card("Error", f"No daily data found for {symbol}")
16
  df.reset_index(inplace=True)
 
4
  from ta_indi_pat import patterns, indicators
5
  from common import html_card, wrap_html
6
 
7
+ def fetch_daily(symbol):
8
  """
9
  Fetch daily OHLCV data, calculate indicators + patterns, return as HTML table.
10
  """
11
  try:
12
  # --- Fetch historical data ---
13
+ df = yf.download(symbol + ".NS", period="1y", interval="1d").round(2)
14
+ df.columns=df.co
15
  if df.empty:
16
  return html_card("Error", f"No daily data found for {symbol}")
17
  df.reset_index(inplace=True)