def _example_order_book(quote_ctx):
    """
    获取摆盘数据，输出 买价，买量，买盘经纪个数，卖价，卖量，卖盘经纪个数
    """
    stock_code_list = ["US.AAPL", "HK.00700"]

    # subscribe "ORDER_BOOK"
    ret_status, ret_data = quote_ctx.subscribe(stock_code_list, ft.SubType.ORDER_BOOK)
    if ret_status != ft.RET_OK:
        print(ret_data)
        exit()

    for stk_code in stock_code_list:
        ret_status, ret_data = quote_ctx.get_order_book(stk_code)
        if ret_status != ft.RET_OK:
            print(stk_code, ret_data)
            exit()
        print("%s ORDER_BOOK" % stk_code)
        print(ret_data)
        print("\n\n")