def test_order_sell_fok(self): # order status, data = self.e._order_create(symbol="ETHBTC", side="sell", quantity=.01, price=.5) print_json(data) check_params(self, data) # check for orders status, data = self.e._orders_active() print_json(data) self.assertEqual(len(data), 0)
def test_order_fok(self): # order status, data = self.e._order_create(symbol="ETHBTC", side="buy", quantity=1, price=.0001, timeInForce='FOK') check_params(self, data) print_json(data) # check for orders status, data = self.e._orders_active() print_json(data) self.assertEqual(len(data), 0)
def test_order_gtc_and_cancel_all(self): # order status, data = self.e._order_create(symbol="ETHBTC", side="buy", quantity=1, price=.0001) check_params(self, data) print_json(data) # check for orders status, data = self.e._orders_active() print_json(data) self.assertEqual(len(data), 1) # cancel orders status, data = self.e._orders_cancel() print_json(data) self.assertEqual(status, 200) # make sure it was canceled status, data = self.e._orders_active() print_json(data) self.assertEqual(len(data), 0)
def test_symbols_all(self): status, data = self.e._symbols() print_json(data) check_params(self, data[0])
def test_currencies_one(self): status, data = self.e._currencies('BTC') print_json(data) self.assertEqual(status, 200)
def test_history_with_params(self): time1 = (dt.datetime.now() - dt.timedelta(days=60)).isoformat() status, data = self.e._history_orders("LTCBTC", _from=time1) print_json(data)
def test_history(self): status, data = self.e._history_orders("ETHBTC", ) print_json(data)
def test_cancel_orders_all(self): status, data = self.e._orders_cancel() print_json(data)
def test_blank_order(self): status, data = self.e._order_create(symbol="ETHBTC", side="buy", quantity=0, price=0) print_json(data)