docstr: Send data query to IQFeed API.
docstr_tok: ["Send","data","query","to","IQFeed","API","."]
code: def iq_query(self, message: str):
      """Send data query to IQFeed API."""
      end_msg = "!ENDMSG!"
      recv_buffer = 4096
  
      # Send the historical data request message and buffer the data
      self._send_cmd(message)
  
      chunk = ""
      data = ""
      while True:
          chunk = self._sock.recv(recv_buffer).decode("latin-1")
          data += chunk
          if chunk.startswith("E,"):  # error condition
              if chunk.startswith("E,!NO_DATA!"):
                  log.warn(
                      "No data available for the given symbol or dates"
                  )
                  return
              else:
                  raise Exception(chunk)
          elif end_msg in chunk:
              break
  
      # Clean up the data.
      data = data[: -1 * (len(end_msg) + 3)]
      data = "".join(data.split("\r"))
      data = data.replace(",\n", ",")[:-1]
      data = data.split(",")
      return data
  
file_path: backtrader/contrib/utils/iqfeed-to-influxdb.py
imports: import sys
  import os
  import io
  import socket
  import logging
  import numpy
  import pandas
  import datetime
  import argparse
  from influxdb import DataFrameClient
  from influxdb.exceptions import InfluxDBClientError
label_desc: Use image node_id 3 for calling the IQFeedTool obj's underlying member method code with example usage: obj.iq_query(message) and returns: data