stock-tracker-discord/yfi.py
socks 35fc806327 - Added delete command
- added watchlists
- added $pf2 and $wl2 to get image format table outputs
- moving yahoo finance commands to separate file
2021-02-14 18:57:18 +00:00

8 lines
178 B
Python

import yfinance as yf
def get_current_price(ticker):
yf_obj = yf.Ticker(ticker)
todays_data = yf_obj.history(period='1d')
return round(todays_data['Close'][0], 2)