cryptocmp
Python wrapper for CryptoCompare API
Description
cryptocmp provides to the CryptoCompare API in two ways:
Straight wrappers of the API calls in cryptocmp.api package.
A more user friendly mapping to these wrappers in object-oriented style via the following classes:
cryptocmp.coin.Coin represents a crypto coin.
Installation
pip3 install cryptocmp
or this can also work if you have only python3 installed (the symlink pip pointing to pip3 is created)
pip install cryptocmp
Usage
Examples
In object-oriented style:
Get a set of all available crypto coins:
>>> from cryptocmp.coin import Coin >>> Coin.all() {'EOSDAC', 'GAP', 'ARN', 'SERA', 'ICASH', 'STAR*', 'AC3', ...}Get a current price of BTC in USD:
>>> from cryptocmp.coin import Coin >>> bitcoin = Coin('BTC') >>> bitcoin.price('USD') 6318.35``Get a current price of BTC in USD, EUR and GBP at the same time (produces single API call under the hood):
>>> from cryptocmp.coin import Coin >>> bitcoin = Coin('BTC') >>> bitcoin.price(('USD', 'EUR', 'GBP')) {'USD': 6316.17, 'EUR': 5540.34, 'GBP': 4977.23}``Get last 2 candles of BTC/USD daily historical data:
>>> CoinPair('BTC', 'USD').price_history(points_num=2) [ { 'time': 1534291200, 'close': 6274.22, 'high': 6620.07, 'low': 6193.63, 'open': 6199.63, 'volumefrom': 132926.33, 'volumeto': 852103141.83 }, { 'time': 1534377600, 'close': 6439.39, 'high': 6439.39, 'low': 6217.33, 'open': 6274.22, 'volumefrom': 24013.18, 'volumeto': 152446768.26 } ]
Credit
Thanks to CryptoCompare for providing this service and building a nice community around everything crypto related.
Project was partially patched with files generated by Cookiecutter using cookiecutter-pypackage project template. Thanks to Audrey Roy Greenfeld and contributors who made python package creation so easy.
Metadata
Release files for cryptocmp 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cryptocmp-0.3.3.tar.gz | 16.5 kB | Without provenance | Details for cryptocmp-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cryptocmp-0.3.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for cryptocmp-0.3.3-py2.py3-none-any.whl |
Total release size: 34.3 kB
Release files / cryptocmp-0.3.3.tar.gz
| Download URL | cryptocmp-0.3.3.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e589b0b84a19d82fb1a3dd29cbc361ee9b9198946535b64ab9ba699b4e1745c8
|
|
BLAKE2b-256 checksum How to use checksums |
43060e536d4e3e5ee93f7d719ef268283ea7d6ffcd28dc356e64d62f9afddac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3
|
Release files / cryptocmp-0.3.3-py2.py3-none-any.whl
| Download URL | cryptocmp-0.3.3-py2.py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3eacf021a42f4e50a1617fc5912b210db2014660c9f0b04bfaef7ce5ac83915c
|
|
BLAKE2b-256 checksum How to use checksums |
57996fa32677949b88dd4e4ce1a449c23a5d1a11137696d86c88d3e5e36ce450
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3
|
Security for cryptocmp 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.