Coindata
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.
File structure
You can use cache files:
source-code
├── coindata
│ ├── cache
│ │ ├── CSV files
│ ├── tickers
│ │ ├── JSON 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"