CODEX

Pulling Stock Data from IEX Cloud with Python

An easy way to access market data in few lines of code

Nikhil Adithyan
CodeX
Published in
6 min readMar 14, 2021

--

Photo by Jamie Street on Unsplash

Downloading stock market data from the internet on every occasion is not a pleasant job. Also, it is not possible to get live prices when manually downloading data from the internet. This is when Cloud and APIs come into action.

Before diving into the coding part, let’s understand the mechanism of pulling stock data from a Cloud using an API. Assume that there is a company called IEX Cloud that owns or buys live stock market data directly from the exchanges. This company stores the data on its own database and hosts it via a cloud hosting platform i.e., making the data decentralized. Now, the data is made public but still, it can’t be extracted just like that. Here is when API becomes helpful. Even though the users don't own the cloud, using an API, they can interact and pull data from the cloud.

This is what we are going to do. One thing to remember is in order to access data with an API, the user must have an API key (like a password and should not be revealed). Without an API key, the user request to access data will be denied revealing a 400 response (error or negative response).

In this article, we will be:

- Creating an IEX Cloud

--

--

Nikhil Adithyan
CodeX

Founder @BacktestZone (https://www.backtestzone.com/), a no-code backtesting platform | Top Writer | Connect with me on LinkedIn: https://bit.ly/3yNuwCJ