def test_get_depth_background(self): new = asyncio.new_event_loop() okex = OkexFutureWs("btc_usd_this_week", new) okex.start() while True: x = okex.get_depth() print(x)
def test_delete_order(self): ex = OkexFutureWs("eth_usd_this_week") depth = ex.get_depth() print(depth) result = ex.short(amount=1, price=450, lever_rate=10) print(result) id = result['order_id'] result = ex.delete_order(order_id=id) print(result)