def test_get_balances(self): bal = coinex_api.balances() self.assertTrue( isinstance( bal, list ), 'last trades should be a list' )
def get_own(cls): """ Get all own balances """ bals = coinex_api.balances() ret = [] for bal in bals: curr = Currency.get(bal['currency_id']) amt = Decimal(bal['amount']) / pow(10, 8) held = Decimal(bal['held']) / pow(10, 8) b = Balance(curr, amt, held=held) ret.append(b) registry.put(b) return ret
def test_get_balances(self): bal = coinex_api.balances() self.assertTrue(isinstance(bal, list), 'last trades should be a list')