コード例 #1
0
class TestAccountEndpoint(unittest.TestCase):
    def setUp(self):
        access_key = os.environ['ACCESS_KEY']
        secret_key = os.environ['SECRET_KEY']
        self.client = HuobiRestClient(access_key=access_key,
                                      secret_key=secret_key)

    def tearDown(self):
        self.client.close()
コード例 #2
0
 def test_invalid_url(self):
     client = HuobiRestClient(access_key="1",
                              secret_key="1",
                              base_url='https://api.huobi.jfkdlsajfdklsa')
     with self.assertRaises(HuobiRestRequestError):
         client.market_history_kline(symbol="btcusdt",
                                     period="1day",
                                     size=2)
     client.close()
コード例 #3
0
 def setUp(self):
     self.client = HuobiRestClient()
コード例 #4
0
class TestMarketDataEndpoint(unittest.TestCase):
    def setUp(self):
        self.client = HuobiRestClient()

    def tearDown(self):
        self.client.close()
コード例 #5
0
 def setUp(self):
     access_key = os.environ['ACCESS_KEY']
     secret_key = os.environ['SECRET_KEY']
     self.client = HuobiRestClient(access_key=access_key,
                                   secret_key=secret_key)