def buy_sub_btc(self): price = exchanges.btc_price() if self.credit_btc < price: return False self.credit_btc = self.credit_btc - price return True
def can_buy(self): can_buy_isk = self.credit_isk >= SUB_PRICE_ISK can_buy_btc = self.credit_btc >= exchanges.btc_price() return can_buy_isk or can_buy_btc
def price(): log("/lokun/price called") return {'btc_price': exchanges.btc_price(), 'isk_price': config.isk_price}