def _example_broker_queue(quote_ctx):
    """
    获取经纪队列，输出 买盘卖盘的经纪ID，经纪名称，经纪档位
    """
    stock_code_list = ["HK.00700"]

    for stk_code in stock_code_list:
        ret_status, ret_data = quote_ctx.subscribe(stk_code, ft.SubType.BROKER)
        if ret_status != ft.RET_OK:
            print(ret_data)
            exit()

    for stk_code in stock_code_list:
        ret_status, bid_data, ask_data = quote_ctx.get_broker_queue(stk_code)
        if ret_status != ft.RET_OK:
            print(bid_data)
            exit()
        print("%s BROKER" % stk_code)
        print(ask_data)
        print("\n\n")
        print(bid_data)
        print("\n\n")
def _example_broker_queue ( quote_ctx ) : stock_code_list = [ "HK.00700" ] for stk_code in stock_code_list : ret_status , ret_data = quote_ctx . subscribe ( stk_code , ft . SubType . BROKER ) if ret_status != ft . RET_OK : print ( ret_data ) exit ( ) for stk_code in stock_code_list : ret_status , bid_data , ask_data = quote_ctx . get_broker_queue ( stk_code ) if ret_status != ft . RET_OK : print ( bid_data ) exit ( ) print ( "%s BROKER" % stk_code ) print ( ask_data ) print ( "\n\n" ) print ( bid_data ) print ( "\n\n" )
获取经纪队列，输出 买盘卖盘的经纪ID，经纪名称，经纪档位