import yfinance as yf def getCurrentPrice(symbol): ticker = yf.Ticker(symbol) data = ticker.history(period="1d", interval="1m") current_price = data['Close'].iloc[-1] return current_price