Esempio n. 1
0
 def test_orders(cls):
     """ method for testing orders """
     orders = btx.get_current_orders(cls.TEST_CCY)
     ok_(len(orders["asks"]) > 0, "Asks array should not be empty")
     ok_(len(orders["bids"]) > 0, "Bids array should not be empty")
     ok_(orders["source"] == "BitX", "Source should be 'BitX'")
     ok_(float(orders["timestamp"]) > 0, "Timestamp should be > zero")
Esempio n. 2
0
 def test_ticker(cls):
     """ method for testing ticker """
     data = json.loads(btx.get_current_ticker(cls.TEST_CCY))
     ok_(data["pair"] == base.CCY_DEFAULT, "shd be '%s'" % cls.TEST_CCY)
     ok_(data["ask"] > 0.00, "ask should not be empty")
     ok_(data["bid"] > 0.00, "bid should not be empty")
     ok_(data["bid"] <= data["ask"], "bid should be < ask")
     ok_(float(data["timestamp"]) > 0, "Timestamp should be > zero")
Esempio n. 3
0
 def test_bid(cls):
     """ method for testing bid price """
     ok_(btx.get_current_bid(cls.TEST_CCY) > 0.00)
Esempio n. 4
0
 def test_ask(cls):
     """ method for testing ask price """
     ok_(btx.get_current_ask(cls.TEST_CCY) > 0.00)
Esempio n. 5
0
 def test_price(cls):
     """ method for testing last price """
     ok_(btx.get_current_price(cls.TEST_CCY) > 0.00)