def validate_historical_prices_options(options)
      resolutions = %i[second minute minute_2 minute_3 minute_5 minute_10 minute_15 minute_30 hour
                       hour_2 hour_3 hour_4 day week month]

      raise ArgumentError, 'resolution is invalid' unless resolutions.include? options[:resolution]

      return if options.keys == %i[resolution from to] || options.keys == %i[resolution number]

      raise ArgumentError, 'options must specify either :number or :from and :to'
    end
def validate_historical_prices_options(options)
      resolutions = %i[second minute minute_2 minute_3 minute_5 minute_10 minute_15 minute_30 hour
                       hour_2 hour_3 hour_4 day week month]

      raise ArgumentError, 'resolution is invalid' unless resolutions.include? options[:resolution]

      return if options.keys == %i[resolution from to] || options.keys == %i[resolution number]

      raise ArgumentError, 'options must specify either :number or :from and :to'
    end
Validates the options passed to {#historical_prices}.