项目作者: BoTreeConsultingTeam

项目描述 :
CryptoCompare.com API client for Python
高级语言: Python
项目地址: git://github.com/BoTreeConsultingTeam/crypto_compare.git
创建时间: 2017-08-29T17:26:17Z
项目社区:https://github.com/BoTreeConsultingTeam/crypto_compare

开源协议:MIT License

下载


crypto_compare

CryptoCompare.com API client for Python

Maintainability

Folder/code structure

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.

  1. |_ crypto_compare
  2. |__ client.py -- This is the main client class which has all the public methods
  3. |__ apis
  4. |___ average.py - methods for average APIs
  5. |___ coin.py - methods for coin APIs
  6. |___ helper.py - helper methods
  7. |___ histo.py - methods for histo APIs
  8. |___ mining.py - methods for mining APIs
  9. |___ price.py - methods for pricing APIs
  10. |___ subs.py - methods for subs APIs
  11. |___ top.py - methods for top data APIs
  12. |___ uncategorized.py - other API methods

Usage

  1. Install it using pip
  1. pip install crypto_compare
  1. Use it as following
    ``` python

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’)

```

API docs

Coin methods

  1. coin_list()
  2. coin_snapshot_full_by_id(coin_id)
  3. coin_snapshot(fsym, tsym)

Price methods

  1. price(**kwargs) - fsym and tsyms are mandatory as named arguments
  2. price_multi(**kwargs) - fsyms and tsyms are mandatory as named arguments
  3. price_multifull(**kwargs) - fsyms and tsyms are mandatory as named arguments
  4. price_historical(**kwargs) - fsym and tsyms are mandatory as named arguments

Average methods

  1. generate_avg(**kwargs) - fsym, tsym and markets are mandatory as named arguments
  2. day_avg(**kwargs) - fsym and tsym are mandatory as named arguments

Subs methods

  1. subs_watchlist(**kwargs) - fsyms and tsym are mandatory as named arguments
  2. subs(**kwargs) - fsym is mandatory as named argument

Top Data methods

  1. top_exchanges(**kwargs) - fsym and tsym are mandatory as named arguments
  2. top_volumes(**kwargs) - tsym is mandatory as named argument
  3. top_pairs(**kwargs) - fsym and tsym are mandatory as named arguments

Histo methods

  1. histo_day(**kwargs) - fsym and tsym are mandatory as named arguments
  2. histo_hour(**kwargs) - tsym is mandatory as named argument
  3. histo_minute(**kwargs) - fsym and tsym are mandatory as named arguments

Mining methods

  1. mining_contracts()
  2. mining_equipment()

Other methods

  1. all_exchanges(**kwargs)
  2. social_stats(coin_id)

ToDo

  1. Add tests