havocesp / cryptocmpy

Crypto-Compare Python API Wrapper.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Crypto-Compare Python API Wrapper.

License:The Unlicense


Languages

Language:Python 100.0%