cryptocompsdk package

A Python SDK for the CryptoCompare APIs which require an API key. Allows downloading price history, social information, and blockchain information for cryptoassets.

Submodules

cryptocompsdk.config module

cryptocompsdk.logger module

cryptocompsdk.main module

class cryptocompsdk.main.CryptoCompare(api_key, throttle=None)[source]

Bases: cryptocompsdk.request.APIBase

The main interface to the API. Contains objects which represent individual API endpoints.

history HistoryAPI

coins CoinsAPI

social_history SocialHistoryAPI

social_latest SocialLatestAPI

exchange_symbols ExchangeSymbolsAPI

exchange_info ExchangeInfoAPI

blockchain_available_coins BlockchainAvailableCoinsAPI

blockchain_history BlockchainHistoryAPI

news NewsAPI

__init__(api_key, throttle=None)[source]

Initialize self. See help(type(self)) for accurate signature.

property coin_ids
Return type

Dict[str, int]

cryptocompsdk.request module

class cryptocompsdk.request.APIBase(api_key, throttle=None)[source]

Bases: object

__init__(api_key, throttle=None)[source]

Initialize self. See help(type(self)) for accurate signature.

filter_payload(payload)[source]
request(url, payload=None)[source]
Return type

Request

class cryptocompsdk.request.Request(url, payload, response)[source]

Bases: object

__init__(url, payload, response)[source]

Initialize self. See help(type(self)) for accurate signature.

property json
Return type

dict

cryptocompsdk.response module

class cryptocompsdk.response.ResponseAPIBase[source]

Bases: object

delete_record_matching_time(time)[source]
property has_error
Return type

bool

property is_empty
Return type

bool

response: Optional[str]
property time_from
Return type

int

trim_empty_records_at_beginning()[source]
exception cryptocompsdk.response.ResponseException[source]

Bases: Exception

cryptocompsdk.urls module