Update balance.py
Browse files- 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 |
-
|
| 7 |
try:
|
| 8 |
-
|
| 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>")
|