def test_subscribe_transactions(self): def callback(feed): print(feed) self.assertTrue(good_transaction(feed), "not good transaction") self.ws.subscribe_to_transactions(callback) restClient = Client(keys["apiKey"], keys["apiSecret"]) time.sleep(1 * second) restClient.transfer_money_from_bank_balance_to_trading_balance( "EOS", "0.1") time.sleep(1 * second) restClient.transfer_money_from_trading_balance_to_bank_balance( "EOS", "0.1") time.sleep(5 * second) self.ws.unsubscribe_to_transactions() time.sleep(2 * second)
def setUp(self): self.client = Client('', '')
class PublicCallsTestCase(unittest.TestCase): def setUp(self): self.client = Client('', '') def tearDown(self): self.client.close()
def setUp(self): self.client = Client(keys['apiKey'], keys['apiSecret'])
class AuthCallsTestCase(unittest.TestCase): def setUp(self): self.client = Client(keys['apiKey'], keys['apiSecret']) def tearDown(self): self.client.close()