PyHodl  0.2.8
Framework to download, update, analyze and plot your crypto-transactions. Completely off-line and security-oriented.
pyhodl.core.portfolio.Portfolio Class Reference

Public Member Functions

def __init__ (self, wallets, portfolio_name=None)
 
def get_transactions_dates (self)
 
def get_current_balance (self, currency=DEFAULT_FIAT)
 
def get_crypto_fiat_balance (self, currency)
 
def get_crypto_net_balance (self, currency)
 
def get_balance_info (self, last=None)
 

Static Public Member Functions

def get_balances_from_deltas (deltas)
 
def sum_total_balance (balances)
 

Public Attributes

 wallets
 
 portfolio_name
 

Detailed Description

Contains wallets, of also different coins 

Constructor & Destructor Documentation

def pyhodl.core.portfolio.Portfolio.__init__ (   self,
  wallets,
  portfolio_name = None 
)

Member Function Documentation

def pyhodl.core.portfolio.Portfolio.get_balance_info (   self,
  last = None 
)
:param last: str
    Path to file where to read balance data
:return: tuple
    current balance, total value, last total value, delta, delta %
def pyhodl.core.portfolio.Portfolio.get_balances_from_deltas (   deltas)
static
:param deltas: [] of {}
    List of delta by transaction date
:return: [] of {}
    List of subtotal balances by transaction date
def pyhodl.core.portfolio.Portfolio.get_crypto_fiat_balance (   self,
  currency 
)
:return: tuple ([] of datetime, [] of float, [] of float)
    List of dates, balances of crypto coins and fiat balances
def pyhodl.core.portfolio.Portfolio.get_crypto_net_balance (   self,
  currency 
)
:return: tuple ([] of datetime, [] of float)
    List of dates, balances of crypto coins - fiat balances
def pyhodl.core.portfolio.Portfolio.get_current_balance (   self,
  currency = DEFAULT_FIAT 
)
:return: [] of {}
    List of current balance by wallet
def pyhodl.core.portfolio.Portfolio.get_transactions_dates (   self)
:return: [] of datetime
    List of all dates of all transactions of all wallets
def pyhodl.core.portfolio.Portfolio.sum_total_balance (   balances)
static
:param balances: [] of {}
    List of raw balances
:return: float
    Total balance (without counting NaN values)

Member Data Documentation

pyhodl.core.portfolio.Portfolio.portfolio_name
pyhodl.core.portfolio.Portfolio.wallets

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