=begin
#CoinAPI Market Data REST API

#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: v1
Contact: support@apibricks.io
Generated by: https://openapi-generator.tech
Generator version: 7.14.0

=end

require 'cgi'

module OpenapiClient
  class MetricsV1Api
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end
    # Current metrics for given asset
    # Get current asset metrics.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :asset_id Asset identifier (from the Metadata -&gt; Assets)
    # @option opts [String] :asset_id_external Exchange asset identifier
    # @option opts [String] :exchange_id Exchange identifier (from the Metadata -&gt; Exchanges)
    # @return [Array<V1GeneralData>]
    def v1_metrics_asset_current_get(opts = {})
      data, _status_code, _headers = v1_metrics_asset_current_get_with_http_info(opts)
      data
    end

    # Current metrics for given asset
    # Get current asset metrics.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :asset_id Asset identifier (from the Metadata -&gt; Assets)
    # @option opts [String] :asset_id_external Exchange asset identifier
    # @option opts [String] :exchange_id Exchange identifier (from the Metadata -&gt; Exchanges)
    # @return [Array<(Array<V1GeneralData>, Integer, Hash)>] Array<V1GeneralData> data, response status code and response headers
    def v1_metrics_asset_current_get_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_asset_current_get ...'
      end
      # resource path
      local_var_path = '/v1/metrics/asset/current'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = opts[:'metric_id'] if !opts[:'metric_id'].nil?
      query_params[:'asset_id'] = opts[:'asset_id'] if !opts[:'asset_id'].nil?
      query_params[:'asset_id_external'] = opts[:'asset_id_external'] if !opts[:'asset_id_external'].nil?
      query_params[:'exchange_id'] = opts[:'exchange_id'] if !opts[:'exchange_id'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1GeneralData>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_asset_current_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_asset_current_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Historical metrics for asset
    # Get asset metrics history.
    # @param metric_id [String] Metric identifier (from the Metrics -&gt; Listing)
    # @param exchange_id [String] Exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [String] :asset_id Asset identifier (from the Metadata -&gt; Assets)
    # @option opts [String] :asset_id_external Exchange asset identifier
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;5SEC&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1SEC&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<V1MetricData>]
    def v1_metrics_asset_history_get(metric_id, exchange_id, opts = {})
      data, _status_code, _headers = v1_metrics_asset_history_get_with_http_info(metric_id, exchange_id, opts)
      data
    end

    # Historical metrics for asset
    # Get asset metrics history.
    # @param metric_id [String] Metric identifier (from the Metrics -&gt; Listing)
    # @param exchange_id [String] Exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [String] :asset_id Asset identifier (from the Metadata -&gt; Assets)
    # @option opts [String] :asset_id_external Exchange asset identifier
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;5SEC&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1SEC&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<(Array<V1MetricData>, Integer, Hash)>] Array<V1MetricData> data, response status code and response headers
    def v1_metrics_asset_history_get_with_http_info(metric_id, exchange_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_asset_history_get ...'
      end
      # verify the required parameter 'metric_id' is set
      if @api_client.config.client_side_validation && metric_id.nil?
        fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsV1Api.v1_metrics_asset_history_get"
      end
      # verify the required parameter 'exchange_id' is set
      if @api_client.config.client_side_validation && exchange_id.nil?
        fail ArgumentError, "Missing the required parameter 'exchange_id' when calling MetricsV1Api.v1_metrics_asset_history_get"
      end
      # resource path
      local_var_path = '/v1/metrics/asset/history'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = metric_id
      query_params[:'exchange_id'] = exchange_id
      query_params[:'asset_id'] = opts[:'asset_id'] if !opts[:'asset_id'].nil?
      query_params[:'asset_id_external'] = opts[:'asset_id_external'] if !opts[:'asset_id_external'].nil?
      query_params[:'time_start'] = opts[:'time_start'] if !opts[:'time_start'].nil?
      query_params[:'time_end'] = opts[:'time_end'] if !opts[:'time_end'].nil?
      query_params[:'time_format'] = opts[:'time_format'] if !opts[:'time_format'].nil?
      query_params[:'period_id'] = opts[:'period_id'] if !opts[:'period_id'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1MetricData>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_asset_history_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_asset_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of all supported metrics for asset
    # Get data metrics for asset.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :exchange_id Exchange identifier (from the Metadata -&gt; Exchanges)
    # @option opts [String] :chain_id Chain identifier
    # @option opts [String] :network_id Network identifier
    # @option opts [String] :asset_id Asset identifier (from the Metadata -&gt; Assets)
    # @option opts [String] :asset_id_external The asset external identifier
    # @return [Array<V1ListingItem>]
    def v1_metrics_asset_listing_get(opts = {})
      data, _status_code, _headers = v1_metrics_asset_listing_get_with_http_info(opts)
      data
    end

    # Listing of all supported metrics for asset
    # Get data metrics for asset.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :exchange_id Exchange identifier (from the Metadata -&gt; Exchanges)
    # @option opts [String] :chain_id Chain identifier
    # @option opts [String] :network_id Network identifier
    # @option opts [String] :asset_id Asset identifier (from the Metadata -&gt; Assets)
    # @option opts [String] :asset_id_external The asset external identifier
    # @return [Array<(Array<V1ListingItem>, Integer, Hash)>] Array<V1ListingItem> data, response status code and response headers
    def v1_metrics_asset_listing_get_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_asset_listing_get ...'
      end
      # resource path
      local_var_path = '/v1/metrics/asset/listing'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = opts[:'metric_id'] if !opts[:'metric_id'].nil?
      query_params[:'exchange_id'] = opts[:'exchange_id'] if !opts[:'exchange_id'].nil?
      query_params[:'chain_id'] = opts[:'chain_id'] if !opts[:'chain_id'].nil?
      query_params[:'network_id'] = opts[:'network_id'] if !opts[:'network_id'].nil?
      query_params[:'asset_id'] = opts[:'asset_id'] if !opts[:'asset_id'].nil?
      query_params[:'asset_id_external'] = opts[:'asset_id_external'] if !opts[:'asset_id_external'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1ListingItem>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_asset_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_asset_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Current metrics for given exchange
    # Get current exchange metrics values.
    # @param exchange_id [String] The exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id The metric identifier (from the Metrics -&gt; Listing)
    # @return [Array<V1GeneralData>]
    def v1_metrics_exchange_current_get(exchange_id, opts = {})
      data, _status_code, _headers = v1_metrics_exchange_current_get_with_http_info(exchange_id, opts)
      data
    end

    # Current metrics for given exchange
    # Get current exchange metrics values.
    # @param exchange_id [String] The exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id The metric identifier (from the Metrics -&gt; Listing)
    # @return [Array<(Array<V1GeneralData>, Integer, Hash)>] Array<V1GeneralData> data, response status code and response headers
    def v1_metrics_exchange_current_get_with_http_info(exchange_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_exchange_current_get ...'
      end
      # verify the required parameter 'exchange_id' is set
      if @api_client.config.client_side_validation && exchange_id.nil?
        fail ArgumentError, "Missing the required parameter 'exchange_id' when calling MetricsV1Api.v1_metrics_exchange_current_get"
      end
      # resource path
      local_var_path = '/v1/metrics/exchange/current'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'exchange_id'] = exchange_id
      query_params[:'metric_id'] = opts[:'metric_id'] if !opts[:'metric_id'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1GeneralData>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_exchange_current_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_exchange_current_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Historical metrics for the exchange
    # Get exchange metrics history.
    # @param metric_id [String] Metric identifier (from the Metrics -&gt; Listing)
    # @param exchange_id [String] Exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;5SEC&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1SEC&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<V1MetricData>]
    def v1_metrics_exchange_history_get(metric_id, exchange_id, opts = {})
      data, _status_code, _headers = v1_metrics_exchange_history_get_with_http_info(metric_id, exchange_id, opts)
      data
    end

    # Historical metrics for the exchange
    # Get exchange metrics history.
    # @param metric_id [String] Metric identifier (from the Metrics -&gt; Listing)
    # @param exchange_id [String] Exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;5SEC&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1SEC&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<(Array<V1MetricData>, Integer, Hash)>] Array<V1MetricData> data, response status code and response headers
    def v1_metrics_exchange_history_get_with_http_info(metric_id, exchange_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_exchange_history_get ...'
      end
      # verify the required parameter 'metric_id' is set
      if @api_client.config.client_side_validation && metric_id.nil?
        fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsV1Api.v1_metrics_exchange_history_get"
      end
      # verify the required parameter 'exchange_id' is set
      if @api_client.config.client_side_validation && exchange_id.nil?
        fail ArgumentError, "Missing the required parameter 'exchange_id' when calling MetricsV1Api.v1_metrics_exchange_history_get"
      end
      # resource path
      local_var_path = '/v1/metrics/exchange/history'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = metric_id
      query_params[:'exchange_id'] = exchange_id
      query_params[:'time_start'] = opts[:'time_start'] if !opts[:'time_start'].nil?
      query_params[:'time_end'] = opts[:'time_end'] if !opts[:'time_end'].nil?
      query_params[:'time_format'] = opts[:'time_format'] if !opts[:'time_format'].nil?
      query_params[:'period_id'] = opts[:'period_id'] if !opts[:'period_id'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1MetricData>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_exchange_history_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_exchange_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of all supported exchange metrics
    # Get data metrics for exchange.
    # @param exchange_id [String] The exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id The metric identifier (from the Metrics -&gt; Listing)
    # @return [Array<V1ListingItem>]
    def v1_metrics_exchange_listing_get(exchange_id, opts = {})
      data, _status_code, _headers = v1_metrics_exchange_listing_get_with_http_info(exchange_id, opts)
      data
    end

    # Listing of all supported exchange metrics
    # Get data metrics for exchange.
    # @param exchange_id [String] The exchange identifier (from the Metadata -&gt; Exchanges)
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id The metric identifier (from the Metrics -&gt; Listing)
    # @return [Array<(Array<V1ListingItem>, Integer, Hash)>] Array<V1ListingItem> data, response status code and response headers
    def v1_metrics_exchange_listing_get_with_http_info(exchange_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_exchange_listing_get ...'
      end
      # verify the required parameter 'exchange_id' is set
      if @api_client.config.client_side_validation && exchange_id.nil?
        fail ArgumentError, "Missing the required parameter 'exchange_id' when calling MetricsV1Api.v1_metrics_exchange_listing_get"
      end
      # resource path
      local_var_path = '/v1/metrics/exchange/listing'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'exchange_id'] = exchange_id
      query_params[:'metric_id'] = opts[:'metric_id'] if !opts[:'metric_id'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1ListingItem>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_exchange_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_exchange_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of all supported metrics by CoinAPI
    # Get all data metrics.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1Metric>]
    def v1_metrics_listing_get(opts = {})
      data, _status_code, _headers = v1_metrics_listing_get_with_http_info(opts)
      data
    end

    # Listing of all supported metrics by CoinAPI
    # Get all data metrics.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1Metric>, Integer, Hash)>] Array<V1Metric> data, response status code and response headers
    def v1_metrics_listing_get_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_listing_get ...'
      end
      # resource path
      local_var_path = '/v1/metrics/listing'

      # query parameters
      query_params = opts[:query_params] || {}

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1Metric>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Current metrics for given symbol
    # Get current symbol metrics.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :symbol_id Symbol identifier (from the Metadata -&gt; Symbols)
    # @option opts [String] :exchange_id Exchange id (from the Metadata -&gt; Exchanges)
    # @return [Array<V1GeneralData>]
    def v1_metrics_symbol_current_get(opts = {})
      data, _status_code, _headers = v1_metrics_symbol_current_get_with_http_info(opts)
      data
    end

    # Current metrics for given symbol
    # Get current symbol metrics.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :symbol_id Symbol identifier (from the Metadata -&gt; Symbols)
    # @option opts [String] :exchange_id Exchange id (from the Metadata -&gt; Exchanges)
    # @return [Array<(Array<V1GeneralData>, Integer, Hash)>] Array<V1GeneralData> data, response status code and response headers
    def v1_metrics_symbol_current_get_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_symbol_current_get ...'
      end
      # resource path
      local_var_path = '/v1/metrics/symbol/current'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = opts[:'metric_id'] if !opts[:'metric_id'].nil?
      query_params[:'symbol_id'] = opts[:'symbol_id'] if !opts[:'symbol_id'].nil?
      query_params[:'exchange_id'] = opts[:'exchange_id'] if !opts[:'exchange_id'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1GeneralData>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_symbol_current_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_symbol_current_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Historical metrics for symbol
    # Get symbol metrics history.
    # @param metric_id [String] Metric identifier (from the Metrics -&gt; Listing)
    # @param symbol_id [String] Symbol identifier (from the Metadata -&gt; Symbols)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;5SEC&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1SEC&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<V1MetricData>]
    def v1_metrics_symbol_history_get(metric_id, symbol_id, opts = {})
      data, _status_code, _headers = v1_metrics_symbol_history_get_with_http_info(metric_id, symbol_id, opts)
      data
    end

    # Historical metrics for symbol
    # Get symbol metrics history.
    # @param metric_id [String] Metric identifier (from the Metrics -&gt; Listing)
    # @param symbol_id [String] Symbol identifier (from the Metadata -&gt; Symbols)
    # @param [Hash] opts the optional parameters
    # @option opts [Time] :time_start Starting time in ISO 8601
    # @option opts [Time] :time_end Ending time in ISO 8601
    # @option opts [String] :time_format If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
    # @option opts [String] :period_id Identifier of requested timeseries period (e.g. &#x60;5SEC&#x60; or &#x60;2MTH&#x60;), default value is &#x60;1SEC&#x60;
    # @option opts [Integer] :limit Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) (default to 100)
    # @return [Array<(Array<V1MetricData>, Integer, Hash)>] Array<V1MetricData> data, response status code and response headers
    def v1_metrics_symbol_history_get_with_http_info(metric_id, symbol_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_symbol_history_get ...'
      end
      # verify the required parameter 'metric_id' is set
      if @api_client.config.client_side_validation && metric_id.nil?
        fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsV1Api.v1_metrics_symbol_history_get"
      end
      # verify the required parameter 'symbol_id' is set
      if @api_client.config.client_side_validation && symbol_id.nil?
        fail ArgumentError, "Missing the required parameter 'symbol_id' when calling MetricsV1Api.v1_metrics_symbol_history_get"
      end
      # resource path
      local_var_path = '/v1/metrics/symbol/history'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = metric_id
      query_params[:'symbol_id'] = symbol_id
      query_params[:'time_start'] = opts[:'time_start'] if !opts[:'time_start'].nil?
      query_params[:'time_end'] = opts[:'time_end'] if !opts[:'time_end'].nil?
      query_params[:'time_format'] = opts[:'time_format'] if !opts[:'time_format'].nil?
      query_params[:'period_id'] = opts[:'period_id'] if !opts[:'period_id'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1MetricData>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_symbol_history_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_symbol_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Listing of all supported metrics for symbol
    # Get data metrics for symbol.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :exchange_id Exchange identifier (from the Metadata -&gt; Exchanges)
    # @option opts [String] :symbol_id Symbol identifier (from the Metadata -&gt; Symbols)
    # @return [Array<V1ListingItem>]
    def v1_metrics_symbol_listing_get(opts = {})
      data, _status_code, _headers = v1_metrics_symbol_listing_get_with_http_info(opts)
      data
    end

    # Listing of all supported metrics for symbol
    # Get data metrics for symbol.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :metric_id Metric identifier (from the Metrics -&gt; Listing)
    # @option opts [String] :exchange_id Exchange identifier (from the Metadata -&gt; Exchanges)
    # @option opts [String] :symbol_id Symbol identifier (from the Metadata -&gt; Symbols)
    # @return [Array<(Array<V1ListingItem>, Integer, Hash)>] Array<V1ListingItem> data, response status code and response headers
    def v1_metrics_symbol_listing_get_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MetricsV1Api.v1_metrics_symbol_listing_get ...'
      end
      # resource path
      local_var_path = '/v1/metrics/symbol/listing'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'metric_id'] = opts[:'metric_id'] if !opts[:'metric_id'].nil?
      query_params[:'exchange_id'] = opts[:'exchange_id'] if !opts[:'exchange_id'].nil?
      query_params[:'symbol_id'] = opts[:'symbol_id'] if !opts[:'symbol_id'].nil?

      # header parameters
      header_params = opts[:header_params] || {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/x-msgpack']) unless header_params['Accept']

      # form parameters
      form_params = opts[:form_params] || {}

      # http body (model)
      post_body = opts[:debug_body]

      # return_type
      return_type = opts[:debug_return_type] || 'Array<V1ListingItem>'

      # auth_names
      auth_names = opts[:debug_auth_names] || ['APIKey', 'JWT']

      new_options = opts.merge(
        :operation => :"MetricsV1Api.v1_metrics_symbol_listing_get",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )

      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MetricsV1Api#v1_metrics_symbol_listing_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
