How to get live stock prices with Python
In a previous post, I gave an introduction to the yahoo_fin package. The most updated version of the package includes new functionality allowing you to scrape live stock prices from Yahoo Finance (real-time). In this article, we'll go through a couple ways of getting real-time data from Yahoo Finance for stocks, as well as how to pull cryptocurrency price information. The get_live_price function First, we just need to load the stock_info module from yahoo_fin. Then, obtaining the current price of a stock is as simple as one line of code: Note: Passing tickers is not case-sensitive (upper / lower / mixed doesn't matter). Getting live price with other quote data The live stock price has also been added to the get_quote_table function, which pulls in additional information about the current…

