From the course: Build Three Real-World Python Applications

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

How to pull stock data with the requests package

How to pull stock data with the requests package - Python Tutorial

From the course: Build Three Real-World Python Applications

How to pull stock data with the requests package

- [Instructor] Now, we will pull Apple stock data using the request package. This method will use the request package that we imported earlier, along with heavily relying on the Alpha Vantage documentation, so make sure to reference this documentation as needed. We will begin by using the time series monthly function to get the monthly data for our Apple stock. The time series monthly section shows the description of this function and how it gathers the monthly time series data. It also has multiple parameters, with three of them required and one of them being optional. So, you'll see we need to add in the function symbol and API key, but the data type is optional. If we scroll down to look at the Python code provided, we will see it gives us the specific URL to use with our time series monthly function, the stock symbol, IBM, and the variable demo for our API key. I highly suggest to copy and paste these URLs from…

Contents