Wrapper for CryptoCompare.com
Project description
Python3 Wrapper to query cryptocurrency prices (and more) using the CryptoCompare API.
Installation
sudo pip install cryptocompare
Usage
Import
import cryptocompare
Methods
Coin List
cryptocompare.get_coin_list()
# ...
# },
# 'BTC': {
# 'Id': '1182'
# 'Url': '/coins/btc/overview'
# 'ImageUrl': '/media/19633/btc.png'
# 'Name': 'BTC'
# 'CoinName': 'Bitcoin'
# 'FullName': 'Bitcoin (BTC)'
# 'Algorithm': 'SHA256'
# 'ProofType': 'PoW'
# 'FullyPremined': '0'
# 'TotalCoinSupply': '21000000'
# 'PreMinedValue': 'N/A'
# 'TotalCoinsFreeFloat': 'N/A'
# 'SortOrder': '1'
# },
# ...
Price
cryptocompare.get_price('BTC')
# or
cryptocompare.get_price('BTC',curr='USD',full=True)
# or
cryptocompare.get_price(['BTC','ETH'],['EUR','GBP'])
# {'BTC': {'EUR': 3709.04, 'GBP': 3354.78},
# 'ETH': {'EUR': 258.1, 'GBP': 241.25}}
Historical Price
# pass either datetime or time instance
cryptocompare.get_historical_price('XMR', timestamp=datetime.datetime(2017,6,6))
# or
cryptocompare.get_historical_price('XMR', curr='EUR', datetime.datetime(2017,6,6))
# {'XMR': {'EUR': 43.05}}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cryptocompare-0.2.tar.gz
(4.0 kB
view hashes)