CryptoCompare.com API client for Python
The code is written such that all the methods are available as instance methods in Client
class, but grouped them in diff. modules under apis
module to keep the code readable. All these module methods are imported inside the class Client
.
|_ crypto_compare
|__ client.py -- This is the main client class which has all the public methods
|__ apis
|___ average.py - methods for average APIs
|___ coin.py - methods for coin APIs
|___ helper.py - helper methods
|___ histo.py - methods for histo APIs
|___ mining.py - methods for mining APIs
|___ price.py - methods for pricing APIs
|___ subs.py - methods for subs APIs
|___ top.py - methods for top data APIs
|___ uncategorized.py - other API methods
- Install it using pip
pip install crypto_compare
- Use it as following
import crypto_compare
crypto_compare_client = crypto_compare.Client() #Create an instance and call any public API method!
crypto_compare_client.coin_list()
crypto_compare_client.coin_snapshot('BTC', 'USD')
coin_list()
coin_snapshot_full_by_id(coin_id)
coin_snapshot(fsym, tsym)
price(**kwargs) - fsym and tsyms are mandatory as named arguments
price_multi(**kwargs) - fsyms and tsyms are mandatory as named arguments
price_multifull(**kwargs) - fsyms and tsyms are mandatory as named arguments
price_historical(**kwargs) - fsym and tsyms are mandatory as named arguments
generate_avg(**kwargs) - fsym, tsym and markets are mandatory as named arguments
day_avg(**kwargs) - fsym and tsym are mandatory as named arguments
subs_watchlist(**kwargs) - fsyms and tsym are mandatory as named arguments
subs(**kwargs) - fsym is mandatory as named argument
top_exchanges(**kwargs) - fsym and tsym are mandatory as named arguments
top_volumes(**kwargs) - tsym is mandatory as named argument
top_pairs(**kwargs) - fsym and tsym are mandatory as named arguments
histo_day(**kwargs) - fsym and tsym are mandatory as named arguments
histo_hour(**kwargs) - tsym is mandatory as named argument
histo_minute(**kwargs) - fsym and tsym are mandatory as named arguments
mining_contracts()
mining_equipment()
all_exchanges(**kwargs)
social_stats(coin_id)
- Add tests