Creating a scrolling stock ticker application
It’s now time to build our first practical IoT device. For this project, we will create a stock ticker application with our Raspberry Pi and Sense HAT. A stock ticker is a device, physical or digital, that presents stock prices in real time. Our application will fetch real-time stock prices from Alpha Vantage, an online service providing free APIs for data on stocks. In our application, we will be retrieving the current stock price for Apple, listed on the Nasdaq stock exchange as AAPL.
We can see our stock ticker application illustrated in Figure 2.9. We will use the HTTP GET
method to retrieve information with the response in JSON format, a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate:
Figure 2.9 – Diagram of our stock ticker application; the double arrows symbolize the call and subsequent response from the Alpha Vantage...