예제 #1
0
 def test_get_balances(self):
     bal = coinex_api.balances()
     self.assertTrue(
         isinstance(
             bal,
             list
         ),
         'last trades should be a list'
     )
예제 #2
0
 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
예제 #3
0
 def test_get_balances(self):
     bal = coinex_api.balances()
     self.assertTrue(isinstance(bal, list), 'last trades should be a list')