The stock price is the highest amount someone is willing to pay for the stock. In this article, we are going to write code for getting live share prices for each company and bind it with GUI Application.
Yahoo_fin: This module is used to scrape historical stock price data, as well as to provide current information on market caps, dividend yields, and which stocks comprise the major exchanges. To install this module type the below command in the terminal.
pip install yahoo_fin
Below is what the GUI looks like:-
Let’s write code to get stock data.
Import the yahoo_fin module.
Use stock_info.get_live_price() method to get live stock price.
Note: please visit this site to get company Symbol like Amazon is AMZN, Reliance is RELFF.
Stock price Application with Tkinter
This Script implements the above Implementation into a GUI.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course