

Building a DataFrame is as easy as passing on a list of ticker symbols and the code does all the data scraping and structuring job for you. We provide a built-in method to do just that. Working with Python dictionaries is fine but for large-scale data analytics, we should think of building a Pandas DataFrame. A partial screenshot is provided below.īuild a DataFrame with multiple companies’ data If we examine this dictionary, we will note that a huge amount of data has been pulled from the API endpoint. We can try it but we won’t be successful because we have not registered the secret key with the class object yet.įor all the methods in this class, we have to pass on the ticker symbol of the company (on the US financial market). Let’s say we want to build a data dictionary for the company Apple (with the ticker symbol ‘AAPL’). We definitely want to start pulling the data now. We cannot access the data without registering the key

Note that you need to have a file called Secret_Key.txt in the same directory as the code files. Read the secret API key from a file and register it We start by importing regular libraries and the class object.

To keep the code clean, in this article, we show the use of the class in a test Jupyter notebook.
