eshan6704 commited on
Commit
7135c72
·
verified ·
1 Parent(s): 6615a62

Update balance.py

Browse files
Files changed (1) hide show
  1. balance.py +3 -4
balance.py CHANGED
@@ -1,12 +1,11 @@
1
  # balance.py
2
  import yfinance as yf
3
  from common import make_table, wrap_html, format_large_number, html_error
4
-
5
  def fetch_balance(symbol):
6
- yfsymbol = symbol + ".NS"
7
  try:
8
- ticker = yf.Ticker(yfsymbol)
9
- df = ticker.balance_sheet
10
 
11
  if df.empty:
12
  return wrap_html(f"<h1>No balance sheet available for {symbol}</h1>")
 
1
  # balance.py
2
  import yfinance as yf
3
  from common import make_table, wrap_html, format_large_number, html_error
4
+ from yf import (balance)
5
  def fetch_balance(symbol):
6
+
7
  try:
8
+ df = balance(symbol)
 
9
 
10
  if df.empty:
11
  return wrap_html(f"<h1>No balance sheet available for {symbol}</h1>")