=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 SecurityApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # All Securities # Returns a list of all securities available. Delisted securities included. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :active When true, return securities that are active. When false, return securities that are not active. A security is considered active if it has traded or has had a corporate action in the past 30 days, and has not been merged into another security (such as due to ticker changes or corporate restructurings). # @option opts [BOOLEAN] :delisted When true, return securities that have been delisted from their exchange. Note that there may be a newer security for the same company that has been relisted on a differente exchange. When false, return securities that have not been delisted. # @option opts [String] :code Return securities classified with the given code (<a href=\"https://docs.intrinio.com/documentation/security_codes\" target=\"_blank\">reference</a>). # @option opts [String] :currency Return securities traded in the given 3-digit ISO 4217 currency code (<a href=\"https://en.wikipedia.org/wiki/ISO_4217\" target=\"_blank\">reference</a>). # @option opts [String] :ticker Return securities traded with the given ticker. Note that securities across the world (and through time) may trade with the same ticker but represent different companies. Use this in conjuction with other parameters for more specificity. # @option opts [String] :name Return securities with the given text in their name (not case sensitive). # @option opts [String] :composite_mic Return securities classified under the composite exchange with the given Market Identification Code (MIC). A composite exchange may or may not be a real exchange. For example, the USCOMP exchange (our only composite exchange to date) is a combination of exchanges with the following MICs: ARCX, XASE, XPOR, FINR, XCIS, XNAS, XNYS, BATS. This composite grouping is done for user convenience. At this time, all US securities are classified under the composite exchange with MIC USCOMP. To query for specific US exchanges, use the exchange_mic parameter below. # @option opts [String] :exchange_mic The MIC code of the exchange where the security is actually traded. # @option opts [Date] :stock_prices_after Return securities with end-of-day stock prices on or after this date. # @option opts [Date] :stock_prices_before Return securities with end-of-day stock prices on or before this date. # @option opts [String] :cik Return securities belonging to the company with the given Central Index Key (CIK). # @option opts [String] :figi Return securities with the given Exchange Level FIGI (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [String] :composite_figi Return securities with the given Country Composite FIGI (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [String] :share_class_figi Return securities with the given Global Share Class FIGI (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [String] :figi_unique_id Return securities with the given FIGI Unique ID (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [BOOLEAN] :include_non_figi When true, include securities that do not have a FIGI. By default, this is false. If this parameter is not specified, only securities with a FIGI are returned. (default to false) # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [BOOLEAN] :primary_listing If true, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange. Returns both if omitted. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseSecurities] def get_all_securities(opts = {}) data, _status_code, _headers = get_all_securities_with_http_info(opts) return data end # All Securities # Returns a list of all securities available. Delisted securities included. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :active When true, return securities that are active. When false, return securities that are not active. A security is considered active if it has traded or has had a corporate action in the past 30 days, and has not been merged into another security (such as due to ticker changes or corporate restructurings). # @option opts [BOOLEAN] :delisted When true, return securities that have been delisted from their exchange. Note that there may be a newer security for the same company that has been relisted on a differente exchange. When false, return securities that have not been delisted. # @option opts [String] :code Return securities classified with the given code (<a href=\"https://docs.intrinio.com/documentation/security_codes\" target=\"_blank\">reference</a>). # @option opts [String] :currency Return securities traded in the given 3-digit ISO 4217 currency code (<a href=\"https://en.wikipedia.org/wiki/ISO_4217\" target=\"_blank\">reference</a>). # @option opts [String] :ticker Return securities traded with the given ticker. Note that securities across the world (and through time) may trade with the same ticker but represent different companies. Use this in conjuction with other parameters for more specificity. # @option opts [String] :name Return securities with the given text in their name (not case sensitive). # @option opts [String] :composite_mic Return securities classified under the composite exchange with the given Market Identification Code (MIC). A composite exchange may or may not be a real exchange. For example, the USCOMP exchange (our only composite exchange to date) is a combination of exchanges with the following MICs: ARCX, XASE, XPOR, FINR, XCIS, XNAS, XNYS, BATS. This composite grouping is done for user convenience. At this time, all US securities are classified under the composite exchange with MIC USCOMP. To query for specific US exchanges, use the exchange_mic parameter below. # @option opts [String] :exchange_mic The MIC code of the exchange where the security is actually traded. # @option opts [Date] :stock_prices_after Return securities with end-of-day stock prices on or after this date. # @option opts [Date] :stock_prices_before Return securities with end-of-day stock prices on or before this date. # @option opts [String] :cik Return securities belonging to the company with the given Central Index Key (CIK). # @option opts [String] :figi Return securities with the given Exchange Level FIGI (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [String] :composite_figi Return securities with the given Country Composite FIGI (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [String] :share_class_figi Return securities with the given Global Share Class FIGI (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [String] :figi_unique_id Return securities with the given FIGI Unique ID (<a href=\"https://www.openfigi.com/about\" target=\"_blank\">reference</a>). # @option opts [BOOLEAN] :include_non_figi When true, include securities that do not have a FIGI. By default, this is false. If this parameter is not specified, only securities with a FIGI are returned. # @option opts [Integer] :page_size The number of results to return # @option opts [BOOLEAN] :primary_listing If true, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange. Returns both if omitted. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseSecurities, Fixnum, Hash)>] ApiResponseSecurities data, response status code and response headers def get_all_securities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_all_securities ..." 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 SecurityApi.get_all_securities, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities" # query parameters query_params = {} query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil? query_params[:'delisted'] = opts[:'delisted'] if !opts[:'delisted'].nil? query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil? query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? query_params[:'ticker'] = opts[:'ticker'] if !opts[:'ticker'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'composite_mic'] = opts[:'composite_mic'] if !opts[:'composite_mic'].nil? query_params[:'exchange_mic'] = opts[:'exchange_mic'] if !opts[:'exchange_mic'].nil? query_params[:'stock_prices_after'] = opts[:'stock_prices_after'] if !opts[:'stock_prices_after'].nil? query_params[:'stock_prices_before'] = opts[:'stock_prices_before'] if !opts[:'stock_prices_before'].nil? query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil? query_params[:'figi'] = opts[:'figi'] if !opts[:'figi'].nil? query_params[:'composite_figi'] = opts[:'composite_figi'] if !opts[:'composite_figi'].nil? query_params[:'share_class_figi'] = opts[:'share_class_figi'] if !opts[:'share_class_figi'].nil? query_params[:'figi_unique_id'] = opts[:'figi_unique_id'] if !opts[:'figi_unique_id'].nil? query_params[:'include_non_figi'] = opts[:'include_non_figi'] if !opts[:'include_non_figi'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'primary_listing'] = opts[:'primary_listing'] if !opts[:'primary_listing'].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 => 'ApiResponseSecurities') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_all_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Lookup Security # Returns security reference data such as ticker, FIGI, primary exchange, CIK, and a unique security identifier. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Security] def get_security_by_id(identifier, opts = {}) data, _status_code, _headers = get_security_by_id_with_http_info(identifier, opts) return data end # Lookup Security # Returns security reference data such as ticker, FIGI, primary exchange, CIK, and a unique security identifier. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Array<(Security, Fixnum, Hash)>] Security data, response status code and response headers def get_security_by_id_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_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 SecurityApi.get_security_by_id" end # resource path local_var_path = "/securities/{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 => 'Security') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Number) for Security # Returns a numeric value for the given `tag` for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param tag An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags'>reference</a>) # @param [Hash] opts the optional parameters # @return [Float] def get_security_data_point_number(identifier, tag, opts = {}) data, _status_code, _headers = get_security_data_point_number_with_http_info(identifier, tag, opts) return data end # Data Point (Number) for Security # Returns a numeric value for the given `tag` for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param tag An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags'>reference</a>) # @param [Hash] opts the optional parameters # @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers def get_security_data_point_number_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_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 SecurityApi.get_security_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 SecurityApi.get_security_data_point_number" end # resource path local_var_path = "/securities/{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: SecurityApi#get_security_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Data Point (Text) for Security # Returns a text value for the given `tag` for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param tag An Intrinio data tag ID or code-name # @param [Hash] opts the optional parameters # @return [String] def get_security_data_point_text(identifier, tag, opts = {}) data, _status_code, _headers = get_security_data_point_text_with_http_info(identifier, tag, opts) return data end # Data Point (Text) for Security # Returns a text value for the given `tag` for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, 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_security_data_point_text_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_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 SecurityApi.get_security_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 SecurityApi.get_security_data_point_text" end # resource path local_var_path = "/securities/{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: SecurityApi#get_security_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Historical Data for Security # Returns historical values for the given `tag` and the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param tag An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags'>reference</a>) # @param [Hash] opts the optional parameters # @option opts [String] :frequency Return historical data in the given frequency (default to daily) # @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 date 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 [ApiResponseSecurityHistoricalData] def get_security_historical_data(identifier, tag, opts = {}) data, _status_code, _headers = get_security_historical_data_with_http_info(identifier, tag, opts) return data end # Historical Data for Security # Returns historical values for the given `tag` and the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param tag An Intrinio data tag ID or code (<a href='https://data.intrinio.com/data-tags'>reference</a>) # @param [Hash] opts the optional parameters # @option opts [String] :frequency Return historical data in the given frequency # @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 date 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<(ApiResponseSecurityHistoricalData, Fixnum, Hash)>] ApiResponseSecurityHistoricalData data, response status code and response headers def get_security_historical_data_with_http_info(identifier, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_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 SecurityApi.get_security_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 SecurityApi.get_security_historical_data" end if @api_client.config.client_side_validation && opts[:'frequency'] && !['daily', 'weekly', 'monthly', 'quarterly', 'yearly'].include?(opts[:'frequency']) fail ArgumentError, 'invalid value for "frequency", must be one of daily, weekly, monthly, quarterly, yearly' 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 SecurityApi.get_security_historical_data, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s) # query parameters query_params = {} query_params[:'frequency'] = opts[:'frequency'] if !opts[:'frequency'].nil? 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 => 'ApiResponseSecurityHistoricalData') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security History By Identifier # Lists the tickers a company has used over time. # @param identifier A Security identifier (FIGI, COMPOSITE FIGI, SHARE CLASS FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [SecurityHistoryListResult] def get_security_history_by_identifier(identifier, opts = {}) data, _status_code, _headers = get_security_history_by_identifier_with_http_info(identifier, opts) return data end # Security History By Identifier # Lists the tickers a company has used over time. # @param identifier A Security identifier (FIGI, COMPOSITE FIGI, SHARE CLASS FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Array<(SecurityHistoryListResult, Fixnum, Hash)>] SecurityHistoryListResult data, response status code and response headers def get_security_history_by_identifier_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_history_by_identifier ..." 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 SecurityApi.get_security_history_by_identifier" end # resource path local_var_path = "/securities/history-by-identifier/{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 => 'SecurityHistoryListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_history_by_identifier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security History By Ticker # Lists the tickers a company has used over time. # @param ticker A Security ticker symbol # @param [Hash] opts the optional parameters # @return [SecurityHistoryListResult] def get_security_history_by_ticker(ticker, opts = {}) data, _status_code, _headers = get_security_history_by_ticker_with_http_info(ticker, opts) return data end # Security History By Ticker # Lists the tickers a company has used over time. # @param ticker A Security ticker symbol # @param [Hash] opts the optional parameters # @return [Array<(SecurityHistoryListResult, Fixnum, Hash)>] SecurityHistoryListResult data, response status code and response headers def get_security_history_by_ticker_with_http_info(ticker, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_history_by_ticker ..." end # verify the required parameter 'ticker' is set if @api_client.config.client_side_validation && ticker.nil? fail ArgumentError, "Missing the required parameter 'ticker' when calling SecurityApi.get_security_history_by_ticker" end # resource path local_var_path = "/securities/history-by-ticker/{ticker}".sub('{' + 'ticker' + '}', ticker.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 => 'SecurityHistoryListResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_history_by_ticker\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Institutional Ownership by Security # Returns a list of all institutional owners of a given security. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseSecurityInstitutionalOwnership] def get_security_insider_ownership(identifier, opts = {}) data, _status_code, _headers = get_security_insider_ownership_with_http_info(identifier, opts) return data end # Institutional Ownership by Security # Returns a list of all institutional owners of a given security. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseSecurityInstitutionalOwnership, Fixnum, Hash)>] ApiResponseSecurityInstitutionalOwnership data, response status code and response headers def get_security_insider_ownership_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_insider_ownership ..." 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 SecurityApi.get_security_insider_ownership" end # resource path local_var_path = "/securities/{identifier}/institutional_ownership".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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 => 'ApiResponseSecurityInstitutionalOwnership') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_insider_ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security Intervals Movers # Returns a list of intervals for the biggest movers over the last hour interval. # @param [Hash] opts the optional parameters # @option opts [String] :source Realtime or 15-minute delayed contracts. # @option opts [DateTime] :open_time The inclusive UTC date and time the interval opens at. # @return [SecurityIntervalsMoversResult] def get_security_interval_movers(opts = {}) data, _status_code, _headers = get_security_interval_movers_with_http_info(opts) return data end # Security Intervals Movers # Returns a list of intervals for the biggest movers over the last hour interval. # @param [Hash] opts the optional parameters # @option opts [String] :source Realtime or 15-minute delayed contracts. # @option opts [DateTime] :open_time The inclusive UTC date and time the interval opens at. # @return [Array<(SecurityIntervalsMoversResult, Fixnum, Hash)>] SecurityIntervalsMoversResult data, response status code and response headers def get_security_interval_movers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_interval_movers ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed', 'nasdaq_basic', 'nasdaq_basic_filtered'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed, nasdaq_basic, nasdaq_basic_filtered' end # resource path local_var_path = "/securities/market_movers" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'open_time'] = opts[:'open_time'] if !opts[:'open_time'].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 => 'SecurityIntervalsMoversResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_interval_movers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security Intervals Movers By Change # Returns a list of intervals for the biggest movers by change over the last hour interval. # @param [Hash] opts the optional parameters # @option opts [String] :source Realtime or 15-minute delayed contracts. # @option opts [DateTime] :open_time The inclusive UTC date and time the interval opens at. # @return [SecurityIntervalsMoversResult] def get_security_interval_movers_change(opts = {}) data, _status_code, _headers = get_security_interval_movers_change_with_http_info(opts) return data end # Security Intervals Movers By Change # Returns a list of intervals for the biggest movers by change over the last hour interval. # @param [Hash] opts the optional parameters # @option opts [String] :source Realtime or 15-minute delayed contracts. # @option opts [DateTime] :open_time The inclusive UTC date and time the interval opens at. # @return [Array<(SecurityIntervalsMoversResult, Fixnum, Hash)>] SecurityIntervalsMoversResult data, response status code and response headers def get_security_interval_movers_change_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_interval_movers_change ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed', 'nasdaq_basic', 'nasdaq_basic_filtered'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed, nasdaq_basic, nasdaq_basic_filtered' end # resource path local_var_path = "/securities/market_movers/change" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'open_time'] = opts[:'open_time'] if !opts[:'open_time'].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 => 'SecurityIntervalsMoversResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_interval_movers_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security Intervals Movers By Volume # Returns a list of intervals for the biggest movers by volume over the last hour interval. # @param [Hash] opts the optional parameters # @option opts [String] :source Realtime or 15-minute delayed contracts. # @option opts [DateTime] :open_time The inclusive UTC date and time the interval opens at. # @return [SecurityIntervalsMoversResult] def get_security_interval_movers_volume(opts = {}) data, _status_code, _headers = get_security_interval_movers_volume_with_http_info(opts) return data end # Security Intervals Movers By Volume # Returns a list of intervals for the biggest movers by volume over the last hour interval. # @param [Hash] opts the optional parameters # @option opts [String] :source Realtime or 15-minute delayed contracts. # @option opts [DateTime] :open_time The inclusive UTC date and time the interval opens at. # @return [Array<(SecurityIntervalsMoversResult, Fixnum, Hash)>] SecurityIntervalsMoversResult data, response status code and response headers def get_security_interval_movers_volume_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_interval_movers_volume ..." end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed', 'nasdaq_basic', 'nasdaq_basic_filtered'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed, nasdaq_basic, nasdaq_basic_filtered' end # resource path local_var_path = "/securities/market_movers/volume" # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'open_time'] = opts[:'open_time'] if !opts[:'open_time'].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 => 'SecurityIntervalsMoversResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_interval_movers_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Interval Stock Prices for Security # Return open, close, high, low, volume, average price, and change ratio for a particular interval for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param interval_size The interval for which to return stock prices # @param [Hash] opts the optional parameters # @option opts [String] :source Return intervals from the specified data source # @option opts [Date] :start_date Return intervals starting at the specified date # @option opts [String] :start_time Return intervals starting at the specified time on the `start_date` (24-hour in 'hh:mm:ss' format) # @option opts [Date] :end_date Return intervals stopping at the specified date # @option opts [String] :end_time Return intervals stopping at the specified time on the `end_date` (24-hour in 'hh:mm:ss' format) # @option opts [String] :timezone Interprets the input times in this time zone, as well as returns times in this timezone. (default to UTC) # @option opts [Integer] :page_size The number of results to return (default to 100) # @option opts [BOOLEAN] :split_adjusted Whether to return the values adjusted for splits or not. Default is false. (default to false) # @option opts [BOOLEAN] :include_quote_only_bars If true, also include bars where no trades occurred but quotes did. (default to false) # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseSecurityIntervalPrices] def get_security_interval_prices(identifier, interval_size, opts = {}) data, _status_code, _headers = get_security_interval_prices_with_http_info(identifier, interval_size, opts) return data end # Interval Stock Prices for Security # Return open, close, high, low, volume, average price, and change ratio for a particular interval for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param interval_size The interval for which to return stock prices # @param [Hash] opts the optional parameters # @option opts [String] :source Return intervals from the specified data source # @option opts [Date] :start_date Return intervals starting at the specified date # @option opts [String] :start_time Return intervals starting at the specified time on the `start_date` (24-hour in 'hh:mm:ss' format) # @option opts [Date] :end_date Return intervals stopping at the specified date # @option opts [String] :end_time Return intervals stopping at the specified time on the `end_date` (24-hour in 'hh:mm:ss' format) # @option opts [String] :timezone Interprets the input times in this time zone, as well as returns times in this timezone. # @option opts [Integer] :page_size The number of results to return # @option opts [BOOLEAN] :split_adjusted Whether to return the values adjusted for splits or not. Default is false. # @option opts [BOOLEAN] :include_quote_only_bars If true, also include bars where no trades occurred but quotes did. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseSecurityIntervalPrices, Fixnum, Hash)>] ApiResponseSecurityIntervalPrices data, response status code and response headers def get_security_interval_prices_with_http_info(identifier, interval_size, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_interval_prices ..." 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 SecurityApi.get_security_interval_prices" end # verify the required parameter 'interval_size' is set if @api_client.config.client_side_validation && interval_size.nil? fail ArgumentError, "Missing the required parameter 'interval_size' when calling SecurityApi.get_security_interval_prices" end # verify enum value if @api_client.config.client_side_validation && !['1m', '5m', '10m', '15m', '30m', '60m', '1h'].include?(interval_size) fail ArgumentError, "invalid value for 'interval_size', must be one of 1m, 5m, 10m, 15m, 30m, 60m, 1h" end if @api_client.config.client_side_validation && opts[:'source'] && !['realtime', 'delayed', 'nasdaq_basic', 'nasdaq_basic_filtered'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of realtime, delayed, nasdaq_basic, nasdaq_basic_filtered' end if @api_client.config.client_side_validation && opts[:'timezone'] && !['Africa/Algiers', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Monrovia', 'Africa/Nairobi', 'America/Argentina/Buenos_Aires', 'America/Bogota', 'America/Caracas', 'America/Chicago', 'America/Chihuahua', 'America/Denver', 'America/Godthab', 'America/Guatemala', 'America/Guyana', 'America/Halifax', 'America/Indiana/Indianapolis', 'America/Juneau', 'America/La_Paz', 'America/Lima', 'America/Lima', 'America/Los_Angeles', 'America/Mazatlan', 'America/Mexico_City', 'America/Mexico_City', 'America/Monterrey', 'America/Montevideo', 'America/New_York', 'America/Phoenix', 'America/Regina', 'America/Santiago', 'America/Sao_Paulo', 'America/St_Johns', 'America/Tijuana', 'Asia/Almaty', 'Asia/Baghdad', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Bangkok', 'Asia/Chongqing', 'Asia/Colombo', 'Asia/Dhaka', 'Asia/Dhaka', 'Asia/Hong_Kong', 'Asia/Irkutsk', 'Asia/Jakarta', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Karachi', 'Asia/Kathmandu', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuwait', 'Asia/Magadan', 'Asia/Muscat', 'Asia/Muscat', 'Asia/Novosibirsk', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Ulaanbaatar', 'Asia/Urumqi', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Cape_Verde', 'Atlantic/South_Georgia', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Darwin', 'Australia/Hobart', 'Australia/Melbourne', 'Australia/Melbourne', 'Australia/Perth', 'Australia/Sydney', 'Etc/UTC', 'UTC', 'Europe/Amsterdam', 'Europe/Athens', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Helsinki', 'Europe/Istanbul', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/London', 'Europe/Madrid', 'Europe/Minsk', 'Europe/Moscow', 'Europe/Moscow', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/Sarajevo', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Majuro', 'Pacific/Midway', 'Pacific/Midway', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Port_Moresby', 'Pacific/Tongatapu'].include?(opts[:'timezone']) fail ArgumentError, 'invalid value for "timezone", must be one of Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Godthab, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Tokyo, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Melbourne, Australia/Perth, Australia/Sydney, Etc/UTC, UTC, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kiev, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Pacific/Apia, Pacific/Auckland, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu' end # resource path local_var_path = "/securities/{identifier}/prices/intervals".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'interval_size'] = interval_size query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'timezone'] = opts[:'timezone'] if !opts[:'timezone'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'split_adjusted'] = opts[:'split_adjusted'] if !opts[:'split_adjusted'].nil? query_params[:'include_quote_only_bars'] = opts[:'include_quote_only_bars'] if !opts[:'include_quote_only_bars'].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 => 'ApiResponseSecurityIntervalPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_interval_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Intraday Stock Prices for Security # Deprecated. Return intraday stock prices for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :source Return intraday prices from the specified data source # @option opts [Date] :start_date Return intraday prices starting at the specified date # @option opts [String] :start_time Return intraday prices starting at the specified time on the `start_date` (24-hour in 'hh:mm' format, UTC timezone) # @option opts [Date] :end_date Return intraday prices stopping at the specified date # @option opts [String] :end_time Return intraday prices stopping at the specified time on the `end_date` (24-hour in 'hh:mm' format, UTC timezone) # @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 [ApiResponseSecurityIntradayPrices] def get_security_intraday_prices(identifier, opts = {}) data, _status_code, _headers = get_security_intraday_prices_with_http_info(identifier, opts) return data end # Intraday Stock Prices for Security # Deprecated. Return intraday stock prices for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :source Return intraday prices from the specified data source # @option opts [Date] :start_date Return intraday prices starting at the specified date # @option opts [String] :start_time Return intraday prices starting at the specified time on the `start_date` (24-hour in 'hh:mm' format, UTC timezone) # @option opts [Date] :end_date Return intraday prices stopping at the specified date # @option opts [String] :end_time Return intraday prices stopping at the specified time on the `end_date` (24-hour in 'hh:mm' format, UTC timezone) # @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<(ApiResponseSecurityIntradayPrices, Fixnum, Hash)>] ApiResponseSecurityIntradayPrices data, response status code and response headers def get_security_intraday_prices_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_intraday_prices ..." 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 SecurityApi.get_security_intraday_prices" end if @api_client.config.client_side_validation && opts[:'source'] && !['iex', 'bats'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of iex, bats' 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 SecurityApi.get_security_intraday_prices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/intraday".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].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 => 'ApiResponseSecurityIntradayPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_intraday_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Latest Dividend Record for Security # Returns the latest available dividend information for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [DividendRecord] def get_security_latest_dividend_record(identifier, opts = {}) data, _status_code, _headers = get_security_latest_dividend_record_with_http_info(identifier, opts) return data end # Latest Dividend Record for Security # Returns the latest available dividend information for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Array<(DividendRecord, Fixnum, Hash)>] DividendRecord data, response status code and response headers def get_security_latest_dividend_record_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_latest_dividend_record ..." 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 SecurityApi.get_security_latest_dividend_record" end # resource path local_var_path = "/securities/{identifier}/dividends/latest".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 => 'DividendRecord') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_latest_dividend_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Latest Earnings Record for Security # Returns latest available earnings information for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [EarningsRecord] def get_security_latest_earnings_record(identifier, opts = {}) data, _status_code, _headers = get_security_latest_earnings_record_with_http_info(identifier, opts) return data end # Latest Earnings Record for Security # Returns latest available earnings information for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @return [Array<(EarningsRecord, Fixnum, Hash)>] EarningsRecord data, response status code and response headers def get_security_latest_earnings_record_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_latest_earnings_record ..." 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 SecurityApi.get_security_latest_earnings_record" end # resource path local_var_path = "/securities/{identifier}/earnings/latest".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 => 'EarningsRecord') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_latest_earnings_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Accumulation/Distribution Index # The Accumulation / Distribution Indicator is a volume-based technical indicator which uses the relationship between the stock`s price and volume flow to determine the underlying trend of a stock, up, down, or sideways trend of a stock. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityAccumulationDistributionIndex] def get_security_price_technicals_adi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_adi_with_http_info(identifier, opts) return data end # Accumulation/Distribution Index # The Accumulation / Distribution Indicator is a volume-based technical indicator which uses the relationship between the stock`s price and volume flow to determine the underlying trend of a stock, up, down, or sideways trend of a stock. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityAccumulationDistributionIndex, Fixnum, Hash)>] ApiResponseSecurityAccumulationDistributionIndex data, response status code and response headers def get_security_price_technicals_adi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_adi ..." 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 SecurityApi.get_security_price_technicals_adi" 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 SecurityApi.get_security_price_technicals_adi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/adi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'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 => 'ApiResponseSecurityAccumulationDistributionIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_adi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Average Daily Trading Volume # Average Daily Trading Volume is the average number of shares traded over a given period, usually between 20 to 30 trading days. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Average Daily Trading Volume (default to 22) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityAverageDailyTradingVolume] def get_security_price_technicals_adtv(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_adtv_with_http_info(identifier, opts) return data end # Average Daily Trading Volume # Average Daily Trading Volume is the average number of shares traded over a given period, usually between 20 to 30 trading days. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Average Daily Trading Volume # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityAverageDailyTradingVolume, Fixnum, Hash)>] ApiResponseSecurityAverageDailyTradingVolume data, response status code and response headers def get_security_price_technicals_adtv_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_adtv ..." 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 SecurityApi.get_security_price_technicals_adtv" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_adtv, must be greater than or equal to 5.' 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 SecurityApi.get_security_price_technicals_adtv, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/adtv".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityAverageDailyTradingVolume') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_adtv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Average Directional Index # The Average Directional Index indicator is often used to identify decreasing or increasing price momentum for an underlying security, it is composed of a total of three indicators, the current trendline (adx), a positive directional indicator (di_pos), and a negative directional indicator (di_neg). # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Average Directional Index (default to 14) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityAverageDirectionalIndex] def get_security_price_technicals_adx(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_adx_with_http_info(identifier, opts) return data end # Average Directional Index # The Average Directional Index indicator is often used to identify decreasing or increasing price momentum for an underlying security, it is composed of a total of three indicators, the current trendline (adx), a positive directional indicator (di_pos), and a negative directional indicator (di_neg). # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Average Directional Index # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityAverageDirectionalIndex, Fixnum, Hash)>] ApiResponseSecurityAverageDirectionalIndex data, response status code and response headers def get_security_price_technicals_adx_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_adx ..." 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 SecurityApi.get_security_price_technicals_adx" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 3 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_adx, must be greater than or equal to 3.' 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 SecurityApi.get_security_price_technicals_adx, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/adx".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityAverageDirectionalIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_adx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Awesome Oscillator # The Awesome Oscillator (ao) is a momentum indicator and is calculated by taking the difference between the latest 5 period simple moving average and the 34 period simple moving average. Rather than using the closing price like other indicators, the Awesome Oscillator uses the latest period`s midpoint value (period_high - period_low / 2). The Awesome Oscillator is useful in identifying and trading, zero-line crossovers, twin-peaks trading, and bullish/bearish saucers - Awesome Oscillator is often aggregated with additional technical indicators. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :short_period The number of observations, per period, to calculate short period Simple Moving Average of the Awesome Oscillator (default to 5) # @option opts [Integer] :long_period The number of observations, per period, to calculate long period Simple Moving Average of the Awesome Oscillator (default to 34) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityAwesomeOscillator] def get_security_price_technicals_ao(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_ao_with_http_info(identifier, opts) return data end # Awesome Oscillator # The Awesome Oscillator (ao) is a momentum indicator and is calculated by taking the difference between the latest 5 period simple moving average and the 34 period simple moving average. Rather than using the closing price like other indicators, the Awesome Oscillator uses the latest period`s midpoint value (period_high - period_low / 2). The Awesome Oscillator is useful in identifying and trading, zero-line crossovers, twin-peaks trading, and bullish/bearish saucers - Awesome Oscillator is often aggregated with additional technical indicators. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :short_period The number of observations, per period, to calculate short period Simple Moving Average of the Awesome Oscillator # @option opts [Integer] :long_period The number of observations, per period, to calculate long period Simple Moving Average of the Awesome Oscillator # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityAwesomeOscillator, Fixnum, Hash)>] ApiResponseSecurityAwesomeOscillator data, response status code and response headers def get_security_price_technicals_ao_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_ao ..." 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 SecurityApi.get_security_price_technicals_ao" end if @api_client.config.client_side_validation && !opts[:'long_period'].nil? && opts[:'long_period'] < 5 fail ArgumentError, 'invalid value for "opts[:"long_period"]" when calling SecurityApi.get_security_price_technicals_ao, must be greater than or equal to 5.' 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 SecurityApi.get_security_price_technicals_ao, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/ao".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'short_period'] = opts[:'short_period'] if !opts[:'short_period'].nil? query_params[:'long_period'] = opts[:'long_period'] if !opts[:'long_period'].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[:'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 => 'ApiResponseSecurityAwesomeOscillator') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_ao\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Average True Range # The Average True Range (ATR) is a non-directional market volatility indicator often used to generate stop-out or entry indications. An increasing or expanding ATR typically indicates higher volatility, and a decreasing ATR indicates sideways price action and lower volatility. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Average True Range (default to 14) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityAverageTrueRange] def get_security_price_technicals_atr(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_atr_with_http_info(identifier, opts) return data end # Average True Range # The Average True Range (ATR) is a non-directional market volatility indicator often used to generate stop-out or entry indications. An increasing or expanding ATR typically indicates higher volatility, and a decreasing ATR indicates sideways price action and lower volatility. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Average True Range # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityAverageTrueRange, Fixnum, Hash)>] ApiResponseSecurityAverageTrueRange data, response status code and response headers def get_security_price_technicals_atr_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_atr ..." 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 SecurityApi.get_security_price_technicals_atr" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 4 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_atr, must be greater than or equal to 4.' 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 SecurityApi.get_security_price_technicals_atr, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/atr".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityAverageTrueRange') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_atr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Bollinger Bands # Bollinger Bands can be a useful technical analysis tool for generating oversold or overbought indicators. Bollinger Bands are composed of three lines, a simple moving average (middle band) and an upper and lower band – the upper and lower bands are typically 2 standard deviations +/- from a 20-day simple moving average, but can be modified. Traders typically consider an underlying security to be overbought as the underlying`s price moves towards the upper band and oversold as the underlying price moves towards the lower band. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Bollinger Bands (default to 20) # @option opts [Float] :standard_deviations The number of standard deviations to calculate the upper and lower bands of the Bollinger Bands (default to 2.0) # @option opts [String] :price_key The Stock Price field to use when calculating Bollinger Bands (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityBollingerBands] def get_security_price_technicals_bb(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_bb_with_http_info(identifier, opts) return data end # Bollinger Bands # Bollinger Bands can be a useful technical analysis tool for generating oversold or overbought indicators. Bollinger Bands are composed of three lines, a simple moving average (middle band) and an upper and lower band – the upper and lower bands are typically 2 standard deviations +/- from a 20-day simple moving average, but can be modified. Traders typically consider an underlying security to be overbought as the underlying`s price moves towards the upper band and oversold as the underlying price moves towards the lower band. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Bollinger Bands # @option opts [Float] :standard_deviations The number of standard deviations to calculate the upper and lower bands of the Bollinger Bands # @option opts [String] :price_key The Stock Price field to use when calculating Bollinger Bands # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityBollingerBands, Fixnum, Hash)>] ApiResponseSecurityBollingerBands data, response status code and response headers def get_security_price_technicals_bb_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_bb ..." 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 SecurityApi.get_security_price_technicals_bb" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_bb, must be greater than or equal to 5.' end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_bb, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/bb".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'standard_deviations'] = opts[:'standard_deviations'] if !opts[:'standard_deviations'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecurityBollingerBands') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_bb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Commodity Channel Index # The Commodity Channel Index (CCI) is a technical indicator used to generate buy and sell signals by indicating periods of strength and weakness in the market. CCI signals that fall below -100 are often perceived as weakness in the underlying price movement and CCI signals that rise above 100 indicate strength behind the underlying price movement. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Commodity Channel Index (default to 20) # @option opts [Float] :constant The number of observations, per period, to calculate Commodity Channel Index (default to 0.015) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityCommodityChannelIndex] def get_security_price_technicals_cci(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_cci_with_http_info(identifier, opts) return data end # Commodity Channel Index # The Commodity Channel Index (CCI) is a technical indicator used to generate buy and sell signals by indicating periods of strength and weakness in the market. CCI signals that fall below -100 are often perceived as weakness in the underlying price movement and CCI signals that rise above 100 indicate strength behind the underlying price movement. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Commodity Channel Index # @option opts [Float] :constant The number of observations, per period, to calculate Commodity Channel Index # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityCommodityChannelIndex, Fixnum, Hash)>] ApiResponseSecurityCommodityChannelIndex data, response status code and response headers def get_security_price_technicals_cci_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_cci ..." 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 SecurityApi.get_security_price_technicals_cci" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_cci, must be greater than or equal to 5.' 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 SecurityApi.get_security_price_technicals_cci, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/cci".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'constant'] = opts[:'constant'] if !opts[:'constant'].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[:'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 => 'ApiResponseSecurityCommodityChannelIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_cci\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Chaikin Money Flow # The Chaikin Money Flow (CMF) utilizes exponential moving averages as an indicator to monitor the flow of money and momentum. The CMF indicator oscillates around a midrange 0-line and ranges between 100 and -100. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Chaikin Money Flow (default to 20) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityChaikinMoneyFlow] def get_security_price_technicals_cmf(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_cmf_with_http_info(identifier, opts) return data end # Chaikin Money Flow # The Chaikin Money Flow (CMF) utilizes exponential moving averages as an indicator to monitor the flow of money and momentum. The CMF indicator oscillates around a midrange 0-line and ranges between 100 and -100. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Chaikin Money Flow # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityChaikinMoneyFlow, Fixnum, Hash)>] ApiResponseSecurityChaikinMoneyFlow data, response status code and response headers def get_security_price_technicals_cmf_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_cmf ..." 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 SecurityApi.get_security_price_technicals_cmf" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_cmf, must be greater than or equal to 5.' 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 SecurityApi.get_security_price_technicals_cmf, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/cmf".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityChaikinMoneyFlow') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_cmf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Donchian Channel # The Donchian Channel consists of an Upper Bound (upper_bound) and Lower Bound (lower_bound) that track the recent highs and lows and is often used to signal entry and exit points for a position. As the price of the underlying symbol increases the Upper Bound raises, if the price becomes range bound the Upper Bound will remain flat and if the price begins to decrease, the Upper Bound will fall (and vice-versa for the Lower Bound). # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Donchian Channel (default to 20) # @option opts [String] :price_key The Stock Price field to use when calculating Donchian Channel (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityDonchianChannel] def get_security_price_technicals_dc(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_dc_with_http_info(identifier, opts) return data end # Donchian Channel # The Donchian Channel consists of an Upper Bound (upper_bound) and Lower Bound (lower_bound) that track the recent highs and lows and is often used to signal entry and exit points for a position. As the price of the underlying symbol increases the Upper Bound raises, if the price becomes range bound the Upper Bound will remain flat and if the price begins to decrease, the Upper Bound will fall (and vice-versa for the Lower Bound). # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Donchian Channel # @option opts [String] :price_key The Stock Price field to use when calculating Donchian Channel # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityDonchianChannel, Fixnum, Hash)>] ApiResponseSecurityDonchianChannel data, response status code and response headers def get_security_price_technicals_dc_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_dc ..." 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 SecurityApi.get_security_price_technicals_dc" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_dc, must be greater than or equal to 5.' end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_dc, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/dc".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecurityDonchianChannel') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_dc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Detrended Price Oscillator # The Detrended Price Oscillator (DPO) signals the peaks and troughs of the underlying symbol’s price for a set period of time and is often used by traders to estimate future peaks and troughs using this as guidance to enter or exit a position. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Detrended Price Oscillator (default to 20) # @option opts [String] :price_key The Stock Price field to use when calculating Detrended Price Oscillator (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityDetrendedPriceOscillator] def get_security_price_technicals_dpo(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_dpo_with_http_info(identifier, opts) return data end # Detrended Price Oscillator # The Detrended Price Oscillator (DPO) signals the peaks and troughs of the underlying symbol’s price for a set period of time and is often used by traders to estimate future peaks and troughs using this as guidance to enter or exit a position. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Detrended Price Oscillator # @option opts [String] :price_key The Stock Price field to use when calculating Detrended Price Oscillator # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityDetrendedPriceOscillator, Fixnum, Hash)>] ApiResponseSecurityDetrendedPriceOscillator data, response status code and response headers def get_security_price_technicals_dpo_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_dpo ..." 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 SecurityApi.get_security_price_technicals_dpo" end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_dpo, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/dpo".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecurityDetrendedPriceOscillator') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_dpo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Ease of Movement # The Ease of Movement (EOM) is a volume based oscillator that fluctuates around a midrange 0-line into positive and negative values. Positive values indicate that the underlying symbol`s price is rising with relative ease and negative value indicates the underlying symbol`s price is failing with relative ease. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Ease of Movement (default to 20) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityEaseOfMovement] def get_security_price_technicals_eom(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_eom_with_http_info(identifier, opts) return data end # Ease of Movement # The Ease of Movement (EOM) is a volume based oscillator that fluctuates around a midrange 0-line into positive and negative values. Positive values indicate that the underlying symbol`s price is rising with relative ease and negative value indicates the underlying symbol`s price is failing with relative ease. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Ease of Movement # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityEaseOfMovement, Fixnum, Hash)>] ApiResponseSecurityEaseOfMovement data, response status code and response headers def get_security_price_technicals_eom_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_eom ..." 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 SecurityApi.get_security_price_technicals_eom" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 4 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_eom, must be greater than or equal to 4.' 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 SecurityApi.get_security_price_technicals_eom, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/eom".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityEaseOfMovement') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_eom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Force Index # The Force Index (FI) is an oscillator that takes into account the intensity of an underlying symbol`s price movement and its corresponding volume. It is used to confirm price breakouts and signal underlying trends. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityForceIndex] def get_security_price_technicals_fi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_fi_with_http_info(identifier, opts) return data end # Force Index # The Force Index (FI) is an oscillator that takes into account the intensity of an underlying symbol`s price movement and its corresponding volume. It is used to confirm price breakouts and signal underlying trends. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityForceIndex, Fixnum, Hash)>] ApiResponseSecurityForceIndex data, response status code and response headers def get_security_price_technicals_fi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_fi ..." 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 SecurityApi.get_security_price_technicals_fi" 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 SecurityApi.get_security_price_technicals_fi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/fi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'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 => 'ApiResponseSecurityForceIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_fi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Ichimoku Kinko Hyo # The Ichimoku Kinko Hyo was designed to be an all-in-one trading indicator that could help traders determine momentum, support, and resistance. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :low_period The number of observations, per period, to calculate Tenkan Sen (Conversion Line) of Ichimoku Kinko Hyo (default to 9) # @option opts [Integer] :medium_period The number of observations, per period, to calculate Kijun Sen (Base Line), Senkou Span A (Leading Span A), and Chikou Span (Lagging Span) of Ichimoku Kinko Hyo (default to 26) # @option opts [Integer] :high_period The number of observations, per period, to calculate Senkou Span B (Leading Span B) of Ichimoku Kinko Hyo (default to 52) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityIchimokuKinkoHyo] def get_security_price_technicals_ichimoku(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_ichimoku_with_http_info(identifier, opts) return data end # Ichimoku Kinko Hyo # The Ichimoku Kinko Hyo was designed to be an all-in-one trading indicator that could help traders determine momentum, support, and resistance. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :low_period The number of observations, per period, to calculate Tenkan Sen (Conversion Line) of Ichimoku Kinko Hyo # @option opts [Integer] :medium_period The number of observations, per period, to calculate Kijun Sen (Base Line), Senkou Span A (Leading Span A), and Chikou Span (Lagging Span) of Ichimoku Kinko Hyo # @option opts [Integer] :high_period The number of observations, per period, to calculate Senkou Span B (Leading Span B) of Ichimoku Kinko Hyo # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityIchimokuKinkoHyo, Fixnum, Hash)>] ApiResponseSecurityIchimokuKinkoHyo data, response status code and response headers def get_security_price_technicals_ichimoku_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_ichimoku ..." 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 SecurityApi.get_security_price_technicals_ichimoku" end if @api_client.config.client_side_validation && !opts[:'medium_period'].nil? && opts[:'medium_period'] < 2 fail ArgumentError, 'invalid value for "opts[:"medium_period"]" when calling SecurityApi.get_security_price_technicals_ichimoku, must be greater than or equal to 2.' end if @api_client.config.client_side_validation && !opts[:'high_period'].nil? && opts[:'high_period'] < 4 fail ArgumentError, 'invalid value for "opts[:"high_period"]" when calling SecurityApi.get_security_price_technicals_ichimoku, must be greater than or equal to 4.' 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 SecurityApi.get_security_price_technicals_ichimoku, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/ichimoku".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'low_period'] = opts[:'low_period'] if !opts[:'low_period'].nil? query_params[:'medium_period'] = opts[:'medium_period'] if !opts[:'medium_period'].nil? query_params[:'high_period'] = opts[:'high_period'] if !opts[:'high_period'].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[:'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 => 'ApiResponseSecurityIchimokuKinkoHyo') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_ichimoku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Keltner Channel # The Keltner Channel is a volatility based signal, with upper, middle, and lower bands. It is often used at market open, when the largest moves tend to occur. In general, traders tend to buy if the price breaks up above the upper band or sell short if the price drops below the lower band. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Kelter Channel (default to 10) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityKeltnerChannel] def get_security_price_technicals_kc(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_kc_with_http_info(identifier, opts) return data end # Keltner Channel # The Keltner Channel is a volatility based signal, with upper, middle, and lower bands. It is often used at market open, when the largest moves tend to occur. In general, traders tend to buy if the price breaks up above the upper band or sell short if the price drops below the lower band. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Kelter Channel # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityKeltnerChannel, Fixnum, Hash)>] ApiResponseSecurityKeltnerChannel data, response status code and response headers def get_security_price_technicals_kc_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_kc ..." 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 SecurityApi.get_security_price_technicals_kc" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_kc, must be greater than or equal to 5.' 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 SecurityApi.get_security_price_technicals_kc, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/kc".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityKeltnerChannel') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_kc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Know Sure Thing # The Know Sure Thing indicator (KST) is a momentum based oscillator that is calculated by measuring the momentum of four separate price cycles. KST fluctuates above and below a zero line and is used to identify overbought and oversold conditions, and is often used with additional indicators to boost signal strength. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :roc1 The number of observations, per period, to calculate the rate-of-change for RCMA1 (default to 10) # @option opts [Integer] :roc2 The number of observations, per period, to calculate the rate-of-change for RCMA2 (default to 15) # @option opts [Integer] :roc3 The number of observations, per period, to calculate the rate-of-change for RCMA3 (default to 20) # @option opts [Integer] :roc4 The number of observations, per period, to calculate the rate-of-change for RCMA4 (default to 30) # @option opts [Integer] :sma1 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA1 (default to 10) # @option opts [Integer] :sma2 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA2 (default to 10) # @option opts [Integer] :sma3 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA3 (default to 10) # @option opts [Integer] :sma4 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA4 (default to 15) # @option opts [String] :price_key The Stock Price field to use when calculating Know Sure Thing (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityKnowSureThing] def get_security_price_technicals_kst(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_kst_with_http_info(identifier, opts) return data end # Know Sure Thing # The Know Sure Thing indicator (KST) is a momentum based oscillator that is calculated by measuring the momentum of four separate price cycles. KST fluctuates above and below a zero line and is used to identify overbought and oversold conditions, and is often used with additional indicators to boost signal strength. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :roc1 The number of observations, per period, to calculate the rate-of-change for RCMA1 # @option opts [Integer] :roc2 The number of observations, per period, to calculate the rate-of-change for RCMA2 # @option opts [Integer] :roc3 The number of observations, per period, to calculate the rate-of-change for RCMA3 # @option opts [Integer] :roc4 The number of observations, per period, to calculate the rate-of-change for RCMA4 # @option opts [Integer] :sma1 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA1 # @option opts [Integer] :sma2 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA2 # @option opts [Integer] :sma3 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA3 # @option opts [Integer] :sma4 The number of observations, per period, to calculate the Simple Moving Average of the rate-of-change for RCMA4 # @option opts [String] :price_key The Stock Price field to use when calculating Know Sure Thing # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityKnowSureThing, Fixnum, Hash)>] ApiResponseSecurityKnowSureThing data, response status code and response headers def get_security_price_technicals_kst_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_kst ..." 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 SecurityApi.get_security_price_technicals_kst" end if @api_client.config.client_side_validation && !opts[:'roc4'].nil? && opts[:'roc4'] < 3 fail ArgumentError, 'invalid value for "opts[:"roc4"]" when calling SecurityApi.get_security_price_technicals_kst, must be greater than or equal to 3.' end if @api_client.config.client_side_validation && !opts[:'sma4'].nil? && opts[:'sma4'] < 3 fail ArgumentError, 'invalid value for "opts[:"sma4"]" when calling SecurityApi.get_security_price_technicals_kst, must be greater than or equal to 3.' end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_kst, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/kst".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'roc1'] = opts[:'roc1'] if !opts[:'roc1'].nil? query_params[:'roc2'] = opts[:'roc2'] if !opts[:'roc2'].nil? query_params[:'roc3'] = opts[:'roc3'] if !opts[:'roc3'].nil? query_params[:'roc4'] = opts[:'roc4'] if !opts[:'roc4'].nil? query_params[:'sma1'] = opts[:'sma1'] if !opts[:'sma1'].nil? query_params[:'sma2'] = opts[:'sma2'] if !opts[:'sma2'].nil? query_params[:'sma3'] = opts[:'sma3'] if !opts[:'sma3'].nil? query_params[:'sma4'] = opts[:'sma4'] if !opts[:'sma4'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecurityKnowSureThing') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_kst\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Moving Average Convergence Divergence # Moving average convergence divergence (MACD) is a trend-following momentum oscillator that consists of three indicators: (1) a 12 period short-term exponential moving average (EMA) a 26 period long-term EMA and a 9 period EMA signal line. Traders using MACD often look for signal line crossovers, centerline crossovers, and EMA divergences to indicate the momentum and underlying trend of a security`s price. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :fast_period The number of observations, per period, to calculate the fast moving Exponential Moving Average for Moving Average Convergence Divergence (default to 12) # @option opts [Integer] :slow_period The number of observations, per period, to calculate the slow moving Exponential Moving Average for Moving Average Convergence Divergence (default to 26) # @option opts [Integer] :signal_period The number of observations, per period, to calculate the signal line for Moving Average Convergence Divergence (default to 9) # @option opts [String] :price_key The Stock Price field to use when calculating Moving Average Convergence Divergence (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityMovingAverageConvergenceDivergence] def get_security_price_technicals_macd(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_macd_with_http_info(identifier, opts) return data end # Moving Average Convergence Divergence # Moving average convergence divergence (MACD) is a trend-following momentum oscillator that consists of three indicators: (1) a 12 period short-term exponential moving average (EMA) a 26 period long-term EMA and a 9 period EMA signal line. Traders using MACD often look for signal line crossovers, centerline crossovers, and EMA divergences to indicate the momentum and underlying trend of a security`s price. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :fast_period The number of observations, per period, to calculate the fast moving Exponential Moving Average for Moving Average Convergence Divergence # @option opts [Integer] :slow_period The number of observations, per period, to calculate the slow moving Exponential Moving Average for Moving Average Convergence Divergence # @option opts [Integer] :signal_period The number of observations, per period, to calculate the signal line for Moving Average Convergence Divergence # @option opts [String] :price_key The Stock Price field to use when calculating Moving Average Convergence Divergence # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityMovingAverageConvergenceDivergence, Fixnum, Hash)>] ApiResponseSecurityMovingAverageConvergenceDivergence data, response status code and response headers def get_security_price_technicals_macd_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_macd ..." 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 SecurityApi.get_security_price_technicals_macd" end if @api_client.config.client_side_validation && !opts[:'slow_period'].nil? && opts[:'slow_period'] < 3 fail ArgumentError, 'invalid value for "opts[:"slow_period"]" when calling SecurityApi.get_security_price_technicals_macd, must be greater than or equal to 3.' end if @api_client.config.client_side_validation && !opts[:'signal_period'].nil? && opts[:'signal_period'] < 3 fail ArgumentError, 'invalid value for "opts[:"signal_period"]" when calling SecurityApi.get_security_price_technicals_macd, must be greater than or equal to 3.' end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_macd, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/macd".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'fast_period'] = opts[:'fast_period'] if !opts[:'fast_period'].nil? query_params[:'slow_period'] = opts[:'slow_period'] if !opts[:'slow_period'].nil? query_params[:'signal_period'] = opts[:'signal_period'] if !opts[:'signal_period'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecurityMovingAverageConvergenceDivergence') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_macd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Money Flow Index # The Money Flow Index (MFI) is a technical oscillator that incorporates both price and volume, moving between 0 and 100. Traders often consider a MFI above 80 as overbought conditions and below 20 as oversold conditions. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Money Flow Index (default to 14) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityMoneyFlowIndex] def get_security_price_technicals_mfi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_mfi_with_http_info(identifier, opts) return data end # Money Flow Index # The Money Flow Index (MFI) is a technical oscillator that incorporates both price and volume, moving between 0 and 100. Traders often consider a MFI above 80 as overbought conditions and below 20 as oversold conditions. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Money Flow Index # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityMoneyFlowIndex, Fixnum, Hash)>] ApiResponseSecurityMoneyFlowIndex data, response status code and response headers def get_security_price_technicals_mfi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_mfi ..." 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 SecurityApi.get_security_price_technicals_mfi" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 4 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_mfi, must be greater than or equal to 4.' 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 SecurityApi.get_security_price_technicals_mfi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/mfi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityMoneyFlowIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_mfi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Mass Index # The mass index (MI) is a technical indicator used by traders to predict trend reversals. A trend reversal signal is said to occur when the 25-day MI reaches 27.0 and then falls below 26.0. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :ema_period The number of observations, per period, to calculate the single Exponential Moving Average and the Double Exponential Moving Average for Mass Index (default to 9) # @option opts [Integer] :sum_period The number of observations, per period, to calculate the sum of the Exponetinal Moving Average Ratios for Mass Index (default to 25) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityMassIndex] def get_security_price_technicals_mi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_mi_with_http_info(identifier, opts) return data end # Mass Index # The mass index (MI) is a technical indicator used by traders to predict trend reversals. A trend reversal signal is said to occur when the 25-day MI reaches 27.0 and then falls below 26.0. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :ema_period The number of observations, per period, to calculate the single Exponential Moving Average and the Double Exponential Moving Average for Mass Index # @option opts [Integer] :sum_period The number of observations, per period, to calculate the sum of the Exponetinal Moving Average Ratios for Mass Index # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityMassIndex, Fixnum, Hash)>] ApiResponseSecurityMassIndex data, response status code and response headers def get_security_price_technicals_mi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_mi ..." 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 SecurityApi.get_security_price_technicals_mi" end if @api_client.config.client_side_validation && !opts[:'ema_period'].nil? && opts[:'ema_period'] < 2 fail ArgumentError, 'invalid value for "opts[:"ema_period"]" when calling SecurityApi.get_security_price_technicals_mi, must be greater than or equal to 2.' end if @api_client.config.client_side_validation && !opts[:'sum_period'].nil? && opts[:'sum_period'] < 3 fail ArgumentError, 'invalid value for "opts[:"sum_period"]" when calling SecurityApi.get_security_price_technicals_mi, must be greater than or equal to 3.' 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 SecurityApi.get_security_price_technicals_mi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/mi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'ema_period'] = opts[:'ema_period'] if !opts[:'ema_period'].nil? query_params[:'sum_period'] = opts[:'sum_period'] if !opts[:'sum_period'].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[:'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 => 'ApiResponseSecurityMassIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_mi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Negative Volume Index # The negative volume index (NVI) is often referred to as the `smart money indicator.` It works by the assumption that smart money (institutional money) is at work when volume decreases and vice versa when volume increases. NVI starts at 1000 and increases in regard to the percentage price change when volume decreases over a 255-day EMA period. Traders often use this technical indicator when researching broder markets and indices. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityNegativeVolumeIndex] def get_security_price_technicals_nvi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_nvi_with_http_info(identifier, opts) return data end # Negative Volume Index # The negative volume index (NVI) is often referred to as the `smart money indicator.` It works by the assumption that smart money (institutional money) is at work when volume decreases and vice versa when volume increases. NVI starts at 1000 and increases in regard to the percentage price change when volume decreases over a 255-day EMA period. Traders often use this technical indicator when researching broder markets and indices. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityNegativeVolumeIndex, Fixnum, Hash)>] ApiResponseSecurityNegativeVolumeIndex data, response status code and response headers def get_security_price_technicals_nvi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_nvi ..." 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 SecurityApi.get_security_price_technicals_nvi" 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 SecurityApi.get_security_price_technicals_nvi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/nvi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'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 => 'ApiResponseSecurityNegativeVolumeIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_nvi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # On-balance Volume # On-balance volume (OBV) is a leading momentum indicator that uses the increase/decrease flow in volume to predict upcoming stock price changes. When both OBV and a security`s price are making higher highs, it is presumed the upward trend is likely to continue and vice versa. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityOnBalanceVolume] def get_security_price_technicals_obv(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_obv_with_http_info(identifier, opts) return data end # On-balance Volume # On-balance volume (OBV) is a leading momentum indicator that uses the increase/decrease flow in volume to predict upcoming stock price changes. When both OBV and a security`s price are making higher highs, it is presumed the upward trend is likely to continue and vice versa. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityOnBalanceVolume, Fixnum, Hash)>] ApiResponseSecurityOnBalanceVolume data, response status code and response headers def get_security_price_technicals_obv_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_obv ..." 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 SecurityApi.get_security_price_technicals_obv" 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 SecurityApi.get_security_price_technicals_obv, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/obv".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'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 => 'ApiResponseSecurityOnBalanceVolume') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_obv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # On-balance Volume Mean # On-balance volume mean (OBVM) is a leading momentum indicator that uses the increase/decrease flow in volume to predict upcoming stock price changes. The difference between OBV and OBVM is that OBVM takes the mean average of a provided period. When both OBVM and a security`s price are making higher highs, it is presumed the upward trend is likely to continue and vice versa. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate On-balance Volume Mean (default to 10) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityOnBalanceVolumeMean] def get_security_price_technicals_obv_mean(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_obv_mean_with_http_info(identifier, opts) return data end # On-balance Volume Mean # On-balance volume mean (OBVM) is a leading momentum indicator that uses the increase/decrease flow in volume to predict upcoming stock price changes. The difference between OBV and OBVM is that OBVM takes the mean average of a provided period. When both OBVM and a security`s price are making higher highs, it is presumed the upward trend is likely to continue and vice versa. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate On-balance Volume Mean # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityOnBalanceVolumeMean, Fixnum, Hash)>] ApiResponseSecurityOnBalanceVolumeMean data, response status code and response headers def get_security_price_technicals_obv_mean_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_obv_mean ..." 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 SecurityApi.get_security_price_technicals_obv_mean" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 4 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_obv_mean, must be greater than or equal to 4.' 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 SecurityApi.get_security_price_technicals_obv_mean, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/obv_mean".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityOnBalanceVolumeMean') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_obv_mean\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Relative Strength Index # Relative strength index (RSI) is a momentum oscillator that ranges between 0 and 100. Traders believe that an RSI value over 70 indicates that a security is overbought and an RSI under 30 indicates that a security is oversold. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Relative Strength Index (default to 14) # @option opts [String] :price_key The Stock Price field to use when calculating Relative Strength Index (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityRelativeStrengthIndex] def get_security_price_technicals_rsi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_rsi_with_http_info(identifier, opts) return data end # Relative Strength Index # Relative strength index (RSI) is a momentum oscillator that ranges between 0 and 100. Traders believe that an RSI value over 70 indicates that a security is overbought and an RSI under 30 indicates that a security is oversold. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Relative Strength Index # @option opts [String] :price_key The Stock Price field to use when calculating Relative Strength Index # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityRelativeStrengthIndex, Fixnum, Hash)>] ApiResponseSecurityRelativeStrengthIndex data, response status code and response headers def get_security_price_technicals_rsi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_rsi ..." 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 SecurityApi.get_security_price_technicals_rsi" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 4 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_rsi, must be greater than or equal to 4.' end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_rsi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/rsi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecurityRelativeStrengthIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_rsi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Simple Moving Average # A simple moving average (SMA) adds recent prices for a specified period and divides the total by that same number of periods. SMA is typically used to indicate whether a security is in an uptrend or downtrend and can also be combined with a long-term moving average to improve the signal`s abilities. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Simple Moving Average (default to 20) # @option opts [String] :price_key The Stock Price field to use when calculating Simple Moving Average (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecuritySimpleMovingAverage] def get_security_price_technicals_sma(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_sma_with_http_info(identifier, opts) return data end # Simple Moving Average # A simple moving average (SMA) adds recent prices for a specified period and divides the total by that same number of periods. SMA is typically used to indicate whether a security is in an uptrend or downtrend and can also be combined with a long-term moving average to improve the signal`s abilities. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Simple Moving Average # @option opts [String] :price_key The Stock Price field to use when calculating Simple Moving Average # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecuritySimpleMovingAverage, Fixnum, Hash)>] ApiResponseSecuritySimpleMovingAverage data, response status code and response headers def get_security_price_technicals_sma_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_sma ..." 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 SecurityApi.get_security_price_technicals_sma" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_sma, must be greater than or equal to 5.' end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_sma, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/sma".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecuritySimpleMovingAverage') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_sma\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Stochastic Oscillator # The Stochastic Oscillator (SO) is a range-bound momentum indicator that ranges from 0 to 100 and follows the velocity of the momentum itself, not the underlying price or volume. When SO is above 80 it indicates that a security is trading at the high end of its period`s high-low range and vice versa if the reading is below 20. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate %K of Stochastic Oscillator (default to 14) # @option opts [Integer] :signal_period The number of observations, per period, to calculate the %D (the Simple Moving Average of %K) as a signal line for Stochastic Oscillator (default to 3) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityStochasticOscillator] def get_security_price_technicals_sr(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_sr_with_http_info(identifier, opts) return data end # Stochastic Oscillator # The Stochastic Oscillator (SO) is a range-bound momentum indicator that ranges from 0 to 100 and follows the velocity of the momentum itself, not the underlying price or volume. When SO is above 80 it indicates that a security is trading at the high end of its period`s high-low range and vice versa if the reading is below 20. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate %K of Stochastic Oscillator # @option opts [Integer] :signal_period The number of observations, per period, to calculate the %D (the Simple Moving Average of %K) as a signal line for Stochastic Oscillator # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityStochasticOscillator, Fixnum, Hash)>] ApiResponseSecurityStochasticOscillator data, response status code and response headers def get_security_price_technicals_sr_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_sr ..." 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 SecurityApi.get_security_price_technicals_sr" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 3 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_sr, must be greater than or equal to 3.' end if @api_client.config.client_side_validation && !opts[:'signal_period'].nil? && opts[:'signal_period'] < 3 fail ArgumentError, 'invalid value for "opts[:"signal_period"]" when calling SecurityApi.get_security_price_technicals_sr, must be greater than or equal to 3.' 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 SecurityApi.get_security_price_technicals_sr, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/sr".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil? query_params[:'signal_period'] = opts[:'signal_period'] if !opts[:'signal_period'].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[:'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 => 'ApiResponseSecurityStochasticOscillator') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_sr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Triple Exponential Average # The Triple Exponential Average (TEA) is a momentum indicator used to identify when a security is oversold and overbought. By exponentially smoothing out the underlying security`s moving average, the TEA filters out insignificant price movements. A positive TEA is often believed to indicate momentum is increasing and a negative TEA indicates that momentum is decreasing. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Exponential Moving Average for Triple Exponential Average (default to 15) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityTripleExponentialAverage] def get_security_price_technicals_trix(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_trix_with_http_info(identifier, opts) return data end # Triple Exponential Average # The Triple Exponential Average (TEA) is a momentum indicator used to identify when a security is oversold and overbought. By exponentially smoothing out the underlying security`s moving average, the TEA filters out insignificant price movements. A positive TEA is often believed to indicate momentum is increasing and a negative TEA indicates that momentum is decreasing. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Exponential Moving Average for Triple Exponential Average # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityTripleExponentialAverage, Fixnum, Hash)>] ApiResponseSecurityTripleExponentialAverage data, response status code and response headers def get_security_price_technicals_trix_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_trix ..." 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 SecurityApi.get_security_price_technicals_trix" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 2 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_trix, must be greater than or equal to 2.' 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 SecurityApi.get_security_price_technicals_trix, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/trix".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityTripleExponentialAverage') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_trix\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # True Strength Index # The True Strength Index (TSI) is a momentum oscillator used to identify building trends and trend reversals, typically by signalling overbought and oversold conditions. TSI fluctuates between positive and negative values, and traders typically combine its signal with other momentum oscillators to increase its strength. When TSI crosses the signal line into positive territory it is presumed to be an entrance opportunity and vice versa when the TSI crosses into negative territory. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :low_period The number of observations, per period, to calculate low period Exponential Moving Average for smoothing in True Strength Index (default to 13) # @option opts [Integer] :high_period The number of observations, per period, to calculate high period Exponential Moving Average for smoothing in True Strength Index (default to 25) # @option opts [String] :price_key The Stock Price field to use when calculating True Strength Index (default to close) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityTrueStrengthIndex] def get_security_price_technicals_tsi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_tsi_with_http_info(identifier, opts) return data end # True Strength Index # The True Strength Index (TSI) is a momentum oscillator used to identify building trends and trend reversals, typically by signalling overbought and oversold conditions. TSI fluctuates between positive and negative values, and traders typically combine its signal with other momentum oscillators to increase its strength. When TSI crosses the signal line into positive territory it is presumed to be an entrance opportunity and vice versa when the TSI crosses into negative territory. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :low_period The number of observations, per period, to calculate low period Exponential Moving Average for smoothing in True Strength Index # @option opts [Integer] :high_period The number of observations, per period, to calculate high period Exponential Moving Average for smoothing in True Strength Index # @option opts [String] :price_key The Stock Price field to use when calculating True Strength Index # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityTrueStrengthIndex, Fixnum, Hash)>] ApiResponseSecurityTrueStrengthIndex data, response status code and response headers def get_security_price_technicals_tsi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_tsi ..." 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 SecurityApi.get_security_price_technicals_tsi" end if @api_client.config.client_side_validation && !opts[:'low_period'].nil? && opts[:'low_period'] < 3 fail ArgumentError, 'invalid value for "opts[:"low_period"]" when calling SecurityApi.get_security_price_technicals_tsi, must be greater than or equal to 3.' end if @api_client.config.client_side_validation && !opts[:'high_period'].nil? && opts[:'high_period'] < 3 fail ArgumentError, 'invalid value for "opts[:"high_period"]" when calling SecurityApi.get_security_price_technicals_tsi, must be greater than or equal to 3.' end if @api_client.config.client_side_validation && opts[:'price_key'] && !['open', 'high', 'low', 'close', 'volume'].include?(opts[:'price_key']) fail ArgumentError, 'invalid value for "price_key", must be one of open, high, low, close, volume' 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 SecurityApi.get_security_price_technicals_tsi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/tsi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'low_period'] = opts[:'low_period'] if !opts[:'low_period'].nil? query_params[:'high_period'] = opts[:'high_period'] if !opts[:'high_period'].nil? query_params[:'price_key'] = opts[:'price_key'] if !opts[:'price_key'].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[:'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 => 'ApiResponseSecurityTrueStrengthIndex') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_tsi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Ultimate Oscillator # The Ultimate Oscillator (UO) is a range bound technical indicator that moves between 0 and 100 and is calculated with 3 timeframes, typically 7, 14, and 28 day periods. When UO`s value is above 70 a security is categorized as overbought and when UO`s value is below 30 a security is categorized as oversold. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :short_period The number of observations, per period, to calculate the short period for Ultimate Oscillator (default to 7) # @option opts [Integer] :medium_period The number of observations, per period, to calculate the medium period for Ultimate Oscillator (default to 14) # @option opts [Integer] :long_period The number of observations, per period, to calculate the long period for Ultimate Oscillator (default to 28) # @option opts [Float] :short_weight The weight of short Buying Pressure average for Ultimate Oscillator (default to 4.0) # @option opts [Float] :medium_weight The weight of medium Buying Pressure average for Ultimate Oscillator (default to 2.0) # @option opts [Float] :long_weight The weight of long Buying Pressure average for Ultimate Oscillator (default to 1.0) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityUltimateOscillator] def get_security_price_technicals_uo(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_uo_with_http_info(identifier, opts) return data end # Ultimate Oscillator # The Ultimate Oscillator (UO) is a range bound technical indicator that moves between 0 and 100 and is calculated with 3 timeframes, typically 7, 14, and 28 day periods. When UO`s value is above 70 a security is categorized as overbought and when UO`s value is below 30 a security is categorized as oversold. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :short_period The number of observations, per period, to calculate the short period for Ultimate Oscillator # @option opts [Integer] :medium_period The number of observations, per period, to calculate the medium period for Ultimate Oscillator # @option opts [Integer] :long_period The number of observations, per period, to calculate the long period for Ultimate Oscillator # @option opts [Float] :short_weight The weight of short Buying Pressure average for Ultimate Oscillator # @option opts [Float] :medium_weight The weight of medium Buying Pressure average for Ultimate Oscillator # @option opts [Float] :long_weight The weight of long Buying Pressure average for Ultimate Oscillator # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityUltimateOscillator, Fixnum, Hash)>] ApiResponseSecurityUltimateOscillator data, response status code and response headers def get_security_price_technicals_uo_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_uo ..." 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 SecurityApi.get_security_price_technicals_uo" end if @api_client.config.client_side_validation && !opts[:'long_period'].nil? && opts[:'long_period'] < 4 fail ArgumentError, 'invalid value for "opts[:"long_period"]" when calling SecurityApi.get_security_price_technicals_uo, must be greater than or equal to 4.' 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 SecurityApi.get_security_price_technicals_uo, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/uo".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'short_period'] = opts[:'short_period'] if !opts[:'short_period'].nil? query_params[:'medium_period'] = opts[:'medium_period'] if !opts[:'medium_period'].nil? query_params[:'long_period'] = opts[:'long_period'] if !opts[:'long_period'].nil? query_params[:'short_weight'] = opts[:'short_weight'] if !opts[:'short_weight'].nil? query_params[:'medium_weight'] = opts[:'medium_weight'] if !opts[:'medium_weight'].nil? query_params[:'long_weight'] = opts[:'long_weight'] if !opts[:'long_weight'].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[:'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 => 'ApiResponseSecurityUltimateOscillator') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_uo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Vortex Indicator # The Vortex Indicator (VI) is composed of an uptrend line (VI+) and a downtrend line (VI-). When VI+ crosses VI- from below it typically indicates an entry into a given security. When VI- crosses VI+ from below it typically triggers an exit and that the current trend is reversing course. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Vortex Indicator (default to 14) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityVortexIndicator] def get_security_price_technicals_vi(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_vi_with_http_info(identifier, opts) return data end # Vortex Indicator # The Vortex Indicator (VI) is composed of an uptrend line (VI+) and a downtrend line (VI-). When VI+ crosses VI- from below it typically indicates an entry into a given security. When VI- crosses VI+ from below it typically triggers an exit and that the current trend is reversing course. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to calculate Vortex Indicator # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityVortexIndicator, Fixnum, Hash)>] ApiResponseSecurityVortexIndicator data, response status code and response headers def get_security_price_technicals_vi_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_vi ..." 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 SecurityApi.get_security_price_technicals_vi" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 4 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_vi, must be greater than or equal to 4.' 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 SecurityApi.get_security_price_technicals_vi, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/vi".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityVortexIndicator') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_vi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Volume-price Trend # The volume price trend (VPT) is a technical indicator that uses price & volume to determine whether a trend is established. Typically, when a security is trending upwards, there is more volume on positive days than negative ones, and as a result VPT should be increasing on these days as well. However, if VPT fails to increase past its previous high during an outbreak, this is suggested to indicate the rally is losing strength. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityVolumePriceTrend] def get_security_price_technicals_vpt(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_vpt_with_http_info(identifier, opts) return data end # Volume-price Trend # The volume price trend (VPT) is a technical indicator that uses price & volume to determine whether a trend is established. Typically, when a security is trending upwards, there is more volume on positive days than negative ones, and as a result VPT should be increasing on these days as well. However, if VPT fails to increase past its previous high during an outbreak, this is suggested to indicate the rally is losing strength. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityVolumePriceTrend, Fixnum, Hash)>] ApiResponseSecurityVolumePriceTrend data, response status code and response headers def get_security_price_technicals_vpt_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_vpt ..." 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 SecurityApi.get_security_price_technicals_vpt" 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 SecurityApi.get_security_price_technicals_vpt, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/vpt".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'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 => 'ApiResponseSecurityVolumePriceTrend') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_vpt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Volume Weighted Average Price # Volume Weighted Average Price (VWAP) is a lagging technical indicator that is used in combination with a security`s price. When the underlying price rises above its VWAP, it is often interpreted as a bullish signal, and vice versa in the opposite direction. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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 [ApiResponseSecurityVolumeWeightedAveragePrice] def get_security_price_technicals_vwap(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_vwap_with_http_info(identifier, opts) return data end # Volume Weighted Average Price # Volume Weighted Average Price (VWAP) is a lagging technical indicator that is used in combination with a security`s price. When the underlying price rises above its VWAP, it is often interpreted as a bullish signal, and vice versa in the opposite direction. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @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<(ApiResponseSecurityVolumeWeightedAveragePrice, Fixnum, Hash)>] ApiResponseSecurityVolumeWeightedAveragePrice data, response status code and response headers def get_security_price_technicals_vwap_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_vwap ..." 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 SecurityApi.get_security_price_technicals_vwap" 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 SecurityApi.get_security_price_technicals_vwap, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/vwap".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'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 => 'ApiResponseSecurityVolumeWeightedAveragePrice') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_vwap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Williams %R # Williams %R is a momentum indicator used to determine overbought and oversold environments for a security and fluctuates between 0 and -100. When Williams %R is above -20 the security is considered to be overbought and when Williams %R is under -80 the security is considered to be oversold. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to look-back when calculating Williams %R (default to 14) # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @option opts [Float] :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 [ApiResponseSecurityWilliamsR] def get_security_price_technicals_wr(identifier, opts = {}) data, _status_code, _headers = get_security_price_technicals_wr_with_http_info(identifier, opts) return data end # Williams %R # Williams %R is a momentum indicator used to determine overbought and oversold environments for a security and fluctuates between 0 and -100. When Williams %R is above -20 the security is considered to be overbought and when Williams %R is under -80 the security is considered to be oversold. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Integer] :period The number of observations, per period, to look-back when calculating Williams %R # @option opts [String] :start_date Return technical indicator values on or after the date # @option opts [String] :end_date Return technical indicator values on or before the date # @option opts [Float] :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<(ApiResponseSecurityWilliamsR, Fixnum, Hash)>] ApiResponseSecurityWilliamsR data, response status code and response headers def get_security_price_technicals_wr_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_price_technicals_wr ..." 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 SecurityApi.get_security_price_technicals_wr" end if @api_client.config.client_side_validation && !opts[:'period'].nil? && opts[:'period'] < 5 fail ArgumentError, 'invalid value for "opts[:"period"]" when calling SecurityApi.get_security_price_technicals_wr, must be greater than or equal to 5.' 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 SecurityApi.get_security_price_technicals_wr, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/technicals/wr".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'period'] = opts[:'period'] if !opts[:'period'].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[:'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 => 'ApiResponseSecurityWilliamsR') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_price_technicals_wr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Quote for a Security # Returns many popular metrics for a security from multiple products conveniently in one API. Realtime stock price data requires at least one realtime product subscription (IEX, NASDAQ Basic, and/or Delayed SIP). If you are subscribed to multiple realtime stock price products, the api will return the most recent realtime stock price. Previous close price and percent change fields require both an EoD US Stock Price subscription and a realtime stock price subscription. Market_cap, price_to_earnings, and dividendyield data fields require a fundamentals subscription. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :active_only Whether to return only realtime prices from today. (default to false) # @option opts [String] :source Return the realtime price from the specified source instead of the most recent. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [ApiResponseSecurityQuote] def get_security_quote(identifier, opts = {}) data, _status_code, _headers = get_security_quote_with_http_info(identifier, opts) return data end # Quote for a Security # Returns many popular metrics for a security from multiple products conveniently in one API. Realtime stock price data requires at least one realtime product subscription (IEX, NASDAQ Basic, and/or Delayed SIP). If you are subscribed to multiple realtime stock price products, the api will return the most recent realtime stock price. Previous close price and percent change fields require both an EoD US Stock Price subscription and a realtime stock price subscription. Market_cap, price_to_earnings, and dividendyield data fields require a fundamentals subscription. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :active_only Whether to return only realtime prices from today. # @option opts [String] :source Return the realtime price from the specified source instead of the most recent. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(ApiResponseSecurityQuote, Fixnum, Hash)>] ApiResponseSecurityQuote data, response status code and response headers def get_security_quote_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_quote ..." 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 SecurityApi.get_security_quote" end if @api_client.config.client_side_validation && opts[:'source'] && !['iex', 'bats_delayed', 'utp_delayed', 'cta_a_delayed', 'cta_b_delayed', 'otc_delayed', 'delayed_sip', 'nasdaq_basic', 'intrinio_mx', 'intrinio_mx_plus'].include?(opts[:'source']) fail ArgumentError, 'invalid value for "source", must be one of iex, bats_delayed, utp_delayed, cta_a_delayed, cta_b_delayed, otc_delayed, delayed_sip, nasdaq_basic, intrinio_mx, intrinio_mx_plus' end # resource path local_var_path = "/securities/{identifier}/quote".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'active_only'] = opts[:'active_only'] if !opts[:'active_only'].nil? query_params[:'source'] = opts[:'source'] if !opts[:'source'].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 => 'ApiResponseSecurityQuote') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Realtime Stock Price for Security # Return the realtime stock price for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Array] :source Return the realtime price from the specified comma-delimited data sources. If no source is specified, the best source available is used. # @return [RealtimeStockPrice] def get_security_realtime_price(identifier, opts = {}) data, _status_code, _headers = get_security_realtime_price_with_http_info(identifier, opts) return data end # Realtime Stock Price for Security # Return the realtime stock price for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Array] :source Return the realtime price from the specified comma-delimited data sources. If no source is specified, the best source available is used. # @return [Array<(RealtimeStockPrice, Fixnum, Hash)>] RealtimeStockPrice data, response status code and response headers def get_security_realtime_price_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_realtime_price ..." 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 SecurityApi.get_security_realtime_price" end if @api_client.config.client_side_validation && opts[:'source'] && !opts[:'source'].all?{|item| ['iex', 'bats_delayed', 'utp_delayed', 'cta_a_delayed', 'cta_b_delayed', 'otc_delayed', 'delayed_sip', 'nasdaq_basic', 'intrinio_mx', 'intrinio_mx_plus'].include?(item)} fail ArgumentError, 'invalid value for "source", must include one of iex, bats_delayed, utp_delayed, cta_a_delayed, cta_b_delayed, otc_delayed, delayed_sip, nasdaq_basic, intrinio_mx, intrinio_mx_plus' end # resource path local_var_path = "/securities/{identifier}/prices/realtime".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'source'] = @api_client.build_collection_param(opts[:'source'], :csv) if !opts[:'source'].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 => 'RealtimeStockPrice') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_realtime_price\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security Replay File # Returns a url where the requested replay file may be downloaded from. # @param subsource The specific source of the data being requested. # @param date The date for the data being requested. # @param [Hash] opts the optional parameters # @return [SecurityReplayFileResult] def get_security_replay_file(subsource, date, opts = {}) data, _status_code, _headers = get_security_replay_file_with_http_info(subsource, date, opts) return data end # Security Replay File # Returns a url where the requested replay file may be downloaded from. # @param subsource The specific source of the data being requested. # @param date The date for the data being requested. # @param [Hash] opts the optional parameters # @return [Array<(SecurityReplayFileResult, Fixnum, Hash)>] SecurityReplayFileResult data, response status code and response headers def get_security_replay_file_with_http_info(subsource, date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_replay_file ..." end # verify the required parameter 'subsource' is set if @api_client.config.client_side_validation && subsource.nil? fail ArgumentError, "Missing the required parameter 'subsource' when calling SecurityApi.get_security_replay_file" end # verify enum value if @api_client.config.client_side_validation && !['iex', 'utp_delayed', 'cta_a_delayed', 'cta_b_delayed', 'otc_delayed', 'nasdaq_basic'].include?(subsource) fail ArgumentError, "invalid value for 'subsource', must be one of iex, utp_delayed, cta_a_delayed, cta_b_delayed, otc_delayed, nasdaq_basic" end # verify the required parameter 'date' is set if @api_client.config.client_side_validation && date.nil? fail ArgumentError, "Missing the required parameter 'date' when calling SecurityApi.get_security_replay_file" end # resource path local_var_path = "/securities/replay" # query parameters query_params = {} query_params[:'subsource'] = subsource query_params[:'date'] = date # 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 => 'SecurityReplayFileResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_replay_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Realtime Stock Prices Snapshot # Returns all security snapshots for the queried interval with links to download. # @param [Hash] opts the optional parameters # @option opts [DateTime] :at_datetime The UTC date and time (with url-encoded spaces) the snapshot will cover. # @return [SecuritySnapshotsResult] def get_security_snapshots(opts = {}) data, _status_code, _headers = get_security_snapshots_with_http_info(opts) return data end # Realtime Stock Prices Snapshot # Returns all security snapshots for the queried interval with links to download. # @param [Hash] opts the optional parameters # @option opts [DateTime] :at_datetime The UTC date and time (with url-encoded spaces) the snapshot will cover. # @return [Array<(SecuritySnapshotsResult, Fixnum, Hash)>] SecuritySnapshotsResult data, response status code and response headers def get_security_snapshots_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_snapshots ..." end # resource path local_var_path = "/securities/snapshots" # query parameters query_params = {} query_params[:'at_datetime'] = opts[:'at_datetime'] if !opts[:'at_datetime'].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 => 'SecuritySnapshotsResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_snapshots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Stock Price Adjustments by Security # Returns stock price adjustments for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Date] :start_date Return price adjustments on or after the date # @option opts [Date] :end_date Return price adjustments on or before the date # @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 [ApiResponseSecurityStockPriceAdjustments] def get_security_stock_price_adjustments(identifier, opts = {}) data, _status_code, _headers = get_security_stock_price_adjustments_with_http_info(identifier, opts) return data end # Stock Price Adjustments by Security # Returns stock price adjustments for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Date] :start_date Return price adjustments on or after the date # @option opts [Date] :end_date Return price adjustments on or before the date # @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<(ApiResponseSecurityStockPriceAdjustments, Fixnum, Hash)>] ApiResponseSecurityStockPriceAdjustments data, response status code and response headers def get_security_stock_price_adjustments_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_stock_price_adjustments ..." 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 SecurityApi.get_security_stock_price_adjustments" 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 SecurityApi.get_security_stock_price_adjustments, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices/adjustments".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'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 => 'ApiResponseSecurityStockPriceAdjustments') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_stock_price_adjustments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Stock Prices by Security # Return end-of-day stock prices for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Date] :start_date Return prices on or after the date # @option opts [Date] :end_date Return prices on or before the date # @option opts [String] :frequency Return stock prices in the given frequency (default to daily) # @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 [ApiResponseSecurityStockPrices] def get_security_stock_prices(identifier, opts = {}) data, _status_code, _headers = get_security_stock_prices_with_http_info(identifier, opts) return data end # Stock Prices by Security # Return end-of-day stock prices for the Security with the given `identifier` # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [Date] :start_date Return prices on or after the date # @option opts [Date] :end_date Return prices on or before the date # @option opts [String] :frequency Return stock prices in the given frequency # @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<(ApiResponseSecurityStockPrices, Fixnum, Hash)>] ApiResponseSecurityStockPrices data, response status code and response headers def get_security_stock_prices_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_stock_prices ..." 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 SecurityApi.get_security_stock_prices" end if @api_client.config.client_side_validation && opts[:'frequency'] && !['daily', 'weekly', 'monthly', 'quarterly', 'yearly'].include?(opts[:'frequency']) fail ArgumentError, 'invalid value for "frequency", must be one of daily, weekly, monthly, quarterly, yearly' 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 SecurityApi.get_security_stock_prices, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/prices".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'frequency'] = opts[:'frequency'] if !opts[:'frequency'].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 => 'ApiResponseSecurityStockPrices') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_stock_prices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security Trades # Returns all trades between start time and end time, up to seven days ago for the specified source. # @param source The specific source of the data being requested. # @param [Hash] opts the optional parameters # @option opts [Date] :start_date The start date for the data being requested. # @option opts [String] :start_time The start time for the data being requested. # @option opts [Date] :end_date The end date for the data being requested. # @option opts [String] :end_time The end time for the data being requested. # @option opts [String] :timezone The timezone the start and end date/times use. (default to UTC) # @option opts [Integer] :page_size The maximum number of results to return per page. (default to 100) # @option opts [BOOLEAN] :darkpool_only Set to true to show only darkpool trades (default to false) # @option opts [Integer] :min_size Trades must be larger or equal to this size. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [SecurityTradesResult] def get_security_trades(source, opts = {}) data, _status_code, _headers = get_security_trades_with_http_info(source, opts) return data end # Security Trades # Returns all trades between start time and end time, up to seven days ago for the specified source. # @param source The specific source of the data being requested. # @param [Hash] opts the optional parameters # @option opts [Date] :start_date The start date for the data being requested. # @option opts [String] :start_time The start time for the data being requested. # @option opts [Date] :end_date The end date for the data being requested. # @option opts [String] :end_time The end time for the data being requested. # @option opts [String] :timezone The timezone the start and end date/times use. # @option opts [Integer] :page_size The maximum number of results to return per page. # @option opts [BOOLEAN] :darkpool_only Set to true to show only darkpool trades # @option opts [Integer] :min_size Trades must be larger or equal to this size. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(SecurityTradesResult, Fixnum, Hash)>] SecurityTradesResult data, response status code and response headers def get_security_trades_with_http_info(source, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_trades ..." end # verify the required parameter 'source' is set if @api_client.config.client_side_validation && source.nil? fail ArgumentError, "Missing the required parameter 'source' when calling SecurityApi.get_security_trades" end # verify enum value if @api_client.config.client_side_validation && !['nasdaq_basic', 'iex', 'cta_a_delayed', 'cta_b_delayed', 'utp_delayed', 'otc_delayed'].include?(source) fail ArgumentError, "invalid value for 'source', must be one of nasdaq_basic, iex, cta_a_delayed, cta_b_delayed, utp_delayed, otc_delayed" end if @api_client.config.client_side_validation && opts[:'timezone'] && !['Africa/Algiers', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Monrovia', 'Africa/Nairobi', 'America/Argentina/Buenos_Aires', 'America/Bogota', 'America/Caracas', 'America/Chicago', 'America/Chihuahua', 'America/Denver', 'America/Godthab', 'America/Guatemala', 'America/Guyana', 'America/Halifax', 'America/Indiana/Indianapolis', 'America/Juneau', 'America/La_Paz', 'America/Lima', 'America/Lima', 'America/Los_Angeles', 'America/Mazatlan', 'America/Mexico_City', 'America/Mexico_City', 'America/Monterrey', 'America/Montevideo', 'America/New_York', 'America/Phoenix', 'America/Regina', 'America/Santiago', 'America/Sao_Paulo', 'America/St_Johns', 'America/Tijuana', 'Asia/Almaty', 'Asia/Baghdad', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Bangkok', 'Asia/Chongqing', 'Asia/Colombo', 'Asia/Dhaka', 'Asia/Dhaka', 'Asia/Hong_Kong', 'Asia/Irkutsk', 'Asia/Jakarta', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Karachi', 'Asia/Kathmandu', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuwait', 'Asia/Magadan', 'Asia/Muscat', 'Asia/Muscat', 'Asia/Novosibirsk', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Ulaanbaatar', 'Asia/Urumqi', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Cape_Verde', 'Atlantic/South_Georgia', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Darwin', 'Australia/Hobart', 'Australia/Melbourne', 'Australia/Melbourne', 'Australia/Perth', 'Australia/Sydney', 'Etc/UTC', 'UTC', 'Europe/Amsterdam', 'Europe/Athens', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Helsinki', 'Europe/Istanbul', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/London', 'Europe/Madrid', 'Europe/Minsk', 'Europe/Moscow', 'Europe/Moscow', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/Sarajevo', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Majuro', 'Pacific/Midway', 'Pacific/Midway', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Port_Moresby', 'Pacific/Tongatapu'].include?(opts[:'timezone']) fail ArgumentError, 'invalid value for "timezone", must be one of Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Godthab, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Tokyo, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Melbourne, Australia/Perth, Australia/Sydney, Etc/UTC, UTC, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kiev, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Pacific/Apia, Pacific/Auckland, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu' 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 SecurityApi.get_security_trades, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/trades" # query parameters query_params = {} query_params[:'source'] = source query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'timezone'] = opts[:'timezone'] if !opts[:'timezone'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'darkpool_only'] = opts[:'darkpool_only'] if !opts[:'darkpool_only'].nil? query_params[:'min_size'] = opts[:'min_size'] if !opts[:'min_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 => 'SecurityTradesResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_trades\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Security Trades By Symbol # Returns all trades for a symbol between start time and end time, up to seven days ago for the specified source. # @param identifier The ticker symbol for which trades are being requested. # @param source The specific source of the data being requested. Specifying delayed sip will result in the system automatically determining which delayed sip source (cta_delayed, cta_b_delayed, utp_delayed, otc_delayed) to use. # @param [Hash] opts the optional parameters # @option opts [Date] :start_date The start date for the data being requested. # @option opts [String] :start_time The start time for the data being requested. # @option opts [Date] :end_date The end date for the data being requested. # @option opts [String] :end_time The end time for the data being requested. # @option opts [String] :timezone The timezone the start and end date/times use. (default to UTC) # @option opts [BOOLEAN] :darkpool_only Set to true to show only darkpool trades (default to false) # @option opts [Integer] :page_size The maximum number of results to return per page. (default to 100) # @option opts [Integer] :min_size Trades must be larger or equal to this size. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [SecurityTradesResult] def get_security_trades_by_symbol(identifier, source, opts = {}) data, _status_code, _headers = get_security_trades_by_symbol_with_http_info(identifier, source, opts) return data end # Security Trades By Symbol # Returns all trades for a symbol between start time and end time, up to seven days ago for the specified source. # @param identifier The ticker symbol for which trades are being requested. # @param source The specific source of the data being requested. Specifying delayed sip will result in the system automatically determining which delayed sip source (cta_delayed, cta_b_delayed, utp_delayed, otc_delayed) to use. # @param [Hash] opts the optional parameters # @option opts [Date] :start_date The start date for the data being requested. # @option opts [String] :start_time The start time for the data being requested. # @option opts [Date] :end_date The end date for the data being requested. # @option opts [String] :end_time The end time for the data being requested. # @option opts [String] :timezone The timezone the start and end date/times use. # @option opts [BOOLEAN] :darkpool_only Set to true to show only darkpool trades # @option opts [Integer] :page_size The maximum number of results to return per page. # @option opts [Integer] :min_size Trades must be larger or equal to this size. # @option opts [String] :next_page Gets the next page of data from a previous API call # @return [Array<(SecurityTradesResult, Fixnum, Hash)>] SecurityTradesResult data, response status code and response headers def get_security_trades_by_symbol_with_http_info(identifier, source, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_trades_by_symbol ..." 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 SecurityApi.get_security_trades_by_symbol" end # verify the required parameter 'source' is set if @api_client.config.client_side_validation && source.nil? fail ArgumentError, "Missing the required parameter 'source' when calling SecurityApi.get_security_trades_by_symbol" end # verify enum value if @api_client.config.client_side_validation && !['nasdaq_basic', 'delayed_sip', 'iex', 'cta_a_delayed', 'cta_b_delayed', 'utp_delayed', 'otc_delayed'].include?(source) fail ArgumentError, "invalid value for 'source', must be one of nasdaq_basic, delayed_sip, iex, cta_a_delayed, cta_b_delayed, utp_delayed, otc_delayed" end if @api_client.config.client_side_validation && opts[:'timezone'] && !['Africa/Algiers', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Monrovia', 'Africa/Nairobi', 'America/Argentina/Buenos_Aires', 'America/Bogota', 'America/Caracas', 'America/Chicago', 'America/Chihuahua', 'America/Denver', 'America/Godthab', 'America/Guatemala', 'America/Guyana', 'America/Halifax', 'America/Indiana/Indianapolis', 'America/Juneau', 'America/La_Paz', 'America/Lima', 'America/Lima', 'America/Los_Angeles', 'America/Mazatlan', 'America/Mexico_City', 'America/Mexico_City', 'America/Monterrey', 'America/Montevideo', 'America/New_York', 'America/Phoenix', 'America/Regina', 'America/Santiago', 'America/Sao_Paulo', 'America/St_Johns', 'America/Tijuana', 'Asia/Almaty', 'Asia/Baghdad', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Bangkok', 'Asia/Chongqing', 'Asia/Colombo', 'Asia/Dhaka', 'Asia/Dhaka', 'Asia/Hong_Kong', 'Asia/Irkutsk', 'Asia/Jakarta', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Karachi', 'Asia/Kathmandu', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuwait', 'Asia/Magadan', 'Asia/Muscat', 'Asia/Muscat', 'Asia/Novosibirsk', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Ulaanbaatar', 'Asia/Urumqi', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Cape_Verde', 'Atlantic/South_Georgia', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Darwin', 'Australia/Hobart', 'Australia/Melbourne', 'Australia/Melbourne', 'Australia/Perth', 'Australia/Sydney', 'Etc/UTC', 'UTC', 'Europe/Amsterdam', 'Europe/Athens', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Helsinki', 'Europe/Istanbul', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/London', 'Europe/Madrid', 'Europe/Minsk', 'Europe/Moscow', 'Europe/Moscow', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/Sarajevo', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Majuro', 'Pacific/Midway', 'Pacific/Midway', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Port_Moresby', 'Pacific/Tongatapu'].include?(opts[:'timezone']) fail ArgumentError, 'invalid value for "timezone", must be one of Africa/Algiers, Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Johannesburg, Africa/Monrovia, Africa/Nairobi, America/Argentina/Buenos_Aires, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Denver, America/Godthab, America/Guatemala, America/Guyana, America/Halifax, America/Indiana/Indianapolis, America/Juneau, America/La_Paz, America/Lima, America/Lima, America/Los_Angeles, America/Mazatlan, America/Mexico_City, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Regina, America/Santiago, America/Sao_Paulo, America/St_Johns, America/Tijuana, Asia/Almaty, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Bangkok, Asia/Chongqing, Asia/Colombo, Asia/Dhaka, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Kamchatka, Asia/Karachi, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Kuala_Lumpur, Asia/Kuwait, Asia/Magadan, Asia/Muscat, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Srednekolymsk, Asia/Taipei, Asia/Tashkent, Asia/Tbilisi, Asia/Tehran, Asia/Tokyo, Asia/Tokyo, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Urumqi, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg, Asia/Yerevan, Atlantic/Azores, Atlantic/Cape_Verde, Atlantic/South_Georgia, Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Hobart, Australia/Melbourne, Australia/Melbourne, Australia/Perth, Australia/Sydney, Etc/UTC, UTC, Europe/Amsterdam, Europe/Athens, Europe/Belgrade, Europe/Berlin, Europe/Berlin, Europe/Bratislava, Europe/Brussels, Europe/Bucharest, Europe/Budapest, Europe/Copenhagen, Europe/Dublin, Europe/Helsinki, Europe/Istanbul, Europe/Kaliningrad, Europe/Kiev, Europe/Lisbon, Europe/Ljubljana, Europe/London, Europe/London, Europe/Madrid, Europe/Minsk, Europe/Moscow, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Riga, Europe/Rome, Europe/Samara, Europe/Sarajevo, Europe/Skopje, Europe/Sofia, Europe/Stockholm, Europe/Tallinn, Europe/Vienna, Europe/Vilnius, Europe/Volgograd, Europe/Warsaw, Europe/Zagreb, Pacific/Apia, Pacific/Auckland, Pacific/Auckland, Pacific/Chatham, Pacific/Fakaofo, Pacific/Fiji, Pacific/Guadalcanal, Pacific/Guam, Pacific/Honolulu, Pacific/Majuro, Pacific/Midway, Pacific/Midway, Pacific/Noumea, Pacific/Pago_Pago, Pacific/Port_Moresby, Pacific/Tongatapu' 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 SecurityApi.get_security_trades_by_symbol, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/trades".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'source'] = source query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'timezone'] = opts[:'timezone'] if !opts[:'timezone'].nil? query_params[:'darkpool_only'] = opts[:'darkpool_only'] if !opts[:'darkpool_only'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'min_size'] = opts[:'min_size'] if !opts[:'min_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 => 'SecurityTradesResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_trades_by_symbol\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Zacks Analyst Ratings for Security # This database offers consensus analyst recommendations for over 5,000 US and Canadian listed companies. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Limit ratings to those on or after this date # @option opts [String] :end_date Limit ratings to those on or before this date # @option opts [Float] :mean_greater Return only records with a mean (average) higher than this value # @option opts [Float] :mean_less Return only records with a mean (average) lower than this value # @option opts [Integer] :strong_buys_greater Return only records with more than this many Strong Buy recommendations # @option opts [Integer] :strong_buys_less Return only records with fewer than this many Strong Buy recommendations # @option opts [Integer] :buys_greater Return only records with more than this many Buy recommendations # @option opts [Integer] :buys_less Return only records with fewer than this many Buy recommendations # @option opts [Integer] :holds_greater Return only records with more than this many Hold recommendations # @option opts [Integer] :holds_less Return only records with fewer than this many Hold recommendations # @option opts [Integer] :sells_greater Return only records with more than this many Sell recommendations # @option opts [Integer] :sells_less Return only records with fewer than this many Sell recommendations # @option opts [Integer] :strong_sells_greater Return only records with more than this many Strong Sell recommendations # @option opts [Integer] :strong_sells_less Return only records with fewer than this many Strong Sell recommendations # @option opts [Integer] :total_greater Return only records with more than this many recommendations, regardless of type # @option opts [Integer] :total_less Return only records with fewer than this many recommendations, regardless of type # @option opts [Integer] :page_size The number of results to return (default to 100) # @return [ApiResponseSecurityZacksAnalystRatings] def get_security_zacks_analyst_ratings(identifier, opts = {}) data, _status_code, _headers = get_security_zacks_analyst_ratings_with_http_info(identifier, opts) return data end # Zacks Analyst Ratings for Security # This database offers consensus analyst recommendations for over 5,000 US and Canadian listed companies. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :start_date Limit ratings to those on or after this date # @option opts [String] :end_date Limit ratings to those on or before this date # @option opts [Float] :mean_greater Return only records with a mean (average) higher than this value # @option opts [Float] :mean_less Return only records with a mean (average) lower than this value # @option opts [Integer] :strong_buys_greater Return only records with more than this many Strong Buy recommendations # @option opts [Integer] :strong_buys_less Return only records with fewer than this many Strong Buy recommendations # @option opts [Integer] :buys_greater Return only records with more than this many Buy recommendations # @option opts [Integer] :buys_less Return only records with fewer than this many Buy recommendations # @option opts [Integer] :holds_greater Return only records with more than this many Hold recommendations # @option opts [Integer] :holds_less Return only records with fewer than this many Hold recommendations # @option opts [Integer] :sells_greater Return only records with more than this many Sell recommendations # @option opts [Integer] :sells_less Return only records with fewer than this many Sell recommendations # @option opts [Integer] :strong_sells_greater Return only records with more than this many Strong Sell recommendations # @option opts [Integer] :strong_sells_less Return only records with fewer than this many Strong Sell recommendations # @option opts [Integer] :total_greater Return only records with more than this many recommendations, regardless of type # @option opts [Integer] :total_less Return only records with fewer than this many recommendations, regardless of type # @option opts [Integer] :page_size The number of results to return # @return [Array<(ApiResponseSecurityZacksAnalystRatings, Fixnum, Hash)>] ApiResponseSecurityZacksAnalystRatings data, response status code and response headers def get_security_zacks_analyst_ratings_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_zacks_analyst_ratings ..." 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 SecurityApi.get_security_zacks_analyst_ratings" end if @api_client.config.client_side_validation && !opts[:'mean_greater'].nil? && opts[:'mean_greater'] > 5 fail ArgumentError, 'invalid value for "opts[:"mean_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be smaller than or equal to 5.' end if @api_client.config.client_side_validation && !opts[:'mean_greater'].nil? && opts[:'mean_greater'] < 1 fail ArgumentError, 'invalid value for "opts[:"mean_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'mean_less'].nil? && opts[:'mean_less'] > 5 fail ArgumentError, 'invalid value for "opts[:"mean_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be smaller than or equal to 5.' end if @api_client.config.client_side_validation && !opts[:'mean_less'].nil? && opts[:'mean_less'] < 1 fail ArgumentError, 'invalid value for "opts[:"mean_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'strong_buys_greater'].nil? && opts[:'strong_buys_greater'] < 0 fail ArgumentError, 'invalid value for "opts[:"strong_buys_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'strong_buys_less'].nil? && opts[:'strong_buys_less'] < 0 fail ArgumentError, 'invalid value for "opts[:"strong_buys_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'buys_greater'].nil? && opts[:'buys_greater'] < 0 fail ArgumentError, 'invalid value for "opts[:"buys_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'buys_less'].nil? && opts[:'buys_less'] < 0 fail ArgumentError, 'invalid value for "opts[:"buys_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'holds_greater'].nil? && opts[:'holds_greater'] < 0 fail ArgumentError, 'invalid value for "opts[:"holds_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'holds_less'].nil? && opts[:'holds_less'] < 0 fail ArgumentError, 'invalid value for "opts[:"holds_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'sells_greater'].nil? && opts[:'sells_greater'] < 0 fail ArgumentError, 'invalid value for "opts[:"sells_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'sells_less'].nil? && opts[:'sells_less'] < 0 fail ArgumentError, 'invalid value for "opts[:"sells_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'strong_sells_greater'].nil? && opts[:'strong_sells_greater'] < 0 fail ArgumentError, 'invalid value for "opts[:"strong_sells_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'strong_sells_less'].nil? && opts[:'strong_sells_less'] < 0 fail ArgumentError, 'invalid value for "opts[:"strong_sells_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'total_greater'].nil? && opts[:'total_greater'] < 0 fail ArgumentError, 'invalid value for "opts[:"total_greater"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'total_less'].nil? && opts[:'total_less'] < 0 fail ArgumentError, 'invalid value for "opts[:"total_less"]" when calling SecurityApi.get_security_zacks_analyst_ratings, must be greater than or equal to 0.' 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 SecurityApi.get_security_zacks_analyst_ratings, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/zacks/analyst_ratings".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} 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[:'mean_greater'] = opts[:'mean_greater'] if !opts[:'mean_greater'].nil? query_params[:'mean_less'] = opts[:'mean_less'] if !opts[:'mean_less'].nil? query_params[:'strong_buys_greater'] = opts[:'strong_buys_greater'] if !opts[:'strong_buys_greater'].nil? query_params[:'strong_buys_less'] = opts[:'strong_buys_less'] if !opts[:'strong_buys_less'].nil? query_params[:'buys_greater'] = opts[:'buys_greater'] if !opts[:'buys_greater'].nil? query_params[:'buys_less'] = opts[:'buys_less'] if !opts[:'buys_less'].nil? query_params[:'holds_greater'] = opts[:'holds_greater'] if !opts[:'holds_greater'].nil? query_params[:'holds_less'] = opts[:'holds_less'] if !opts[:'holds_less'].nil? query_params[:'sells_greater'] = opts[:'sells_greater'] if !opts[:'sells_greater'].nil? query_params[:'sells_less'] = opts[:'sells_less'] if !opts[:'sells_less'].nil? query_params[:'strong_sells_greater'] = opts[:'strong_sells_greater'] if !opts[:'strong_sells_greater'].nil? query_params[:'strong_sells_less'] = opts[:'strong_sells_less'] if !opts[:'strong_sells_less'].nil? query_params[:'total_greater'] = opts[:'total_greater'] if !opts[:'total_greater'].nil? query_params[:'total_less'] = opts[:'total_less'] if !opts[:'total_less'].nil? 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 => 'ApiResponseSecurityZacksAnalystRatings') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_zacks_analyst_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Zacks Analyst Ratings Snapshot # This database offers current and historical consensus analyst recommendation snapshots for over 5,000 US and Canadian listed companies. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :date Lookup a historical snapshot on the given date # @return [ApiResponseSecurityZacksAnalystRatingsSnapshot] def get_security_zacks_analyst_ratings_snapshot(identifier, opts = {}) data, _status_code, _headers = get_security_zacks_analyst_ratings_snapshot_with_http_info(identifier, opts) return data end # Zacks Analyst Ratings Snapshot # This database offers current and historical consensus analyst recommendation snapshots for over 5,000 US and Canadian listed companies. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @param [Hash] opts the optional parameters # @option opts [String] :date Lookup a historical snapshot on the given date # @return [Array<(ApiResponseSecurityZacksAnalystRatingsSnapshot, Fixnum, Hash)>] ApiResponseSecurityZacksAnalystRatingsSnapshot data, response status code and response headers def get_security_zacks_analyst_ratings_snapshot_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_zacks_analyst_ratings_snapshot ..." 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 SecurityApi.get_security_zacks_analyst_ratings_snapshot" end # resource path local_var_path = "/securities/{identifier}/zacks/analyst_ratings/snapshot".sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} query_params[:'date'] = opts[:'date'] if !opts[:'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 => 'ApiResponseSecurityZacksAnalystRatingsSnapshot') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_zacks_analyst_ratings_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Zacks EPS Surprises for Security # Returns historical estimated and actual earnings, guidance, and announcement dates for a specified symbol. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @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 [ApiResponseSecurityZacksEPSSurprises] def get_security_zacks_eps_surprises(identifier, opts = {}) data, _status_code, _headers = get_security_zacks_eps_surprises_with_http_info(identifier, opts) return data end # Zacks EPS Surprises for Security # Returns historical estimated and actual earnings, guidance, and announcement dates for a specified symbol. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @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<(ApiResponseSecurityZacksEPSSurprises, Fixnum, Hash)>] ApiResponseSecurityZacksEPSSurprises data, response status code and response headers def get_security_zacks_eps_surprises_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_zacks_eps_surprises ..." 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 SecurityApi.get_security_zacks_eps_surprises" 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 SecurityApi.get_security_zacks_eps_surprises, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/zacks/eps_surprises".sub('{' + 'identifier' + '}', identifier.to_s) # 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 => 'ApiResponseSecurityZacksEPSSurprises') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_zacks_eps_surprises\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Zacks Sales Surprises for Security # This database returns historical estimated and actual sales, guidance, and announcement dates for a specified US or Canadian company. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @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 [ApiResponseSecurityZacksSalesSurprises] def get_security_zacks_sales_surprises(identifier, opts = {}) data, _status_code, _headers = get_security_zacks_sales_surprises_with_http_info(identifier, opts) return data end # Zacks Sales Surprises for Security # This database returns historical estimated and actual sales, guidance, and announcement dates for a specified US or Canadian company. # @param identifier A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) # @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<(ApiResponseSecurityZacksSalesSurprises, Fixnum, Hash)>] ApiResponseSecurityZacksSalesSurprises data, response status code and response headers def get_security_zacks_sales_surprises_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.get_security_zacks_sales_surprises ..." 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 SecurityApi.get_security_zacks_sales_surprises" 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 SecurityApi.get_security_zacks_sales_surprises, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/{identifier}/zacks/sales_surprises".sub('{' + 'identifier' + '}', identifier.to_s) # 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 => 'ApiResponseSecurityZacksSalesSurprises') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#get_security_zacks_sales_surprises\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Screen Securities # Screen Securities using complex logic. Use POST only. See screener documentation for details on how to construct conditions. # @param [Hash] opts the optional parameters # @option opts [SecurityScreenGroup] :logic The logic to screen with, consisting of operators, clauses, and nested groups. </br> See <a href=\"https://docs.intrinio.com/documentation/screener_v2\" target=\"_blank\">screener documentation</a> for details on how to construct conditions. # @option opts [String] :order_column Results returned sorted by this column # @option opts [String] :order_direction Sort order to use with the order_column (default to asc) # @option opts [BOOLEAN] :primary_only Return only primary securities (default to false) # @option opts [Integer] :page_size The number of results to return. Maximum for this endpoint is 50000. (default to 100) # @return [Array] def screen_securities(opts = {}) data, _status_code, _headers = screen_securities_with_http_info(opts) return data end # Screen Securities # Screen Securities using complex logic. Use POST only. See <a href=\"https://docs.intrinio.com/documentation/screener_v2\" target=\"_blank\">screener documentation</a> for details on how to construct conditions. # @param [Hash] opts the optional parameters # @option opts [SecurityScreenGroup] :logic The logic to screen with, consisting of operators, clauses, and nested groups. </br> See <a href=\"https://docs.intrinio.com/documentation/screener_v2\" target=\"_blank\">screener documentation</a> for details on how to construct conditions. # @option opts [String] :order_column Results returned sorted by this column # @option opts [String] :order_direction Sort order to use with the order_column # @option opts [BOOLEAN] :primary_only Return only primary securities # @option opts [Integer] :page_size The number of results to return. Maximum for this endpoint is 50000. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def screen_securities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.screen_securities ..." end if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction']) fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 50000 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling SecurityApi.screen_securities, must be smaller than or equal to 50000.' end # resource path local_var_path = "/securities/screen" # query parameters query_params = {} query_params[:'order_column'] = opts[:'order_column'] if !opts[:'order_column'].nil? query_params[:'order_direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil? query_params[:'primary_only'] = opts[:'primary_only'] if !opts[:'primary_only'].nil? 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'logic']) auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#screen_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search Securities # Search the securities database and return a list of securities matching the text query parameter passed through. Query parameter searches across the security ticker and name. # @param query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return (default to 100) # @return [ApiResponseSecuritiesSearch] def search_securities(query, opts = {}) data, _status_code, _headers = search_securities_with_http_info(query, opts) return data end # Search Securities # Search the securities database and return a list of securities matching the text query parameter passed through. Query parameter searches across the security ticker and name. # @param query # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The number of results to return # @return [Array<(ApiResponseSecuritiesSearch, Fixnum, Hash)>] ApiResponseSecuritiesSearch data, response status code and response headers def search_securities_with_http_info(query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SecurityApi.search_securities ..." 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 SecurityApi.search_securities" 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 SecurityApi.search_securities, must be smaller than or equal to 10000.' end # resource path local_var_path = "/securities/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 => 'ApiResponseSecuritiesSearch') if @api_client.config.debugging @api_client.config.logger.debug "API called: SecurityApi#search_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end