# Web App to Get Stock Market Data from AlphaVantage Service import requests #Function that gets stock info from API # Returns results in list of two strings # DO NOT EDIT THIS FUNCTION EXCEPT TO INSERT YOUR API KEY WHERE INDICATED def getStock(symbol): baseURL = "https://www.alphavantage.co/query? function=GLOBAL_QUOTE&datatype=csv" keyPart = "&apikey=" + "REPLACE WITH YOUR API KEY" #Add API key symbolPart = "&symbol=" + symbol stockResponse = requests.get(baseURL+keyPart+symbolPart) return stockResponse.text #Return only text part of response #Function that computes and displays results def main(): # Add code that meets the program specifications (see instructions in Canvas) #Code that starts the app main()
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.