def list_instruments(self, instruments, start_time=None, end_time=None, freq='day', as_list=False):

    def inst_msg_proc_func(response_content):
        if isinstance(response_content, dict):
            instrument = {i: [(pd.Timestamp(s), pd.Timestamp(e)) for (s, e) in t] for (i, t) in response_content.items()}
        else:
            instrument = response_content
        return instrument
    self.conn.send_request(request_type='instrument', request_content={'instruments': instruments, 'start_time': str(start_time), 'end_time': str(end_time), 'freq': freq, 'as_list': as_list}, msg_queue=self.queue, msg_proc_func=inst_msg_proc_func)
    result = self.queue.get(timeout=C['timeout'])
    if isinstance(result, Exception):
        raise result
    get_module_logger('data').debug('get result')
    return result
def list_instruments(self, instruments, start_time=None, end_time=None, freq='day', as_list=False):

    def inst_msg_proc_func(response_content):
        if isinstance(response_content, dict):
            instrument = {i: [(pd.Timestamp(s), pd.Timestamp(e)) for (s, e) in t] for (i, t) in response_content.items()}
        else:
            instrument = response_content
        return instrument
    self.conn.send_request(request_type='instrument', request_content={'instruments': instruments, 'start_time': str(start_time), 'end_time': str(end_time), 'freq': freq, 'as_list': as_list}, msg_queue=self.queue, msg_proc_func=inst_msg_proc_func)
    result = self.queue.get(timeout=C['timeout'])
    if isinstance(result, Exception):
        raise result
    get_module_logger('data').debug('get result')
    return result