coindata

Historical data manager for cryptos.


Keywords
coinmarketcap, cryptocurrencies, daily-historical-data, historical-cryptocurrency-prices, vector, webscraper
License
MIT
Install
pip install coindata==1.4

Documentation

Coindata

PyPI version Python version Build Status License

Historical data of all cryptos from CoinMarketCap.

Examples:

Install

Pip:

$ pip install coindata

Clone repository:

$ git clone https://github.com/Anaxilaus/coindata
$ python coindata/setup.py install

Requirements: beautifulsoup4 and requests. Setup installs requirements itself.

Usage

Cache and get

>>> coindata.cache('xrp')
XRP written at $PROJECT_DIR/coindata/cache/XRP.csv
>>> coindata.get('xrp')
[
  {Beginning of the time}
  .
  .
  . 
  {'Date': string,
   'Open*': float,
   'High': float,
   'Low': float,
   'Close**': float,
   'Volume': float,
   'Market Cap': float,
   # additional calculated info below #
   'date': datetime.object,
   'circulation': decimal,
   'change': float}
   . 
   .
   .
   {Today}
]

Dump as JSON to use elsewhere.

Example JSON dump.

File structure

You can use cache files:

source-code
├── coindata
│   ├── cache
│   │   ├── CSV files
│   ├── tickers
│   │   ├── JSON files

Example cache files.

Read documentation at code for a lot more functionality.

Notes

  • Symbol, name and case-insensitive.
btc = BTC = bitcoin = BITCOIN
  • Based on USD.

  • Date notation is ISO8601 in CSV files.

>>> coindata.ISO8601
"%Y-%m-%d"

Give this a star if you feel this helped you. Contributions are always welcome.