Coinsta: A Python Package for Cryptocurrency Data

Bernard Brenyah
DS Biz
Published in
2 min readMay 30, 2019
image credit: https://www.caribbeannewsnow.com

The long wait is over! As promised in an earlier post, I have resumed blogging after taking some time off to deal with some academic and/ professional duties. Luckily, this extensive break resulted in the development of a Python package, Coinsta, which will be detailed in this post!

I spent some months on a graduate dissertation which required the use of both historical and current data on cryptocurrencies. After browsing the Python Packaging Index (PyPI), I was frustrated by the lack of a Python package that catered for such needs. As far as I know, only one Python package (cyrptoCMD) came close to meeting my needs.

On the other hand, this frustration presented me with the opportunity to make my first Python package.

Coinsta is now ready and matured enough to be shared. The package is available on PyPi and can be easily installed via pip:

pip install coinsta

The latest development version is also available to the few brave ones via GitHub and pip:

pip install git+git://github.com/PyDataBlog/Coinsta.git

Features of Coinsta

  • Current global information on cryptocurrency markets.
  • Current market information on the top 100 cryptocurrencies
  • Current data on a specified cryptocurrency
  • Historical data on all active cryptocurrencies
  • Get historical snapshots of cryptocurrencies

Quick Start

  1. Historical Data

Daily historical data for any circulating cryptocurrency can be accessed via coinsta as follows:

2. Historical Snapshots of Global Cryptocurrency Market

There are multiple scenarios where one would like to know the state of various cryptocurrencies or even the state of the overall cryptocurrency market at some point in time. Coinmarketcap provides that information as well. You can use Coinsta’s HistoricalSnapshot class to access this information as follows:

3. Current Data

Finally, current information about specified cryptocurrency or even the crypto market can be accessed via the Current class.

A live demo is available in the Jupyter notebook below:

So go forth Pythonistas and make magic with my Coinsta baby. A virtual binder environment is ready for anyone who wants to play with Coinsta. Please don’t forget to raise an issue for a bug you may notice. Additionally, contributions and feedback will be much appreciated.

--

--