To get the full list of supported by our APIs stock exchanges with names, codes, operating MICs, country, and currency, you can use our Exchanges API. This API can also be used to get the lists of tickers (per exchange) which we use in our EODHD financial library. We support more than 60 exchanges all around the world.
Please note: before continuing to work with our APIs, make sure that you import and install all required libraries. A more detailed information about the functions of Exchanges API you can find on our documentation web-page.
Accessing the EODHD API
To access the EODHD API, we need to create an instance of the “APIClient” class and pass to it our API key. In this example, we will use the demo API key provided by EODHD, but in your real application, you should use your registered API key.
api = APIClient("demo")
Please note that you can also specify the API key in a configuration file or as an environment variable, as described in the library documentation here. Also, do not forget to visit our documentation web-page about Exchange Trading Hours and Holidays API.
1. Use the “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
Retrieving Insider Transactions Data
After we are done with the API client, we can get list of stock exchanges or list of tickers (pay attention, that for list of tickers you will need exchange code, for example it can be “US“).
For the list of exchanges:
l_e = api.get_list_of_exchanges()
If we talk about lists of tickers, use the code below. By default, this API provides only tickers that were active at least a month ago, to get the list of inactive (delisted) tickers please use the parameter “delisted=1”:
l_t = api.get_list_of_tickers(code = "US")
l_t = api.get_list_of_tickers(code = "US", delisted = 1)
The API response will be a single JSON structure.
Converting JSON Response to DataFrame
To convert JSON to DataFrame it is possible to use:
list_exchages = pd.DataFrame(l_e) # for list of exchanges
list_tickers = pd.DataFrame(l_t) # for list of tickers
All data in the DataFrame will contain information such as: “name”, “code”, “operating”, “MIC” and “country” for code, which was used when we called API. In particular (“US“), if we are talking about list of tickers.
print(list_exchages) # for list of exchages
print(list_tickers) # for list of tickers
In conclusion, our Exchanges API opens the door to a world of financial data, enabling you to explore exchanges, tickers, and financial instruments comprehensively. Whether you’re an investor, trader, or financial enthusiast, this API equips you with essential information for making informed decisions in the ever-evolving global financial landscape. It’s your passport to understanding the intricacies of the financial world. Happy exploring!