In the world of finance and data analysis, Python has emerged as a powerhouse programming language, thanks in large part to its rich ecosystem of libraries and tools. One such library that stands out in the realm of finance is, unsurprisingly, aptly named: “EODHD Python’s Financial Library.” It is a collection of powerful Python libraries and tools that enable individuals to analyze financial data, build trading strategies, conduct risk assessments, and much more.
In this beginner’s guide, we will take you on a journey through the fundamentals of using Python for financial analysis, providing you with the knowledge and resources you need to embark on your financial data adventure.
Throughout this guide, you will learn how to We will walk you through the process of setting up your Python environment, ensuring you have the necessary libraries installed and configured and Get Access to the Financial Data.
Before usage of our EODHD Python`s financial library APIs You will need to set up development environment. We are recommending to install Python from the Microsoft Store. Installing from the Microsoft Store uses a basic Python3 interpreter, but in addition to automatic updates, also configures the path settings for the current user (without requiring administrator access).
In the following guide I will explain how to install financial library on Anaconda Jupyter Notebook. But if you prefer something else like: Jython, PyPy, WinPython, IronPython, etc.
Firstly, we will need to download Anaconda. While, you would install anaconda it will be better to choose Anaconda3 as Your Default Python 3. Second step is to launch Jupyter Notebook.
In Jupyter Notebook Click “New” -> “Python 3” and wait until new kernel will get started.
How to install EODHD Python`s financial library?
Before we proceed with fetching the data, we need to install the EODHD APIs Python Financial Library by running this command in command line and run it by pressing Shift + Ender.
pip install eodhd
Wait until library will be installed – it will be shown when [*] will change to .
Importing Required Libraries
Let’s start by importing the necessary libraries. We will need the “eodhd” library for accessing the API, and the “pandas” library for organizing the data into a DataFrame. So, put the following code to the next command line
from eodhd import APIClient
import pandas as pd
Accessing the EODHD API
To access the EODHD API, we need to create an instance of the “APIClient” class and pass it our API key. In this example, we will use the demo API key provided by EODHD, but in a real application, you should use your registered API key.
api = APIClient("demo") # add your api key here
1. Use “DEMO” API key to test our data from a limited set of the tickers without registering:
AAPL.US | TSLA.US | VTI.US | AMZN.US | BTC-USD | EUR-USD
Real-Time Data and All of the APIs (except Bulk) are included without limitations on API calls.
2. Register to get your free API key (limitated by 20 API calls per day) with access to:
End-Of-Day Historical Data with only past year for any ticker and List of tickers per Exchange
3. To unlock your API key we recommend to choose subscription which covers your needs
Now we have installed EODHD financial library on Python. After you installed it, you will be able to start to fetching data by using our APIs.