Skip to content

havocesp/cryptocmpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CryptoCmpy

Description

Just another Python 3 "CryptoCompare" API wrapper.

Requirements

Installation

GitHub repository (using pip)

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

Usage

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.