eshan6704 commited on
Commit
8b4d825
·
verified ·
1 Parent(s): 7aa41a0

Update intraday.py

Browse files
Files changed (1) hide show
  1. intraday.py +3 -7
intraday.py CHANGED
@@ -3,20 +3,16 @@ import yfinance as yf
3
  import pandas as pd
4
  from common import format_large_number, wrap_html, make_table
5
  from chart_builder import build_chart
6
-
7
  # ============================================================
8
  # INTRADAY DATA PROCESSING
9
  # ============================================================
10
 
11
  def fetch_intraday(symbol, indicators=None):
12
- """
13
- Fetch intraday (5-min) data for a symbol from Yahoo Finance,
14
- format it, apply indicators, and return full HTML.
15
- """
16
- yfsymbol = f"{symbol}.NS"
17
  try:
18
  # Fetch 1-day intraday 5-min interval
19
- df = yf.download(yfsymbol, period="1d", interval="5m").round(2)
20
  if df.empty:
21
  return wrap_html(f"<h1>No intraday data available for {symbol}</h1>")
22
 
 
3
  import pandas as pd
4
  from common import format_large_number, wrap_html, make_table
5
  from chart_builder import build_chart
6
+ from yf import intraday
7
  # ============================================================
8
  # INTRADAY DATA PROCESSING
9
  # ============================================================
10
 
11
  def fetch_intraday(symbol, indicators=None):
12
+
 
 
 
 
13
  try:
14
  # Fetch 1-day intraday 5-min interval
15
+ df = intraday(symbol)
16
  if df.empty:
17
  return wrap_html(f"<h1>No intraday data available for {symbol}</h1>")
18