Last active
November 10, 2019 17:38
-
-
Save juanino/61c29f80841b7ace0a00252ace6d4fe3 to your computer and use it in GitHub Desktop.
check yahoo stock for price change for the day, return true if postive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from yahoo_fin.stock_info import get_live_price | |
from yahoo_fin.stock_info import get_quote_table | |
def check_stock(stock): | |
price = get_live_price(stock) | |
prev_price = get_quote_table(stock)['Previous Close'] | |
if price > prev_price: | |
return(True) | |
else: | |
return(False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment