예제 #1
0
파일: testbtce.py 프로젝트: laisee/hokonui
 def test_ticker(cls):
     ''' Method for testing ticker'''
     data = json.loads(btce.get_current_ticker())
     bid = btce.get_current_bid()
     ask = btce.get_current_ask()
     ok_(data["pair"] == base.CCY_DEFAULT, "shd be '%s'" % base.CCY_DEFAULT)
     ok_(ask > 0.00, "ask should not be empty")
     ok_(bid > 0.00, "bid should not be empty")
     ok_(bid > ask, "bid should be > ask - Bid : %s Ask %s " % (bid, ask))
     ok_(float(data["timestamp"]) > 0, "Timestamp should be > zero")
예제 #2
0
파일: testbtce.py 프로젝트: laisee/hokonui
 def test_bid_lt_ask(cls):
     ''' Method for testing bid < ask'''
     bid = btce.get_current_bid()
     ask = btce.get_current_ask()
     ok_(bid > ask, "bid should be > ask on BTC-E only - Bid : %s Ask %s " % (bid, ask))
예제 #3
0
파일: testbtce.py 프로젝트: laisee/hokonui
 def test_ask(cls):
     ''' Method for testing ask price'''
     ok_(btce.get_current_ask() > 0.00)