=begin #Intrinio API #Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://docs.intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner. OpenAPI spec version: 2.75.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: unset =end require "uri" module Intrinio class IndexApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # All Economic Indices # Returns a list of reference data on more than 200,000 economic indices from the Federal Reserve Economic Data (FRED) database. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseEconomicIndices] def get_all_economic_indices(opts = {}) data, _status_code, _headers = get_all_economic_indices_with_http_info(opts) return data end # All Economic Indices # Returns a list of reference data on more than 200,000 economic indices from the Federal Reserve Economic Data (FRED) database. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseEconomicIndices, Fixnum, Hash)>] ApiResponseEconomicIndices data, response status code and response headers def get_all_economic_indices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_all_economic_indices ..." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_economic_indices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/economic" # query parameters query_params = {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseEconomicIndices') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_all_economic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # All End of Day Index Prices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [Date] :start_date Limit prices to those on or after this date # @option opts [Date] :end_date Limit prices to those on or before this date # @return [ApiResponseEodIndexPricesAll] def get_all_eod_index_prices(opts = {}) data, _status_code, _headers = get_all_eod_index_prices_with_http_info(opts) return data end # All End of Day Index Prices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @option opts [Date] :start_date Limit prices to those on or after this date # @option opts [Date] :end_date Limit prices to those on or before this date # @return [Array<(ApiResponseEodIndexPricesAll, Fixnum, Hash)>] ApiResponseEodIndexPricesAll data, response status code and response headers def get_all_eod_index_prices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_all_eod_index_prices ..." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_eod_index_prices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/prices/eod" # query parameters query_params = {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseEodIndexPricesAll') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_all_eod_index_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # All Index Summaries # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @return [ApiResponseIndices] def get_all_index_summaries(opts = {}) data, _status_code, _headers = get_all_index_summaries_with_http_info(opts) return data end # All Index Summaries # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @return [Array<(ApiResponseIndices, Fixnum, Hash)>] ApiResponseIndices data, response status code and response headers def get_all_index_summaries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_all_index_summaries ..." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_index_summaries, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices" # query parameters query_params = {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseIndices') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_all_index_summaries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # All Realtime Index Prices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @return [ApiResponseRealtimeIndexPrices] def get_all_realtime_index_prices(opts = {}) data, _status_code, _headers = get_all_realtime_index_prices_with_http_info(opts) return data end # All Realtime Index Prices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @return [Array<(ApiResponseRealtimeIndexPrices, Fixnum, Hash)>] ApiResponseRealtimeIndexPrices data, response status code and response headers def get_all_realtime_index_prices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_all_realtime_index_prices ..." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_realtime_index_prices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/prices/realtime" # query parameters query_params = {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseRealtimeIndexPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_all_realtime_index_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # All SIC Indices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseSICIndices] def get_all_sic_indices(opts = {}) data, _status_code, _headers = get_all_sic_indices_with_http_info(opts) return data end # All SIC Indices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseSICIndices, Fixnum, Hash)>] ApiResponseSICIndices data, response status code and response headers def get_all_sic_indices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_all_sic_indices ..." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_sic_indices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/sic" # query parameters query_params = {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseSICIndices') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_all_sic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # All Stock Market Indices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseStockMarketIndices] def get_all_stock_market_indices(opts = {}) data, _status_code, _headers = get_all_stock_market_indices_with_http_info(opts) return data end # All Stock Market Indices # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseStockMarketIndices, Fixnum, Hash)>] ApiResponseStockMarketIndices data, response status code and response headers def get_all_stock_market_indices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_all_stock_market_indices ..." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_stock_market_indices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/stock_market" # query parameters query_params = {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseStockMarketIndices') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_all_stock_market_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Lookup Economic Index # Returns reference data for a specified Federal Reserve Economic Data (FRED) series ID. # @param identifier An Index Identifier (symbol, Intrinio ID) # @param [Hash] opts the optional parameters # @return [EconomicIndex] def get_economic_index_by_id(identifier, opts = {}) data, _status_code, _headers = get_economic_index_by_id_with_http_info(identifier, opts) return data end # Lookup Economic Index # Returns reference data for a specified Federal Reserve Economic Data (FRED) series ID. # @param identifier An Index Identifier (symbol, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Array<(EconomicIndex, Fixnum, Hash)>] EconomicIndex data, response status code and response headers def get_economic_index_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_by_id ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_by_id" end # resource path local_var_path = "/indices/economic/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EconomicIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_economic_index_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Number) for an Economic Index # Returns latest data for a specified Federal Reserve Economic Data (FRED) ID. # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag <a href='https://data.intrinio.com/data-tags/economic'>reference</a> # @param [Hash] opts the optional parameters # @return [Float] def get_economic_index_data_point_number(identifier, tag, opts = {}) data, _status_code, _headers = get_economic_index_data_point_number_with_http_info(identifier, tag, opts) return data end # Data Point (Number) for an Economic Index # Returns latest data for a specified Federal Reserve Economic Data (FRED) ID. # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag <a href='https://data.intrinio.com/data-tags/economic'>reference</a> # @param [Hash] opts the optional parameters # @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers def get_economic_index_data_point_number_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_data_point_number ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_data_point_number" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_economic_index_data_point_number" end # resource path local_var_path = "/indices/economic/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Float') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_economic_index_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Text) for an Economic Index # Returns a text value for the given `tag` for the Economic Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [String] def get_economic_index_data_point_text(identifier, tag, opts = {}) data, _status_code, _headers = get_economic_index_data_point_text_with_http_info(identifier, tag, opts) return data end # Data Point (Text) for an Economic Index # Returns a text value for the given `tag` for the Economic Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def get_economic_index_data_point_text_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_data_point_text ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_data_point_text" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_economic_index_data_point_text" end # resource path local_var_path = "/indices/economic/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_economic_index_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Historical Data for an Economic Index # Returns historical data for a specified Federal Reserve Economic Data (FRED) ID over a period of time. # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag <a href='https://data.intrinio.com/data-tags/economic'>reference</a> # @param [Hash] opts the optional parameters # @option opts [String] :type Filter by type, when applicable # @option opts [Date] :start_date Get historical data on or after this date # @option opts [Date] :end_date Get historical data on or before this date # @option opts [String] :sort_order Sort by date `asc` or `desc` (default to desc) # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseEconomicIndexHistoricalData] def get_economic_index_historical_data(identifier, tag, opts = {}) data, _status_code, _headers = get_economic_index_historical_data_with_http_info(identifier, tag, opts) return data end # Historical Data for an Economic Index # Returns historical data for a specified Federal Reserve Economic Data (FRED) ID over a period of time. # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag <a href='https://data.intrinio.com/data-tags/economic'>reference</a> # @param [Hash] opts the optional parameters # @option opts [String] :type Filter by type, when applicable # @option opts [Date] :start_date Get historical data on or after this date # @option opts [Date] :end_date Get historical data on or before this date # @option opts [String] :sort_order Sort by date `asc` or `desc` # @option opts [Integer] :page_size The number of results to return # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseEconomicIndexHistoricalData, Fixnum, Hash)>] ApiResponseEconomicIndexHistoricalData data, response status code and response headers def get_economic_index_historical_data_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_historical_data ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_historical_data" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_economic_index_historical_data" end if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_economic_index_historical_data, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/economic/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseEconomicIndexHistoricalData') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_economic_index_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # End of Day Index Prices By Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [Date] :start_date Limit prices to those on or after this date # @option opts [Date] :end_date Limit prices to those on or before this date # @return [ApiResponseEodIndexPrices] def get_eod_index_price_by_id(identifier, opts = {}) data, _status_code, _headers = get_eod_index_price_by_id_with_http_info(identifier, opts) return data end # End of Day Index Prices By Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @option opts [Date] :start_date Limit prices to those on or after this date # @option opts [Date] :end_date Limit prices to those on or before this date # @return [Array<(ApiResponseEodIndexPrices, Fixnum, Hash)>] ApiResponseEodIndexPrices data, response status code and response headers def get_eod_index_price_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_eod_index_price_by_id ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_eod_index_price_by_id" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_eod_index_price_by_id, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/{identifier}/eod".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseEodIndexPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_eod_index_price_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Index Constituents By Index Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @return [ApiResponseIndexConstituents] def get_index_constituents_by_id(identifier, opts = {}) data, _status_code, _headers = get_index_constituents_by_id_with_http_info(identifier, opts) return data end # Index Constituents By Index Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @return [Array<(ApiResponseIndexConstituents, Fixnum, Hash)>] ApiResponseIndexConstituents data, response status code and response headers def get_index_constituents_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_index_constituents_by_id ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_index_constituents_by_id" end # resource path local_var_path = "/indices/{identifier}/constituents".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseIndexConstituents') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_index_constituents_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Index Summary By Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @return [ApiResponseIndex] def get_index_summary_by_id(identifier, opts = {}) data, _status_code, _headers = get_index_summary_by_id_with_http_info(identifier, opts) return data end # Index Summary By Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @return [Array<(ApiResponseIndex, Fixnum, Hash)>] ApiResponseIndex data, response status code and response headers def get_index_summary_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_index_summary_by_id ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_index_summary_by_id" end # resource path local_var_path = "/indices/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_index_summary_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Realtime Index Price By Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @return [RealtimeIndexPrice] def get_realtime_index_price_by_id(identifier, opts = {}) data, _status_code, _headers = get_realtime_index_price_by_id_with_http_info(identifier, opts) return data end # Realtime Index Price By Identifier # # @param identifier The index symbol # @param [Hash] opts the optional parameters # @return [Array<(RealtimeIndexPrice, Fixnum, Hash)>] RealtimeIndexPrice data, response status code and response headers def get_realtime_index_price_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_realtime_index_price_by_id ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_realtime_index_price_by_id" end # resource path local_var_path = "/indices/{identifier}/realtime".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RealtimeIndexPrice') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_realtime_index_price_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Lookup SIC Index # # @param identifier An Index Identifier (symbol, Intrinio ID) # @param [Hash] opts the optional parameters # @return [SICIndex] def get_sic_index_by_id(identifier, opts = {}) data, _status_code, _headers = get_sic_index_by_id_with_http_info(identifier, opts) return data end # Lookup SIC Index # # @param identifier An Index Identifier (symbol, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Array<(SICIndex, Fixnum, Hash)>] SICIndex data, response status code and response headers def get_sic_index_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_by_id ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_by_id" end # resource path local_var_path = "/indices/sic/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SICIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_sic_index_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Number) for an SIC Index # Returns a numeric value for the given `tag` for the SIC Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [Float] def get_sic_index_data_point_number(identifier, tag, opts = {}) data, _status_code, _headers = get_sic_index_data_point_number_with_http_info(identifier, tag, opts) return data end # Data Point (Number) for an SIC Index # Returns a numeric value for the given `tag` for the SIC Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers def get_sic_index_data_point_number_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_data_point_number ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_data_point_number" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_sic_index_data_point_number" end # resource path local_var_path = "/indices/sic/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Float') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_sic_index_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Text) for an SIC Index # Returns a text value for the given `tag` for the SIC Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [String] def get_sic_index_data_point_text(identifier, tag, opts = {}) data, _status_code, _headers = get_sic_index_data_point_text_with_http_info(identifier, tag, opts) return data end # Data Point (Text) for an SIC Index # Returns a text value for the given `tag` for the SIC Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def get_sic_index_data_point_text_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_data_point_text ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_data_point_text" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_sic_index_data_point_text" end # resource path local_var_path = "/indices/sic/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_sic_index_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Historical Data for an SIC Index # Returns historical values for the given `tag` and the SIC Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @option opts [String] :type Filter by type, when applicable # @option opts [Date] :start_date Get historical data on or after this date # @option opts [Date] :end_date Get historical data on or before this date # @option opts [String] :sort_order Sort by date `asc` or `desc` (default to desc) # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseSICIndexHistoricalData] def get_sic_index_historical_data(identifier, tag, opts = {}) data, _status_code, _headers = get_sic_index_historical_data_with_http_info(identifier, tag, opts) return data end # Historical Data for an SIC Index # Returns historical values for the given `tag` and the SIC Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @option opts [String] :type Filter by type, when applicable # @option opts [Date] :start_date Get historical data on or after this date # @option opts [Date] :end_date Get historical data on or before this date # @option opts [String] :sort_order Sort by date `asc` or `desc` # @option opts [Integer] :page_size The number of results to return # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseSICIndexHistoricalData, Fixnum, Hash)>] ApiResponseSICIndexHistoricalData data, response status code and response headers def get_sic_index_historical_data_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_historical_data ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_historical_data" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_sic_index_historical_data" end if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_sic_index_historical_data, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/sic/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseSICIndexHistoricalData') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_sic_index_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Lookup Stock Market Index # # @param identifier An Index Identifier (symbol, Intrinio ID) # @param [Hash] opts the optional parameters # @return [StockMarketIndex] def get_stock_market_index_by_id(identifier, opts = {}) data, _status_code, _headers = get_stock_market_index_by_id_with_http_info(identifier, opts) return data end # Lookup Stock Market Index # # @param identifier An Index Identifier (symbol, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Array<(StockMarketIndex, Fixnum, Hash)>] StockMarketIndex data, response status code and response headers def get_stock_market_index_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_by_id ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_by_id" end # resource path local_var_path = "/indices/stock_market/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StockMarketIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Number) for Stock Market Index # Returns a numeric value for the given `tag` for the Stock Market Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [Float] def get_stock_market_index_data_point_number(identifier, tag, opts = {}) data, _status_code, _headers = get_stock_market_index_data_point_number_with_http_info(identifier, tag, opts) return data end # Data Point (Number) for Stock Market Index # Returns a numeric value for the given `tag` for the Stock Market Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers def get_stock_market_index_data_point_number_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_data_point_number ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_data_point_number" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_stock_market_index_data_point_number" end # resource path local_var_path = "/indices/stock_market/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Float') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Text) for Stock Market Index # Returns a text value for the given `tag` for the Stock Market Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [String] def get_stock_market_index_data_point_text(identifier, tag, opts = {}) data, _status_code, _headers = get_stock_market_index_data_point_text_with_http_info(identifier, tag, opts) return data end # Data Point (Text) for Stock Market Index # Returns a text value for the given `tag` for the Stock Market Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def get_stock_market_index_data_point_text_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_data_point_text ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_data_point_text" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_stock_market_index_data_point_text" end # resource path local_var_path = "/indices/stock_market/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Historical Data for Stock Market Index # Returns historical values for the given `tag` and the Stock Market Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @option opts [String] :type Filter by type, when applicable # @option opts [Date] :start_date Get historical data on or after this date # @option opts [Date] :end_date Get historical data on or before this date # @option opts [String] :sort_order Sort by date `asc` or `desc` (default to desc) # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseStockMarketIndexHistoricalData] def get_stock_market_index_historical_data(identifier, tag, opts = {}) data, _status_code, _headers = get_stock_market_index_historical_data_with_http_info(identifier, tag, opts) return data end # Historical Data for Stock Market Index # Returns historical values for the given `tag` and the Stock Market Index with the given `identifier` # @param identifier An Index Identifier (symbol, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @option opts [String] :type Filter by type, when applicable # @option opts [Date] :start_date Get historical data on or after this date # @option opts [Date] :end_date Get historical data on or before this date # @option opts [String] :sort_order Sort by date `asc` or `desc` # @option opts [Integer] :page_size The number of results to return # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseStockMarketIndexHistoricalData, Fixnum, Hash)>] ApiResponseStockMarketIndexHistoricalData data, response status code and response headers def get_stock_market_index_historical_data_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_historical_data ..." end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_historical_data" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_stock_market_index_historical_data" end if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_stock_market_index_historical_data, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/stock_market/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseStockMarketIndexHistoricalData') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search Economic Indices # Search the Federal Reserve Economic Data (FRED) database and return a list of economic indices matching the text query parameter passed through. # @param query Search query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @return [ApiResponseEconomicIndicesSearch] def search_economic_indices(query, opts = {}) data, _status_code, _headers = search_economic_indices_with_http_info(query, opts) return data end # Search Economic Indices # Search the Federal Reserve Economic Data (FRED) database and return a list of economic indices matching the text query parameter passed through. # @param query Search query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @return [Array<(ApiResponseEconomicIndicesSearch, Fixnum, Hash)>] ApiResponseEconomicIndicesSearch data, response status code and response headers def search_economic_indices_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.search_economic_indices ..." end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_economic_indices" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_economic_indices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/economic/search" # query parameters query_params = {} query_params[:'query'] = query query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseEconomicIndicesSearch') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#search_economic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search SIC Indices # Searches for indices using the text in `query` # @param query Search query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @return [ApiResponseSICIndicesSearch] def search_sic_indices(query, opts = {}) data, _status_code, _headers = search_sic_indices_with_http_info(query, opts) return data end # Search SIC Indices # Searches for indices using the text in `query` # @param query Search query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @return [Array<(ApiResponseSICIndicesSearch, Fixnum, Hash)>] ApiResponseSICIndicesSearch data, response status code and response headers def search_sic_indices_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.search_sic_indices ..." end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_sic_indices" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_sic_indices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/sic/search" # query parameters query_params = {} query_params[:'query'] = query query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseSICIndicesSearch') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#search_sic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search Stock Market Indices # Searches for indices using the text in `query` # @param query Search query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @return [ApiResponseStockMarketIndicesSearch] def search_stock_markets_indices(query, opts = {}) data, _status_code, _headers = search_stock_markets_indices_with_http_info(query, opts) return data end # Search Stock Market Indices # Searches for indices using the text in `query` # @param query Search query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @return [Array<(ApiResponseStockMarketIndicesSearch, Fixnum, Hash)>] ApiResponseStockMarketIndicesSearch data, response status code and response headers def search_stock_markets_indices_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: IndexApi.search_stock_markets_indices ..." end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_stock_markets_indices" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_stock_markets_indices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/indices/stock_market/search" # query parameters query_params = {} query_params[:'query'] = query query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ApiResponseStockMarketIndicesSearch') if @api_client.config.debugging @api_client.config.logger.debug "API called: IndexApi#search_stock_markets_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end