async def _api_request(self,
                           method: str,
                           endpoint: str,
                           params: Optional[Dict[str, Any]] = None,
                           is_auth_required: bool = False,
                           try_count: int = 0):
        """
        Sends an aiohttp request and waits for a response.
        :param method: The HTTP method, e.g. get or post
        :param endpoint: The path url or the API end point
        :param params: Additional get/post parameters
        :param is_auth_required: Whether an authentication is required, when True the function will add encrypted
        signature to the request.
        :returns A response in json format.
        """
        shared_client = await self._http_client()

        # Generate auth headers if needed.
        headers = {}
        if is_auth_required:
            headers.update(self._coinzoom_auth.get_headers())

        parsed_response = await http_utils.api_call_with_retries(
            method=method,
            endpoint=endpoint,
            extra_headers=headers,
            params=params,
            shared_client=shared_client,
            try_count=try_count,
            throttler=self._throttler)
        if "error" in parsed_response:
            raise CoinzoomAPIError(parsed_response)
        return parsed_response
 async def _api_request(self,
                        method: str,
                        endpoint: str,
                        params: Optional[Dict[str, Any]] = None,
                        is_auth_required: bool = False,
                        try_count: int = 0) -> Dict[str, Any]:
     """
     Sends an aiohttp request and waits for a response.
     :param method: The HTTP method, e.g. get or post
     :param endpoint: The path url or the API end point
     :param params: Additional get/post parameters
     :param is_auth_required: Whether an authentication is required, when True the function will add encrypted
     signature to the request.
     :returns A response in json format.
     """
     async with self._throttler.weighted_task(request_weight=1):
         url = f"{Constants.REST_URL}/{endpoint}"
         shared_client = await self._http_client()
         # Turn `params` into either GET params or POST body data
         qs_params: dict = params if method.upper() == "GET" else None
         req_params = ujson.dumps(params) if method.upper() == "POST" and params is not None else None
         # Generate auth headers if needed.
         headers: dict = {"Content-Type": "application/json", "User-Agent": "hummingbot"}
         if is_auth_required:
             headers: dict = self._coinzoom_auth.get_headers()
         # Build request coro
         response_coro = shared_client.request(method=method.upper(), url=url, headers=headers,
                                               params=qs_params, data=req_params,
                                               timeout=Constants.API_CALL_TIMEOUT)
         http_status, parsed_response, request_errors = await aiohttp_response_with_errors(response_coro)
         if request_errors or parsed_response is None:
             if try_count < Constants.API_MAX_RETRIES:
                 try_count += 1
                 time_sleep = retry_sleep_time(try_count)
                 self.logger().info(f"Error fetching data from {url}. HTTP status is {http_status}. "
                                    f"Retrying in {time_sleep:.0f}s.")
                 await asyncio.sleep(time_sleep)
                 return await self._api_request(method=method, endpoint=endpoint, params=params,
                                                is_auth_required=is_auth_required, try_count=try_count)
             else:
                 raise CoinzoomAPIError({"error": parsed_response, "status": http_status})
         if "error" in parsed_response:
             raise CoinzoomAPIError(parsed_response)
         return parsed_response