This guide is beginning with the Cryptocurrency prices obtaining into the Python:
directly into the Python’s environment.
After preparing the Library for the work, the following command will retrieve a list of exchanges.
df_exchanges = api.get_exchanges()
I would normally use VSCode, but I decided to use Google Colab for this (screenshot above).
I’ve designed the library to return Pandas dataframes. This is really handy as it makes it really simple to filter. For example if I want to search for the Code for Cryptocurrencies, I can do this.
I now want to retrieve the symbols for the Cryptocurrency exchanges.
As you can see, there are 3014 cryptocurrencies available.
1m, 5m, and 1h intraday data is available.
I also included websocket support in the library.
from eodhd import WebSocketClient
Instead of individual API calls to EODHD APIs, you can open a websocket which allows you to stream the data real-time.
websocket = WebSocketClient( api_key="<Your_API_Key>", endpoint="crypto", symbols=["BTC-USD"] ) websocket.start()
Once the websocket is running you can print the data. I imported “sleep” from the “time” library to slow down the display, as the amount of data being retrieved can overwhelm processing.
As EODHD APIs release new features and functionality, I will include it in the library. If I have missed anything, let me know and I’ll add it.
Now you know how to obtain End-of-Day, Intraday and Real-time the prices for any Cryptocurrency directly into the Python environment.Register & Get Data
If you want to learn how to do the Technical Analysis with the EODHD APIs Python Financial Official Library, I recommend to explore my next Article “Stocks Market Technical Analysis with EODHD Financial APIs Python Financial Library” .