Make purchased based on current prices | fix register issue
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
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
|
||||
Reference in New Issue
Block a user