An open API service indexing awesome lists of open source software.

https://github.com/havocesp/cryptocmpy

Crypto-Compare Python API Wrapper.
https://github.com/havocesp/cryptocmpy

altcoins api api-wrapper client cryptocompare-api cryptocurrencies cyptocurrency python rest rest-api

Last synced: 10 months ago
JSON representation

Crypto-Compare Python API Wrapper.

Awesome Lists containing this project

README

          

# CryptoCmpy

- **Author**: `Daniel J. Umpierrez`
- **Site**: [https://github.com/havocesp/cryptocmpy](https://github.com/havocesp/cryptocmpy)
- **License**: `UNLICENSE`
- **Version**: `0.1.2`

# Description
Just another Python 3 "**CryptoCompare**" API wrapper.

# Requirements
- [python](https://www.python.org/) `(3.5+)`
- [requests](https://github.com/TODO/requests)

# Installation

## _GitHub_ repository (using `pip`)

`$ pip install git+https://github.com/havocesp/cryptocmpy`

# Usage

```python
import time
from cryptocmpy import CryptoCmpy

# amount of seconds calculation for 1 day
day2seconds = 3600 * 24
# current unix datetime format in seconds
epoch = int(time.time())

# from 3 days ago to now as unix epoch
since = epoch - (day2seconds * 3)

cmp = CryptoCmpy()

historic_price = cmp.get_historical_price('BTC', since, 'EUR', 'USD')

print(historic_price)

```

## Changelog

### 0.1.2
- Project name changed to Cryptocmpy (Cryptocmp was already taken at pypi.org)

### 0.1.1
- Removed _utils.py_ module
- Minor fixes

### 0.1.0
- Initial version

# TODO
- [ ] Complete all REST end points implementation.