PyHodl  0.2.7
Framework to download, update, analyze and plot your crypto-transactions. Completely off-line and security-oriented.
pyhodl.core.transactions.Transaction Class Reference
Inheritance diagram for pyhodl.core.transactions.Transaction:

Public Member Functions

def __init__ (self, raw_dict, coin_in, coin_out, date, trans_type=TransactionType.TRADING, successful=True, commission=None)
 
def get_attrs (self)
 
def has (self, item)
 
def is_trade (self)
 
def is_deposit (self)
 
def is_fee (self)
 
def is_withdrawal (self)
 
def get_amount_buy_sell (self, coin)
 
def get_amount_traded (self, coin)
 
def get_amount_commission (self, coin)
 
def get_amount_moved (self, coin)
 
def get_amount (self, coin)
 
def get_coins (self)
 
def __getitem__ (self, key)
 
def __str__ (self)
 

Public Attributes

 raw
 
 coin_buy
 
 coin_sell
 
 transaction_type
 
 date
 
 successful
 
 commission
 

Detailed Description

Exchange transaction 

Constructor & Destructor Documentation

def pyhodl.core.transactions.Transaction.__init__ (   self,
  raw_dict,
  coin_in,
  coin_out,
  date,
  trans_type = TransactionType.TRADING,
  successful = True,
  commission = None 
)
:param raw_dict: {}
    Dict containing raw data
:param trans_type: TransactionType
    Type of transactions
:param date: date
    Date info
:param successful: bool
    True iff transaction has actually taken place
:param commission: Transaction
    Commission of transaction (if any)

Member Function Documentation

def pyhodl.core.transactions.Transaction.__getitem__ (   self,
  key 
)
def pyhodl.core.transactions.Transaction.__str__ (   self)
def pyhodl.core.transactions.Transaction.get_amount (   self,
  coin 
)
:param coin: Coin
    Coin to get
:return: float
    Amount of coin in transaction
def pyhodl.core.transactions.Transaction.get_amount_buy_sell (   self,
  coin 
)
:param coin: Coin
    Coin to get
:return: float
    Amount of coin trade
def pyhodl.core.transactions.Transaction.get_amount_commission (   self,
  coin 
)
:param coin: Coin
    Coin to get
:return: float
    Amount of coin fee
def pyhodl.core.transactions.Transaction.get_amount_moved (   self,
  coin 
)
:param coin: Coin
    Coin to get
:return: float
    Amount of coin moved (withdrawn/deposited)
def pyhodl.core.transactions.Transaction.get_amount_traded (   self,
  coin 
)
:param coin: Coin
    Coin to get
:return: float
    Amount of coin trade
def pyhodl.core.transactions.Transaction.get_attrs (   self)
:return: []
    Keys of internal dict
def pyhodl.core.transactions.Transaction.get_coins (   self)
:return: tuple (str, str, str)
    Coin buy, coin sell and coin fee
def pyhodl.core.transactions.Transaction.has (   self,
  item 
)
:param item: str
    Item to look for
:return: bool
    True iff item is in any of the data
def pyhodl.core.transactions.Transaction.is_deposit (   self)
:return: bool
    True iff data is a deposit
def pyhodl.core.transactions.Transaction.is_fee (   self)
:return: bool
    True iff data is a fee
def pyhodl.core.transactions.Transaction.is_trade (   self)
:return: bool
    True iff data is a trading
def pyhodl.core.transactions.Transaction.is_withdrawal (   self)
:return: bool
    True iff data is a withdrawal

Member Data Documentation

pyhodl.core.transactions.Transaction.coin_buy
pyhodl.core.transactions.Transaction.coin_sell
pyhodl.core.transactions.Transaction.commission
pyhodl.core.transactions.Transaction.date
pyhodl.core.transactions.Transaction.raw
pyhodl.core.transactions.Transaction.successful
pyhodl.core.transactions.Transaction.transaction_type

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