コード例 #1
0
    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)
コード例 #2
0
 def setUp(self):
     self.client = Client('', '')
コード例 #3
0
class PublicCallsTestCase(unittest.TestCase):
    def setUp(self):
        self.client = Client('', '')
    
    def tearDown(self):
        self.client.close()
コード例 #4
0
 def setUp(self):
     self.client = Client(keys['apiKey'], keys['apiSecret'])
コード例 #5
0
class AuthCallsTestCase(unittest.TestCase):
    def setUp(self):
        self.client = Client(keys['apiKey'], keys['apiSecret'])

    def tearDown(self):
        self.client.close()