PyHodl  0.2.7
Framework to download, update, analyze and plot your crypto-transactions. Completely off-line and security-oriented.
pyhodl.api.price.cryptocompare.CryptocompareClient Class Reference
Inheritance diagram for pyhodl.api.price.cryptocompare.CryptocompareClient:
Collaboration diagram for pyhodl.api.price.cryptocompare.CryptocompareClient:

Public Member Functions

def __init__ (self, base_url=BASE_URL, tor=False)
 
def download (self, url)
 
def fetch_raw_prices (self, coins, date_time, currency)
 
def fetch_prices (self, coins, date_time, currency)
 
def get_price (self, coins, date_time, kwargs)
 
- Public Member Functions inherited from pyhodl.api.price.models.PricesApiClient
def get_price (self, coins, date_time, kwargs)
 
def get_prices_by_date (self, coins, dates, kwargs)
 
def get_prices (self, coins, kwargs)
 
- Public Member Functions inherited from pyhodl.api.models.AbstractApiClient
def __init__ (self, base_url)
 
- Public Member Functions inherited from pyhodl.logs.Logger
def __init__ (self)
 
def log (self, content)
 
- Public Member Functions inherited from pyhodl.api.models.TorApiClient
def __init__ (self, tor=False)
 
def download (self, url)
 

Static Public Attributes

string BASE_URL = "https://min-api.cryptocompare.com/data/"
 
int MAX_COINS_PER_REQUEST = 6
 
dictionary API_ENCODING
 
dictionary API_DECODING
 
 AVAILABLE_FIAT = FIAT_COINS
 

Additional Inherited Members

- Public Attributes inherited from pyhodl.api.models.AbstractApiClient
 base_url
 
- Public Attributes inherited from pyhodl.logs.Logger
 class_name
 
- Public Attributes inherited from pyhodl.api.models.TorApiClient
 tor
 

Detailed Description

API interface for official cryptocompare.com APIs 

Constructor & Destructor Documentation

def pyhodl.api.price.cryptocompare.CryptocompareClient.__init__ (   self,
  base_url = BASE_URL,
  tor = False 
)

Member Function Documentation

def pyhodl.api.price.cryptocompare.CryptocompareClient.download (   self,
  url 
)
def pyhodl.api.price.cryptocompare.CryptocompareClient.fetch_prices (   self,
  coins,
  date_time,
  currency 
)
:param coins: [] of str
    List of coins
:param date_time: datetime
    Date and time to get price
:param currency: str
    Currency to convert to
:return: {}
    List of price of each coin
def pyhodl.api.price.cryptocompare.CryptocompareClient.fetch_raw_prices (   self,
  coins,
  date_time,
  currency 
)
:param coins: [] of str
    List of coins
:param date_time: datetime
    Date and time to get price
:param currency: str
    Currency to convert to
:return: {}
    List of raw price
def pyhodl.api.price.cryptocompare.CryptocompareClient.get_price (   self,
  coins,
  date_time,
  kwargs 
)

Member Data Documentation

dictionary pyhodl.api.price.cryptocompare.CryptocompareClient.API_DECODING
static
Initial value:
1 = {
2  val: key for key, val in API_ENCODING.items()
3  }
dictionary pyhodl.api.price.cryptocompare.CryptocompareClient.API_ENCODING
static
Initial value:
1 = {
2  "IOTA": "IOT",
3  "WAV": "WAVES"
4  }
pyhodl.api.price.cryptocompare.CryptocompareClient.AVAILABLE_FIAT = FIAT_COINS
static
string pyhodl.api.price.cryptocompare.CryptocompareClient.BASE_URL = "https://min-api.cryptocompare.com/data/"
static
int pyhodl.api.price.cryptocompare.CryptocompareClient.MAX_COINS_PER_REQUEST = 6
static

The documentation for this class was generated from the following file: