Agathe1489 commited on
Commit
11945f4
·
verified ·
1 Parent(s): e8c11cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -21,6 +21,7 @@ def get_stock_price(ticker: str) -> str:
21
 
22
  try:
23
  stock = yf.Ticker(ticker)
 
24
  price = stock.fast_info.get("last_price", "N/A") # Alternative field
25
  currency = stock.fast_info.get("currency", "USD") # Alternative currency field
26
 
 
21
 
22
  try:
23
  stock = yf.Ticker(ticker)
24
+ print(stock.fast_info) # Debugging: Print full response
25
  price = stock.fast_info.get("last_price", "N/A") # Alternative field
26
  currency = stock.fast_info.get("currency", "USD") # Alternative currency field
27