diff --git a/bitcoin_dca/coinbase_pro.py b/bitcoin_dca/coinbase_pro.py index 0bca27b..95a3788 100644 --- a/bitcoin_dca/coinbase_pro.py +++ b/bitcoin_dca/coinbase_pro.py @@ -54,7 +54,7 @@ def getCoinbaseAccount(self, currency): @property def coinbase_usdc_account(self): - return self.convertRawAccount(self.getCoinbaseAccount("USDC")) + return self.convertRawCoinbaseAccount(self.getCoinbaseAccount("USDC")) @property def usd_account(self): @@ -187,4 +187,8 @@ def printOrderResult(order_result): @staticmethod def convertRawAccount(raw_account): + return Account(id=raw_account["id"], balance=float(raw_account["available"])) + + @staticmethod + def convertRawCoinbaseAccount(raw_account): return Account(id=raw_account["id"], balance=float(raw_account["balance"]))