class FinnhubRuby::DefaultApi
Attributes
Public Class Methods
# File lib/finnhub_ruby/api/default_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Aggregate Indicators Get aggregate signal of multiple technical indicators such as MACD, RSI, Moving Average v.v. @param symbol [String] symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param [Hash] opts the optional parameters @return [AggregateIndicators]
# File lib/finnhub_ruby/api/default_api.rb, line 28 def aggregate_indicator(symbol, resolution, opts = {}) data, _status_code, _headers = aggregate_indicator_with_http_info(symbol, resolution, opts) data end
Aggregate Indicators Get aggregate signal of multiple technical indicators such as MACD, RSI, Moving Average v.v. @param symbol [String] symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param [Hash] opts the optional parameters @return [Array<(AggregateIndicators
, Integer, Hash)>] AggregateIndicators
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 39 def aggregate_indicator_with_http_info(symbol, resolution, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.aggregate_indicator ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.aggregate_indicator" end # verify the required parameter 'resolution' is set if @api_client.config.client_side_validation && resolution.nil? fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.aggregate_indicator" end # resource path local_var_path = '/scan/technical-indicator' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'resolution'] = resolution # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AggregateIndicators' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.aggregate_indicator", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#aggregate_indicator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Basic Financials Get company basic financials such as margin, P/E ratio, 52-week high/low etc. @param symbol [String] Symbol of the company: AAPL. @param metric [String] Metric type. Can be 1 of the following values <code>all</code> @param [Hash] opts the optional parameters @return [BasicFinancials]
# File lib/finnhub_ruby/api/default_api.rb, line 99 def company_basic_financials(symbol, metric, opts = {}) data, _status_code, _headers = company_basic_financials_with_http_info(symbol, metric, opts) data end
Basic Financials Get company basic financials such as margin, P/E ratio, 52-week high/low etc. @param symbol [String] Symbol of the company: AAPL. @param metric [String] Metric type. Can be 1 of the following values <code>all</code> @param [Hash] opts the optional parameters @return [Array<(BasicFinancials
, Integer, Hash)>] BasicFinancials
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 110 def company_basic_financials_with_http_info(symbol, metric, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_basic_financials ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_basic_financials" end # verify the required parameter 'metric' is set if @api_client.config.client_side_validation && metric.nil? fail ArgumentError, "Missing the required parameter 'metric' when calling DefaultApi.company_basic_financials" end # resource path local_var_path = '/stock/metric' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'metric'] = metric # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BasicFinancials' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_basic_financials", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_basic_financials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Earnings Surprises Get company historical quarterly earnings surprise going back to 2000. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Integer] :limit Limit number of period returned. Leave blank to get the full history. @return [Array<EarningResult>]
# File lib/finnhub_ruby/api/default_api.rb, line 170 def company_earnings(symbol, opts = {}) data, _status_code, _headers = company_earnings_with_http_info(symbol, opts) data end
Earnings Surprises Get company historical quarterly earnings surprise going back to 2000. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Integer] :limit Limit number of period returned. Leave blank to get the full history. @return [Array<(Array<EarningResult>, Integer, Hash)>] Array<EarningResult> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 181 def company_earnings_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_earnings ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_earnings" end # resource path local_var_path = '/stock/earnings' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<EarningResult>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_earnings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_earnings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Earnings Estimates Get company's EPS estimates. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [String] :freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> @return [EarningsEstimates]
# File lib/finnhub_ruby/api/default_api.rb, line 237 def company_eps_estimates(symbol, opts = {}) data, _status_code, _headers = company_eps_estimates_with_http_info(symbol, opts) data end
Earnings Estimates Get company's EPS estimates. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [String] :freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> @return [Array<(EarningsEstimates
, Integer, Hash)>] EarningsEstimates
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 248 def company_eps_estimates_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_eps_estimates ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_eps_estimates" end # resource path local_var_path = '/stock/eps-estimate' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EarningsEstimates' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_eps_estimates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_eps_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Company
ESG Scores <p>This endpoint provides ESG scores and important indicators for 1000+ global companies. The data is collected through company's public ESG disclosure and public sources.</p><p>Our ESG scoring models takes into account more than 150 different inputs to calculate the level of ESG risks and how well a company is managing them. A higher score means lower ESG risk or better ESG management. ESG scores are in the the range of 0-100. Some key indicators might contain letter-grade score from C- to A+ with C- is the lowest score and A+ is the highest score.</p> @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [CompanyESG]
# File lib/finnhub_ruby/api/default_api.rb, line 303 def company_esg_score(symbol, opts = {}) data, _status_code, _headers = company_esg_score_with_http_info(symbol, opts) data end
Company
ESG Scores <p>This endpoint provides ESG scores and important indicators for 1000+ global companies. The data is collected through company's public ESG disclosure and public sources.</p><p>Our ESG scoring models takes into account more than 150 different inputs to calculate the level of ESG risks and how well a company is managing them. A higher score means lower ESG risk or better ESG management. ESG scores are in the the range of 0-100. Some key indicators might contain letter-grade score from C- to A+ with C- is the lowest score and A+ is the highest score.</p> @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [Array<(CompanyESG
, Integer, Hash)>] CompanyESG
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 313 def company_esg_score_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_esg_score ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_esg_score" end # resource path local_var_path = '/stock/esg' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CompanyESG' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_esg_score", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_esg_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Company
Executive Get a list of company's executives and members of the Board. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [CompanyExecutive]
# File lib/finnhub_ruby/api/default_api.rb, line 367 def company_executive(symbol, opts = {}) data, _status_code, _headers = company_executive_with_http_info(symbol, opts) data end
Company
Executive Get a list of company's executives and members of the Board. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [Array<(CompanyExecutive
, Integer, Hash)>] CompanyExecutive
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 377 def company_executive_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_executive ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_executive" end # resource path local_var_path = '/stock/executive' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CompanyExecutive' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_executive", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_executive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Company
News
List latest company news by symbol. This endpoint is only available for North American companies. @param symbol [String] Company
symbol. @param from [Date] From date <code>YYYY-MM-DD</code>. @param to [Date] To date <code>YYYY-MM-DD</code>. @param [Hash] opts the optional parameters @return [Array<CompanyNews>]
# File lib/finnhub_ruby/api/default_api.rb, line 433 def company_news(symbol, from, to, opts = {}) data, _status_code, _headers = company_news_with_http_info(symbol, from, to, opts) data end
Company
News
List latest company news by symbol. This endpoint is only available for North American companies. @param symbol [String] Company
symbol. @param from [Date] From date <code>YYYY-MM-DD</code>. @param to [Date] To date <code>YYYY-MM-DD</code>. @param [Hash] opts the optional parameters @return [Array<(Array<CompanyNews>, Integer, Hash)>] Array<CompanyNews> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 445 def company_news_with_http_info(symbol, from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_news ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_news" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.company_news" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.company_news" end # resource path local_var_path = '/company-news' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<CompanyNews>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_news", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Peers Get company peers. Return a list of peers in the same country and GICS sub-industry @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/finnhub_ruby/api/default_api.rb, line 509 def company_peers(symbol, opts = {}) data, _status_code, _headers = company_peers_with_http_info(symbol, opts) data end
Peers Get company peers. Return a list of peers in the same country and GICS sub-industry @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 519 def company_peers_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_peers ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_peers" end # resource path local_var_path = '/stock/peers' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_peers", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_peers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Company
Profile Get general information of a company. You can query by symbol, ISIN or CUSIP @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol of the company: AAPL e.g. @option opts [String] :isin ISIN @option opts [String] :cusip CUSIP @return [CompanyProfile]
# File lib/finnhub_ruby/api/default_api.rb, line 575 def company_profile(opts = {}) data, _status_code, _headers = company_profile_with_http_info(opts) data end
Company
Profile 2 Get general information of a company. You can query by symbol, ISIN or CUSIP. This is the free version of <a href="#company-profile">Company Profile</a>. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol of the company: AAPL e.g. @option opts [String] :isin ISIN @option opts [String] :cusip CUSIP @return [CompanyProfile2]
# File lib/finnhub_ruby/api/default_api.rb, line 641 def company_profile2(opts = {}) data, _status_code, _headers = company_profile2_with_http_info(opts) data end
Company
Profile 2 Get general information of a company. You can query by symbol, ISIN or CUSIP. This is the free version of <a href="#company-profile">Company Profile</a>. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol of the company: AAPL e.g. @option opts [String] :isin ISIN @option opts [String] :cusip CUSIP @return [Array<(CompanyProfile2
, Integer, Hash)>] CompanyProfile2
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 653 def company_profile2_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_profile2 ...' end # resource path local_var_path = '/stock/profile2' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil? query_params[:'cusip'] = opts[:'cusip'] if !opts[:'cusip'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CompanyProfile2' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_profile2", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_profile2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Company
Profile Get general information of a company. You can query by symbol, ISIN or CUSIP @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol of the company: AAPL e.g. @option opts [String] :isin ISIN @option opts [String] :cusip CUSIP @return [Array<(CompanyProfile
, Integer, Hash)>] CompanyProfile
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 587 def company_profile_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_profile ...' end # resource path local_var_path = '/stock/profile' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil? query_params[:'cusip'] = opts[:'cusip'] if !opts[:'cusip'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CompanyProfile' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Revenue Estimates Get company's revenue estimates. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [String] :freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> @return [RevenueEstimates]
# File lib/finnhub_ruby/api/default_api.rb, line 706 def company_revenue_estimates(symbol, opts = {}) data, _status_code, _headers = company_revenue_estimates_with_http_info(symbol, opts) data end
Revenue Estimates Get company's revenue estimates. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [String] :freq Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code> @return [Array<(RevenueEstimates
, Integer, Hash)>] RevenueEstimates
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 717 def company_revenue_estimates_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.company_revenue_estimates ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_revenue_estimates" end # resource path local_var_path = '/stock/revenue-estimate' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RevenueEstimates' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.company_revenue_estimates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#company_revenue_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Country Metadata List all countries and metadata. @param [Hash] opts the optional parameters @return [Array<CountryMetadata>]
# File lib/finnhub_ruby/api/default_api.rb, line 771 def country(opts = {}) data, _status_code, _headers = country_with_http_info(opts) data end
Country Metadata List all countries and metadata. @param [Hash] opts the optional parameters @return [Array<(Array<CountryMetadata>, Integer, Hash)>] Array<CountryMetadata> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 780 def country_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.country ...' end # resource path local_var_path = '/country' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<CountryMetadata>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.country", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#country\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
COVID-19 Get real-time updates on the number of COVID-19 (Corona virus) cases in the US with a state-by-state breakdown. Data is sourced from CDC and reputable sources. You can also access this API <a href="rapidapi.com/Finnhub/api/finnhub-real-time-covid-19" target="_blank" rel="nofollow">here</a> @param [Hash] opts the optional parameters @return [Array<CovidInfo>]
# File lib/finnhub_ruby/api/default_api.rb, line 828 def covid19(opts = {}) data, _status_code, _headers = covid19_with_http_info(opts) data end
COVID-19 Get real-time updates on the number of COVID-19 (Corona virus) cases in the US with a state-by-state breakdown. Data is sourced from CDC and reputable sources. You can also access this API <a href="rapidapi.com/Finnhub/api/finnhub-real-time-covid-19" target="_blank" rel="nofollow">here</a> @param [Hash] opts the optional parameters @return [Array<(Array<CovidInfo>, Integer, Hash)>] Array<CovidInfo> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 837 def covid19_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.covid19 ...' end # resource path local_var_path = '/covid19/us' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<CovidInfo>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.covid19", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#covid19\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Crypto Candles Get candlestick data for crypto symbols. @param symbol [String] Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param [Hash] opts the optional parameters @return [CryptoCandles]
# File lib/finnhub_ruby/api/default_api.rb, line 889 def crypto_candles(symbol, resolution, from, to, opts = {}) data, _status_code, _headers = crypto_candles_with_http_info(symbol, resolution, from, to, opts) data end
Crypto Candles Get candlestick data for crypto symbols. @param symbol [String] Use symbol returned in <code>/crypto/symbol</code> endpoint for this field. @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param [Hash] opts the optional parameters @return [Array<(CryptoCandles
, Integer, Hash)>] CryptoCandles
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 902 def crypto_candles_with_http_info(symbol, resolution, from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.crypto_candles ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.crypto_candles" end # verify the required parameter 'resolution' is set if @api_client.config.client_side_validation && resolution.nil? fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.crypto_candles" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.crypto_candles" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.crypto_candles" end # resource path local_var_path = '/crypto/candle' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'resolution'] = resolution query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CryptoCandles' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.crypto_candles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#crypto_candles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Crypto Exchanges List supported crypto exchanges @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/finnhub_ruby/api/default_api.rb, line 970 def crypto_exchanges(opts = {}) data, _status_code, _headers = crypto_exchanges_with_http_info(opts) data end
Crypto Exchanges List supported crypto exchanges @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 979 def crypto_exchanges_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.crypto_exchanges ...' end # resource path local_var_path = '/crypto/exchange' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.crypto_exchanges", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#crypto_exchanges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Crypto Symbol List supported crypto symbols by exchange @param exchange [String] Exchange you want to get the list of symbols from. @param [Hash] opts the optional parameters @return [Array<CryptoSymbol>]
# File lib/finnhub_ruby/api/default_api.rb, line 1028 def crypto_symbols(exchange, opts = {}) data, _status_code, _headers = crypto_symbols_with_http_info(exchange, opts) data end
Crypto Symbol List supported crypto symbols by exchange @param exchange [String] Exchange you want to get the list of symbols from. @param [Hash] opts the optional parameters @return [Array<(Array<CryptoSymbol>, Integer, Hash)>] Array<CryptoSymbol> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1038 def crypto_symbols_with_http_info(exchange, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.crypto_symbols ...' end # verify the required parameter 'exchange' is set if @api_client.config.client_side_validation && exchange.nil? fail ArgumentError, "Missing the required parameter 'exchange' when calling DefaultApi.crypto_symbols" end # resource path local_var_path = '/crypto/symbol' # query parameters query_params = opts[:query_params] || {} query_params[:'exchange'] = exchange # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<CryptoSymbol>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.crypto_symbols", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#crypto_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Earnings Calendar Get historical and coming earnings release. EPS and Revenue in this endpoint are non-GAAP, which means they are adjusted to exclude some one-time or unusual items. This is the same data investors usually react to and talked about on the media. Estimates are sourced from both sell-side and buy-side analysts. @param [Hash] opts the optional parameters @option opts [Date] :from From date: 2020-03-15. @option opts [Date] :to To date: 2020-03-16. @option opts [String] :symbol Filter by symbol: AAPL. @option opts [Boolean] :international Set to <code>true</code> to include international markets. Default value is <code>false</code> @return [EarningsCalendar]
# File lib/finnhub_ruby/api/default_api.rb, line 1095 def earnings_calendar(opts = {}) data, _status_code, _headers = earnings_calendar_with_http_info(opts) data end
Earnings Calendar Get historical and coming earnings release. EPS and Revenue in this endpoint are non-GAAP, which means they are adjusted to exclude some one-time or unusual items. This is the same data investors usually react to and talked about on the media. Estimates are sourced from both sell-side and buy-side analysts. @param [Hash] opts the optional parameters @option opts [Date] :from From date: 2020-03-15. @option opts [Date] :to To date: 2020-03-16. @option opts [String] :symbol Filter by symbol: AAPL. @option opts [Boolean] :international Set to <code>true</code> to include international markets. Default value is <code>false</code> @return [Array<(EarningsCalendar
, Integer, Hash)>] EarningsCalendar
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1108 def earnings_calendar_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.earnings_calendar ...' end # resource path local_var_path = '/calendar/earnings' # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'international'] = opts[:'international'] if !opts[:'international'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EarningsCalendar' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.earnings_calendar", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#earnings_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Economic Calendar <p>Get recent and upcoming economic releases.</p><p>Historical events and surprises are available for Enterprise clients.</p> @param [Hash] opts the optional parameters @return [EconomicCalendar]
# File lib/finnhub_ruby/api/default_api.rb, line 1160 def economic_calendar(opts = {}) data, _status_code, _headers = economic_calendar_with_http_info(opts) data end
Economic Calendar <p>Get recent and upcoming economic releases.</p><p>Historical events and surprises are available for Enterprise clients.</p> @param [Hash] opts the optional parameters @return [Array<(EconomicCalendar
, Integer, Hash)>] EconomicCalendar
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1169 def economic_calendar_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.economic_calendar ...' end # resource path local_var_path = '/calendar/economic' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EconomicCalendar' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.economic_calendar", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#economic_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Economic Code List codes of supported economic data. @param [Hash] opts the optional parameters @return [Array<EconomicCode>]
# File lib/finnhub_ruby/api/default_api.rb, line 1217 def economic_code(opts = {}) data, _status_code, _headers = economic_code_with_http_info(opts) data end
Economic Code List codes of supported economic data. @param [Hash] opts the optional parameters @return [Array<(Array<EconomicCode>, Integer, Hash)>] Array<EconomicCode> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1226 def economic_code_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.economic_code ...' end # resource path local_var_path = '/economic/code' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<EconomicCode>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.economic_code", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#economic_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Economic Data Get economic data. @param code [String] Economic code. @param [Hash] opts the optional parameters @return [EconomicData]
# File lib/finnhub_ruby/api/default_api.rb, line 1275 def economic_data(code, opts = {}) data, _status_code, _headers = economic_data_with_http_info(code, opts) data end
Economic Data Get economic data. @param code [String] Economic code. @param [Hash] opts the optional parameters @return [Array<(EconomicData
, Integer, Hash)>] EconomicData
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1285 def economic_data_with_http_info(code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.economic_data ...' end # verify the required parameter 'code' is set if @api_client.config.client_side_validation && code.nil? fail ArgumentError, "Missing the required parameter 'code' when calling DefaultApi.economic_data" end # resource path local_var_path = '/economic' # query parameters query_params = opts[:query_params] || {} query_params[:'code'] = code # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EconomicData' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.economic_data", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#economic_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
ETFs Country Exposure Get ETF country exposure data. @param symbol [String] ETF symbol. @param [Hash] opts the optional parameters @return [ETFsCountryExposure]
# File lib/finnhub_ruby/api/default_api.rb, line 1339 def etfs_country_exposure(symbol, opts = {}) data, _status_code, _headers = etfs_country_exposure_with_http_info(symbol, opts) data end
ETFs Country Exposure Get ETF country exposure data. @param symbol [String] ETF symbol. @param [Hash] opts the optional parameters @return [Array<(ETFsCountryExposure
, Integer, Hash)>] ETFsCountryExposure
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1349 def etfs_country_exposure_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.etfs_country_exposure ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.etfs_country_exposure" end # resource path local_var_path = '/etf/country' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ETFsCountryExposure' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.etfs_country_exposure", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#etfs_country_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
ETFs Holdings Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings. @param [Hash] opts the optional parameters @option opts [String] :symbol ETF symbol. @option opts [String] :isin ETF isin. @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. @return [ETFsHoldings]
# File lib/finnhub_ruby/api/default_api.rb, line 1405 def etfs_holdings(opts = {}) data, _status_code, _headers = etfs_holdings_with_http_info(opts) data end
ETFs Holdings Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings. @param [Hash] opts the optional parameters @option opts [String] :symbol ETF symbol. @option opts [String] :isin ETF isin. @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. @return [Array<(ETFsHoldings
, Integer, Hash)>] ETFsHoldings
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1417 def etfs_holdings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.etfs_holdings ...' end # resource path local_var_path = '/etf/holdings' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil? query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ETFsHoldings' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.etfs_holdings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#etfs_holdings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
ETFs Profile Get ETF profile information. This endpoint has global coverage. @param [Hash] opts the optional parameters @option opts [String] :symbol ETF symbol. @option opts [String] :isin ETF isin. @return [ETFsProfile]
# File lib/finnhub_ruby/api/default_api.rb, line 1470 def etfs_profile(opts = {}) data, _status_code, _headers = etfs_profile_with_http_info(opts) data end
ETFs Profile Get ETF profile information. This endpoint has global coverage. @param [Hash] opts the optional parameters @option opts [String] :symbol ETF symbol. @option opts [String] :isin ETF isin. @return [Array<(ETFsProfile
, Integer, Hash)>] ETFsProfile
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1481 def etfs_profile_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.etfs_profile ...' end # resource path local_var_path = '/etf/profile' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ETFsProfile' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.etfs_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#etfs_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
ETFs Sector Exposure Get ETF sector exposure data. @param symbol [String] ETF symbol. @param [Hash] opts the optional parameters @return [ETFsSectorExposure]
# File lib/finnhub_ruby/api/default_api.rb, line 1532 def etfs_sector_exposure(symbol, opts = {}) data, _status_code, _headers = etfs_sector_exposure_with_http_info(symbol, opts) data end
ETFs Sector Exposure Get ETF sector exposure data. @param symbol [String] ETF symbol. @param [Hash] opts the optional parameters @return [Array<(ETFsSectorExposure
, Integer, Hash)>] ETFsSectorExposure
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1542 def etfs_sector_exposure_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.etfs_sector_exposure ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.etfs_sector_exposure" end # resource path local_var_path = '/etf/sector' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ETFsSectorExposure' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.etfs_sector_exposure", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#etfs_sector_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
FDA Committee Meeting Calendar FDA's advisory committees are established to provide functions which support the agency's mission of protecting and promoting the public health, while meeting the requirements set forth in the Federal Advisory Committee Act. Committees are either mandated by statute or established at the discretion of the Department of Health and Human Services. Each committee is subject to renewal at two-year intervals unless the committee charter states otherwise. @param [Hash] opts the optional parameters @return [Array<FDAComitteeMeeting>]
# File lib/finnhub_ruby/api/default_api.rb, line 1595 def fda_committee_meeting_calendar(opts = {}) data, _status_code, _headers = fda_committee_meeting_calendar_with_http_info(opts) data end
FDA Committee Meeting Calendar FDA's advisory committees are established to provide functions which support the agency's mission of protecting and promoting the public health, while meeting the requirements set forth in the Federal Advisory Committee Act. Committees are either mandated by statute or established at the discretion of the Department of Health and Human Services. Each committee is subject to renewal at two-year intervals unless the committee charter states otherwise. @param [Hash] opts the optional parameters @return [Array<(Array<FDAComitteeMeeting>, Integer, Hash)>] Array<FDAComitteeMeeting> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1604 def fda_committee_meeting_calendar_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.fda_committee_meeting_calendar ...' end # resource path local_var_path = '/fda-advisory-committee-calendar' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<FDAComitteeMeeting>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.fda_committee_meeting_calendar", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#fda_committee_meeting_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
SEC Filings List company's filing. Limit to 250 documents at a time. This data is available for bulk download on <a href="www.kaggle.com/finnhub/sec-filings" target="_blank">Kaggle SEC Filings database</a>. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. @option opts [String] :cik CIK. @option opts [String] :access_number Access number of a specific report you want to retrieve data from. @option opts [String] :form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. @option opts [Date] :from From date: 2020-03-15. @option opts [Date] :to To date: 2020-03-16. @return [Array<Filing>]
# File lib/finnhub_ruby/api/default_api.rb, line 1658 def filings(opts = {}) data, _status_code, _headers = filings_with_http_info(opts) data end
SEC Sentiment
Analysis Get sentiment analysis of 10-K and 10-Q filings from SEC. An abnormal increase in the number of positive/negative words in filings can signal a significant change in the company's stock price in the upcoming 4 quarters. We make use of <a href= "https://sraf.nd.edu/textual-analysis/resources/" target="_blank">Loughran and McDonald Sentiment
Word Lists</a> to calculate the sentiment for each filing. @param access_number [String] Access number of a specific report you want to retrieve data from. @param [Hash] opts the optional parameters @return [SECSentimentAnalysis]
# File lib/finnhub_ruby/api/default_api.rb, line 1728 def filings_sentiment(access_number, opts = {}) data, _status_code, _headers = filings_sentiment_with_http_info(access_number, opts) data end
SEC Sentiment
Analysis Get sentiment analysis of 10-K and 10-Q filings from SEC. An abnormal increase in the number of positive/negative words in filings can signal a significant change in the company's stock price in the upcoming 4 quarters. We make use of <a href= "sraf.nd.edu/textual-analysis/resources/" target="_blank">Loughran and McDonald Sentiment
Word Lists</a> to calculate the sentiment for each filing. @param access_number [String] Access number of a specific report you want to retrieve data from. @param [Hash] opts the optional parameters @return [Array<(SECSentimentAnalysis
, Integer, Hash)>] SECSentimentAnalysis
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1738 def filings_sentiment_with_http_info(access_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.filings_sentiment ...' end # verify the required parameter 'access_number' is set if @api_client.config.client_side_validation && access_number.nil? fail ArgumentError, "Missing the required parameter 'access_number' when calling DefaultApi.filings_sentiment" end # resource path local_var_path = '/stock/filings-sentiment' # query parameters query_params = opts[:query_params] || {} query_params[:'accessNumber'] = access_number # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SECSentimentAnalysis' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.filings_sentiment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#filings_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
SEC Filings List company's filing. Limit to 250 documents at a time. This data is available for bulk download on <a href="www.kaggle.com/finnhub/sec-filings" target="_blank">Kaggle SEC Filings database</a>. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings. @option opts [String] :cik CIK. @option opts [String] :access_number Access number of a specific report you want to retrieve data from. @option opts [String] :form Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company. @option opts [Date] :from From date: 2020-03-15. @option opts [Date] :to To date: 2020-03-16. @return [Array<(Array<Filing>, Integer, Hash)>] Array<Filing> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1673 def filings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.filings ...' end # resource path local_var_path = '/stock/filings' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil? query_params[:'accessNumber'] = opts[:'access_number'] if !opts[:'access_number'].nil? query_params[:'form'] = opts[:'form'] if !opts[:'form'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Filing>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.filings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Financial Statements <p>Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years. Data is sourced from original filings most of which made available through <a href="#filings">SEC Filings</a> and <a href="#international-filings">International Filings</a> endpoints.</p><p>Wondering why our standardized data is different from Bloomberg, Reuters, Factset, S&P or Yahoo Finance ? Check out our <a href="/faq">FAQ page</a> to learn more</p> @param symbol [String] Symbol of the company: AAPL. @param statement [String] Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. @param freq [String] Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. @param [Hash] opts the optional parameters @return [FinancialStatements]
# File lib/finnhub_ruby/api/default_api.rb, line 1794 def financials(symbol, statement, freq, opts = {}) data, _status_code, _headers = financials_with_http_info(symbol, statement, freq, opts) data end
Financials As Reported Get financials as reported. This data is available for bulk download on <a href="www.kaggle.com/finnhub/reported-financials" target="_blank">Kaggle SEC Financials database</a>. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. @option opts [String] :cik CIK. @option opts [String] :access_number Access number of a specific report you want to retrieve financials from. @option opts [String] :freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. @return [FinancialsAsReported]
# File lib/finnhub_ruby/api/default_api.rb, line 1873 def financials_reported(opts = {}) data, _status_code, _headers = financials_reported_with_http_info(opts) data end
Financials As Reported Get financials as reported. This data is available for bulk download on <a href="www.kaggle.com/finnhub/reported-financials" target="_blank">Kaggle SEC Financials database</a>. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. @option opts [String] :cik CIK. @option opts [String] :access_number Access number of a specific report you want to retrieve financials from. @option opts [String] :freq Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>. @return [Array<(FinancialsAsReported
, Integer, Hash)>] FinancialsAsReported
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1886 def financials_reported_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.financials_reported ...' end # resource path local_var_path = '/stock/financials-reported' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil? query_params[:'accessNumber'] = opts[:'access_number'] if !opts[:'access_number'].nil? query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FinancialsAsReported' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.financials_reported", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#financials_reported\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Financial Statements <p>Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years. Data is sourced from original filings most of which made available through <a href="#filings">SEC Filings</a> and <a href="#international-filings">International Filings</a> endpoints.</p><p><i>Wondering why our standardized data is different from Bloomberg, Reuters, Factset, S&P or Yahoo Finance ? Check out our <a href="/faq">FAQ page</a> to learn more</i></p> @param symbol [String] Symbol of the company: AAPL. @param statement [String] Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively. @param freq [String] Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow. @param [Hash] opts the optional parameters @return [Array<(FinancialStatements
, Integer, Hash)>] FinancialStatements
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1806 def financials_with_http_info(symbol, statement, freq, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.financials ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.financials" end # verify the required parameter 'statement' is set if @api_client.config.client_side_validation && statement.nil? fail ArgumentError, "Missing the required parameter 'statement' when calling DefaultApi.financials" end # verify the required parameter 'freq' is set if @api_client.config.client_side_validation && freq.nil? fail ArgumentError, "Missing the required parameter 'freq' when calling DefaultApi.financials" end # resource path local_var_path = '/stock/financials' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'statement'] = statement query_params[:'freq'] = freq # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FinancialStatements' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.financials", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#financials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Forex Candles Get candlestick data for forex symbols. @param symbol [String] Use symbol returned in <code>/forex/symbol</code> endpoint for this field. @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param [Hash] opts the optional parameters @return [ForexCandles]
# File lib/finnhub_ruby/api/default_api.rb, line 1942 def forex_candles(symbol, resolution, from, to, opts = {}) data, _status_code, _headers = forex_candles_with_http_info(symbol, resolution, from, to, opts) data end
Forex Candles Get candlestick data for forex symbols. @param symbol [String] Use symbol returned in <code>/forex/symbol</code> endpoint for this field. @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param [Hash] opts the optional parameters @return [Array<(ForexCandles
, Integer, Hash)>] ForexCandles
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 1955 def forex_candles_with_http_info(symbol, resolution, from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.forex_candles ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.forex_candles" end # verify the required parameter 'resolution' is set if @api_client.config.client_side_validation && resolution.nil? fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.forex_candles" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.forex_candles" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.forex_candles" end # resource path local_var_path = '/forex/candle' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'resolution'] = resolution query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ForexCandles' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.forex_candles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#forex_candles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Forex Exchanges List supported forex exchanges @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/finnhub_ruby/api/default_api.rb, line 2023 def forex_exchanges(opts = {}) data, _status_code, _headers = forex_exchanges_with_http_info(opts) data end
Forex Exchanges List supported forex exchanges @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2032 def forex_exchanges_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.forex_exchanges ...' end # resource path local_var_path = '/forex/exchange' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.forex_exchanges", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#forex_exchanges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Forex rates Get rates for all forex pairs. Ideal for currency conversion @param [Hash] opts the optional parameters @option opts [String] :base Base currency. Default to EUR. @return [Forexrates]
# File lib/finnhub_ruby/api/default_api.rb, line 2081 def forex_rates(opts = {}) data, _status_code, _headers = forex_rates_with_http_info(opts) data end
Forex rates Get rates for all forex pairs. Ideal for currency conversion @param [Hash] opts the optional parameters @option opts [String] :base Base currency. Default to EUR. @return [Array<(Forexrates
, Integer, Hash)>] Forexrates
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2091 def forex_rates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.forex_rates ...' end # resource path local_var_path = '/forex/rates' # query parameters query_params = opts[:query_params] || {} query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Forexrates' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.forex_rates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#forex_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Forex Symbol List supported forex symbols. @param exchange [String] Exchange you want to get the list of symbols from. @param [Hash] opts the optional parameters @return [Array<ForexSymbol>]
# File lib/finnhub_ruby/api/default_api.rb, line 2141 def forex_symbols(exchange, opts = {}) data, _status_code, _headers = forex_symbols_with_http_info(exchange, opts) data end
Forex Symbol List supported forex symbols. @param exchange [String] Exchange you want to get the list of symbols from. @param [Hash] opts the optional parameters @return [Array<(Array<ForexSymbol>, Integer, Hash)>] Array<ForexSymbol> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2151 def forex_symbols_with_http_info(exchange, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.forex_symbols ...' end # verify the required parameter 'exchange' is set if @api_client.config.client_side_validation && exchange.nil? fail ArgumentError, "Missing the required parameter 'exchange' when calling DefaultApi.forex_symbols" end # resource path local_var_path = '/forex/symbol' # query parameters query_params = opts[:query_params] || {} query_params[:'exchange'] = exchange # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ForexSymbol>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.forex_symbols", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#forex_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Fund Ownership
Get a full list fund and institutional investors of a company in descending order of the number of shares held. Data is sourced from 13F form
, Schedule 13D
and 13G
for US market, UK Share Register
for UK market, SEDI
for Canadian market and equivalent filings for other international markets. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Integer] :limit Limit number of results. Leave empty to get the full list. @return [FundOwnership]
# File lib/finnhub_ruby/api/default_api.rb, line 2206 def fund_ownership(symbol, opts = {}) data, _status_code, _headers = fund_ownership_with_http_info(symbol, opts) data end
Fund Ownership
Get a full list fund and institutional investors of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Integer] :limit Limit number of results. Leave empty to get the full list. @return [Array<(FundOwnership
, Integer, Hash)>] FundOwnership
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2217 def fund_ownership_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.fund_ownership ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.fund_ownership" end # resource path local_var_path = '/stock/fund-ownership' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FundOwnership' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.fund_ownership", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#fund_ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Indices Constituents Get a list of index's constituents. A list of supported indices for this endpoint can be found <a href="docs.google.com/spreadsheets/d/1Syr2eLielHWsorxkDEZXyc55d6bNx1M3ZeI4vdn7Qzo/edit?usp=sharing" target="_blank">here</a>. @param symbol [String] symbol @param [Hash] opts the optional parameters @return [IndicesConstituents]
# File lib/finnhub_ruby/api/default_api.rb, line 2272 def indices_constituents(symbol, opts = {}) data, _status_code, _headers = indices_constituents_with_http_info(symbol, opts) data end
Indices Constituents Get a list of index's constituents. A list of supported indices for this endpoint can be found <a href="docs.google.com/spreadsheets/d/1Syr2eLielHWsorxkDEZXyc55d6bNx1M3ZeI4vdn7Qzo/edit?usp=sharing" target="_blank">here</a>. @param symbol [String] symbol @param [Hash] opts the optional parameters @return [Array<(IndicesConstituents
, Integer, Hash)>] IndicesConstituents
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2282 def indices_constituents_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.indices_constituents ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.indices_constituents" end # resource path local_var_path = '/index/constituents' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'IndicesConstituents' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.indices_constituents", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#indices_constituents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Indices Historical Constituents Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support ^GSPC (S&P 500)
, ^NDX (Nasdaq 100)
, ^DJI (Dow Jones)
@param symbol [String] symbol @param [Hash] opts the optional parameters @return [IndicesHistoricalConstituents]
# File lib/finnhub_ruby/api/default_api.rb, line 2336 def indices_historical_constituents(symbol, opts = {}) data, _status_code, _headers = indices_historical_constituents_with_http_info(symbol, opts) data end
Indices Historical Constituents Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC (S&P 500)</code>, <code>^NDX (Nasdaq 100)</code>, <code>^DJI (Dow Jones)</code> @param symbol [String] symbol @param [Hash] opts the optional parameters @return [Array<(IndicesHistoricalConstituents
, Integer, Hash)>] IndicesHistoricalConstituents
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2346 def indices_historical_constituents_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.indices_historical_constituents ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.indices_historical_constituents" end # resource path local_var_path = '/index/historical-constituents' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'IndicesHistoricalConstituents' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.indices_historical_constituents", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#indices_historical_constituents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Insider Transactions
Company
insider transactions data sourced from Form 3,4,5
. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Date] :from From date: 2020-03-15. @option opts [Date] :to To date: 2020-03-16. @return [InsiderTransactions]
# File lib/finnhub_ruby/api/default_api.rb, line 2402 def insider_transactions(symbol, opts = {}) data, _status_code, _headers = insider_transactions_with_http_info(symbol, opts) data end
Insider Transactions
Company
insider transactions data sourced from <code>Form 3,4,5</code>. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Date] :from From date: 2020-03-15. @option opts [Date] :to To date: 2020-03-16. @return [Array<(InsiderTransactions
, Integer, Hash)>] InsiderTransactions
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2414 def insider_transactions_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.insider_transactions ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.insider_transactions" end # resource path local_var_path = '/stock/insider-transactions' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InsiderTransactions' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.insider_transactions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#insider_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
International Filings List filings for international companies which covers 95%+ of global market cap. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. Leave empty to list latest filings. @option opts [String] :country Filter by country using country's 2-letter code. @return [Array<InternationalFiling>]
# File lib/finnhub_ruby/api/default_api.rb, line 2471 def international_filings(opts = {}) data, _status_code, _headers = international_filings_with_http_info(opts) data end
International Filings List filings for international companies which covers 95%+ of global market cap. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. Leave empty to list latest filings. @option opts [String] :country Filter by country using country's 2-letter code. @return [Array<(Array<InternationalFiling>, Integer, Hash)>] Array<InternationalFiling> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2482 def international_filings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.international_filings ...' end # resource path local_var_path = '/stock/international-filings' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<InternationalFiling>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.international_filings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#international_filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Investment Themes (Thematic Investing) <p>Thematic investing involves creating a portfolio (or portion of a portfolio) by gathering together a collection of companies involved in certain areas that you predict will generate above-market returns over the long term. Themes can be based on a concept such as ageing populations or a sub-sector such as robotics, and drones. Thematic investing focuses on predicted long-term trends rather than specific companies or sectors, enabling investors to access structural, one-off shifts that can change an entire industry.</p><p>This endpoint will help you get portfolios of different investment themes that are changing our life and are the way of the future.</p><p>A full list of themes supported can be found <a target="_blank" href="heredocs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing">here>. The theme coverage and portfolios are updated bi-weekly by our analysts. Our approach excludes penny, super-small cap and illiquid stocks.</p> @param theme [String] Investment theme. A full list of themes supported can be found <a target="_blank" href="docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing">here</a>. @param [Hash] opts the optional parameters @return [InvestmentThemes]
# File lib/finnhub_ruby/api/default_api.rb, line 2533 def investment_themes(theme, opts = {}) data, _status_code, _headers = investment_themes_with_http_info(theme, opts) data end
Investment Themes (Thematic Investing) <p>Thematic investing involves creating a portfolio (or portion of a portfolio) by gathering together a collection of companies involved in certain areas that you predict will generate above-market returns over the long term. Themes can be based on a concept such as ageing populations or a sub-sector such as robotics, and drones. Thematic investing focuses on predicted long-term trends rather than specific companies or sectors, enabling investors to access structural, one-off shifts that can change an entire industry.</p><p>This endpoint will help you get portfolios of different investment themes that are changing our life and are the way of the future.</p><p>A full list of themes supported can be found <a target="_blank" href="docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing">here</a>. The theme coverage and portfolios are updated bi-weekly by our analysts. Our approach excludes penny, super-small cap and illiquid stocks.</p> @param theme [String] Investment theme. A full list of themes supported can be found <a target="_blank" href="docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing">here</a>. @param [Hash] opts the optional parameters @return [Array<(InvestmentThemes
, Integer, Hash)>] InvestmentThemes
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2543 def investment_themes_with_http_info(theme, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.investment_themes ...' end # verify the required parameter 'theme' is set if @api_client.config.client_side_validation && theme.nil? fail ArgumentError, "Missing the required parameter 'theme' when calling DefaultApi.investment_themes" end # resource path local_var_path = '/stock/investment-theme' # query parameters query_params = opts[:query_params] || {} query_params[:'theme'] = theme # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InvestmentThemes' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.investment_themes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#investment_themes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
IPO Calendar Get recent and upcoming IPO. @param from [Date] From date: 2020-03-15. @param to [Date] To date: 2020-03-16. @param [Hash] opts the optional parameters @return [IPOCalendar]
# File lib/finnhub_ruby/api/default_api.rb, line 2598 def ipo_calendar(from, to, opts = {}) data, _status_code, _headers = ipo_calendar_with_http_info(from, to, opts) data end
IPO Calendar Get recent and upcoming IPO. @param from [Date] From date: 2020-03-15. @param to [Date] To date: 2020-03-16. @param [Hash] opts the optional parameters @return [Array<(IPOCalendar
, Integer, Hash)>] IPOCalendar
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2609 def ipo_calendar_with_http_info(from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.ipo_calendar ...' end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.ipo_calendar" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.ipo_calendar" end # resource path local_var_path = '/calendar/ipo' # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'IPOCalendar' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.ipo_calendar", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#ipo_calendar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Market News
Get latest market news. @param category [String] This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>. @param [Hash] opts the optional parameters @option opts [Integer] :min_id Use this field to get only news after this ID. Default to 0 @return [Array<MarketNews>]
# File lib/finnhub_ruby/api/default_api.rb, line 2669 def market_news(category, opts = {}) data, _status_code, _headers = market_news_with_http_info(category, opts) data end
Market News
Get latest market news. @param category [String] This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>. @param [Hash] opts the optional parameters @option opts [Integer] :min_id Use this field to get only news after this ID. Default to 0 @return [Array<(Array<MarketNews>, Integer, Hash)>] Array<MarketNews> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2680 def market_news_with_http_info(category, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.market_news ...' end # verify the required parameter 'category' is set if @api_client.config.client_side_validation && category.nil? fail ArgumentError, "Missing the required parameter 'category' when calling DefaultApi.market_news" end # resource path local_var_path = '/news' # query parameters query_params = opts[:query_params] || {} query_params[:'category'] = category query_params[:'minId'] = opts[:'min_id'] if !opts[:'min_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<MarketNews>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.market_news", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#market_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Mutual Funds Country Exposure Get Mutual Funds country exposure data. @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [MutualFundCountryExposure]
# File lib/finnhub_ruby/api/default_api.rb, line 2735 def mutual_fund_country_exposure(symbol, opts = {}) data, _status_code, _headers = mutual_fund_country_exposure_with_http_info(symbol, opts) data end
Mutual Funds Country Exposure Get Mutual Funds country exposure data. @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [Array<(MutualFundCountryExposure
, Integer, Hash)>] MutualFundCountryExposure
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2745 def mutual_fund_country_exposure_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_country_exposure ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.mutual_fund_country_exposure" end # resource path local_var_path = '/mutual-fund/country' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MutualFundCountryExposure' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.mutual_fund_country_exposure", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_country_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Mutual Funds Holdings Get full Mutual Funds holdings/constituents. @param [Hash] opts the optional parameters @option opts [String] :symbol Fund's symbol. @option opts [String] :isin Fund's isin. @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. @return [MutualFundHoldings]
# File lib/finnhub_ruby/api/default_api.rb, line 2801 def mutual_fund_holdings(opts = {}) data, _status_code, _headers = mutual_fund_holdings_with_http_info(opts) data end
Mutual Funds Holdings Get full Mutual Funds holdings/constituents. @param [Hash] opts the optional parameters @option opts [String] :symbol Fund's symbol. @option opts [String] :isin Fund's isin. @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set. @return [Array<(MutualFundHoldings
, Integer, Hash)>] MutualFundHoldings
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2813 def mutual_fund_holdings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_holdings ...' end # resource path local_var_path = '/mutual-fund/holdings' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil? query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MutualFundHoldings' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.mutual_fund_holdings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_holdings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Mutual Funds Profile Get mutual funds profile information. This endpoint covers US mutual funds only. @param [Hash] opts the optional parameters @option opts [String] :symbol Fund's symbol. @option opts [String] :isin Fund's isin. @return [MutualFundProfile]
# File lib/finnhub_ruby/api/default_api.rb, line 2866 def mutual_fund_profile(opts = {}) data, _status_code, _headers = mutual_fund_profile_with_http_info(opts) data end
Mutual Funds Profile Get mutual funds profile information. This endpoint covers US mutual funds only. @param [Hash] opts the optional parameters @option opts [String] :symbol Fund's symbol. @option opts [String] :isin Fund's isin. @return [Array<(MutualFundProfile
, Integer, Hash)>] MutualFundProfile
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2877 def mutual_fund_profile_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_profile ...' end # resource path local_var_path = '/mutual-fund/profile' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MutualFundProfile' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.mutual_fund_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Mutual Funds Sector Exposure Get Mutual Funds sector exposure data. @param symbol [String] Mutual Fund symbol. @param [Hash] opts the optional parameters @return [MutualFundSectorExposure]
# File lib/finnhub_ruby/api/default_api.rb, line 2928 def mutual_fund_sector_exposure(symbol, opts = {}) data, _status_code, _headers = mutual_fund_sector_exposure_with_http_info(symbol, opts) data end
Mutual Funds Sector Exposure Get Mutual Funds sector exposure data. @param symbol [String] Mutual Fund symbol. @param [Hash] opts the optional parameters @return [Array<(MutualFundSectorExposure
, Integer, Hash)>] MutualFundSectorExposure
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 2938 def mutual_fund_sector_exposure_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.mutual_fund_sector_exposure ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.mutual_fund_sector_exposure" end # resource path local_var_path = '/mutual-fund/sector' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MutualFundSectorExposure' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.mutual_fund_sector_exposure", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#mutual_fund_sector_exposure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
News
Sentiment
Get company's news sentiment and statistics. This endpoint is only available for US companies. @param symbol [String] Company
symbol. @param [Hash] opts the optional parameters @return [NewsSentiment]
# File lib/finnhub_ruby/api/default_api.rb, line 2992 def news_sentiment(symbol, opts = {}) data, _status_code, _headers = news_sentiment_with_http_info(symbol, opts) data end
News
Sentiment
Get company's news sentiment and statistics. This endpoint is only available for US companies. @param symbol [String] Company
symbol. @param [Hash] opts the optional parameters @return [Array<(NewsSentiment
, Integer, Hash)>] NewsSentiment
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3002 def news_sentiment_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.news_sentiment ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.news_sentiment" end # resource path local_var_path = '/news-sentiment' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'NewsSentiment' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.news_sentiment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#news_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Ownership
Get a full list of shareholders of a company in descending order of the number of shares held. Data is sourced from 13F form
, Schedule 13D
and 13G
for US market, UK Share Register
for UK market, SEDI
for Canadian market and equivalent filings for other international markets. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Integer] :limit Limit number of results. Leave empty to get the full list. @return [Ownership]
# File lib/finnhub_ruby/api/default_api.rb, line 3057 def ownership(symbol, opts = {}) data, _status_code, _headers = ownership_with_http_info(symbol, opts) data end
Ownership
Get a full list of shareholders of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @option opts [Integer] :limit Limit number of results. Leave empty to get the full list. @return [Array<(Ownership
, Integer, Hash)>] Ownership
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3068 def ownership_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.ownership ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.ownership" end # resource path local_var_path = '/stock/ownership' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Ownership' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.ownership", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#ownership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Pattern Recognition Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns. @param symbol [String] Symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param [Hash] opts the optional parameters @return [PatternRecognition]
# File lib/finnhub_ruby/api/default_api.rb, line 3124 def pattern_recognition(symbol, resolution, opts = {}) data, _status_code, _headers = pattern_recognition_with_http_info(symbol, resolution, opts) data end
Pattern Recognition Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns. @param symbol [String] Symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param [Hash] opts the optional parameters @return [Array<(PatternRecognition
, Integer, Hash)>] PatternRecognition
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3135 def pattern_recognition_with_http_info(symbol, resolution, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.pattern_recognition ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.pattern_recognition" end # verify the required parameter 'resolution' is set if @api_client.config.client_side_validation && resolution.nil? fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.pattern_recognition" end # resource path local_var_path = '/scan/pattern' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'resolution'] = resolution # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PatternRecognition' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.pattern_recognition", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#pattern_recognition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Major Press Releases Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire. @param symbol [String] Company
symbol. @param [Hash] opts the optional parameters @option opts [Date] :from From time: 2020-01-01. @option opts [Date] :to To time: 2020-01-05. @return [PressRelease]
# File lib/finnhub_ruby/api/default_api.rb, line 3196 def press_releases(symbol, opts = {}) data, _status_code, _headers = press_releases_with_http_info(symbol, opts) data end
Major Press Releases Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire. @param symbol [String] Company
symbol. @param [Hash] opts the optional parameters @option opts [Date] :from From time: 2020-01-01. @option opts [Date] :to To time: 2020-01-05. @return [Array<(PressRelease
, Integer, Hash)>] PressRelease
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3208 def press_releases_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.press_releases ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.press_releases" end # resource path local_var_path = '/press-releases' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PressRelease' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.press_releases", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#press_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Price Target Get latest price target consensus. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [PriceTarget]
# File lib/finnhub_ruby/api/default_api.rb, line 3264 def price_target(symbol, opts = {}) data, _status_code, _headers = price_target_with_http_info(symbol, opts) data end
Price Target Get latest price target consensus. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [Array<(PriceTarget
, Integer, Hash)>] PriceTarget
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3274 def price_target_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.price_target ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.price_target" end # resource path local_var_path = '/stock/price-target' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PriceTarget' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.price_target", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#price_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Quote
<p>Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time updates.</p><p>Real-time stock prices for international markets are supported for Enterprise clients via our partner's feed. <a href="Contact“>support@finnhub.io">Contact Us</a> to learn more.</p> @param symbol [String] Symbol @param [Hash] opts the optional parameters @return [Quote]
# File lib/finnhub_ruby/api/default_api.rb, line 3328 def quote(symbol, opts = {}) data, _status_code, _headers = quote_with_http_info(symbol, opts) data end
Quote
<p>Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time updates.</p><p>Real-time stock prices for international markets are supported for Enterprise clients via our partner's feed. <a href="support@finnhub.io">Contact Us</a> to learn more.</p> @param symbol [String] Symbol @param [Hash] opts the optional parameters @return [Array<(Quote
, Integer, Hash)>] Quote
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3338 def quote_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.quote ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.quote" end # resource path local_var_path = '/quote' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Quote' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.quote", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Recommendation Trends Get latest analyst recommendation trends for a company. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [Array<RecommendationTrend>]
# File lib/finnhub_ruby/api/default_api.rb, line 3392 def recommendation_trends(symbol, opts = {}) data, _status_code, _headers = recommendation_trends_with_http_info(symbol, opts) data end
Recommendation Trends Get latest analyst recommendation trends for a company. @param symbol [String] Symbol of the company: AAPL. @param [Hash] opts the optional parameters @return [Array<(Array<RecommendationTrend>, Integer, Hash)>] Array<RecommendationTrend> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3402 def recommendation_trends_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.recommendation_trends ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.recommendation_trends" end # resource path local_var_path = '/stock/recommendation' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<RecommendationTrend>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.recommendation_trends", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#recommendation_trends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Revenue Breakdown Get revenue breakdown by product. This dataset is only available for US companies which disclose their revenue breakdown in the annual or quarterly reports. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. @option opts [String] :cik CIK. @return [RevenueBreakdown]
# File lib/finnhub_ruby/api/default_api.rb, line 3457 def revenue_breakdown(opts = {}) data, _status_code, _headers = revenue_breakdown_with_http_info(opts) data end
Revenue Breakdown Get revenue breakdown by product. This dataset is only available for US companies which disclose their revenue breakdown in the annual or quarterly reports. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. @option opts [String] :cik CIK. @return [Array<(RevenueBreakdown
, Integer, Hash)>] RevenueBreakdown
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3468 def revenue_breakdown_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.revenue_breakdown ...' end # resource path local_var_path = '/stock/revenue-breakdown' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RevenueBreakdown' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.revenue_breakdown", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#revenue_breakdown\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Similarity Index <p>Calculate the textual difference between a company's 10-K / 10-Q reports and the same type of report in the previous year using Cosine Similarity. For example, this endpoint compares 2019's 10-K with 2018's 10-K. Companies breaking from its routines in disclosure of financial condition and risk analysis section can signal a significant change in the company's stock price in the upcoming 4 quarters.</p> @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. Required if cik is empty @option opts [String] :cik CIK. Required if symbol is empty @option opts [String] :freq <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code> @return [SimilarityIndex]
# File lib/finnhub_ruby/api/default_api.rb, line 3521 def similarity_index(opts = {}) data, _status_code, _headers = similarity_index_with_http_info(opts) data end
Similarity Index <p>Calculate the textual difference between a company's 10-K / 10-Q reports and the same type of report in the previous year using Cosine Similarity. For example, this endpoint compares 2019's 10-K with 2018's 10-K. Companies breaking from its routines in disclosure of financial condition and risk analysis section can signal a significant change in the company's stock price in the upcoming 4 quarters.</p> @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol. Required if cik is empty @option opts [String] :cik CIK. Required if symbol is empty @option opts [String] :freq <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code> @return [Array<(SimilarityIndex
, Integer, Hash)>] SimilarityIndex
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3533 def similarity_index_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.similarity_index ...' end # resource path local_var_path = '/stock/similarity-index' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'cik'] = opts[:'cik'] if !opts[:'cik'].nil? query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SimilarityIndex' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.similarity_index", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#similarity_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Dividends
2 (Basic) Get global dividends data. @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [Dividends2]
# File lib/finnhub_ruby/api/default_api.rb, line 3655 def stock_basic_dividends(symbol, opts = {}) data, _status_code, _headers = stock_basic_dividends_with_http_info(symbol, opts) data end
Dividends
2 (Basic) Get global dividends data. @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [Array<(Dividends2
, Integer, Hash)>] Dividends2
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3665 def stock_basic_dividends_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_basic_dividends ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_basic_dividends" end # resource path local_var_path = '/stock/dividend2' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Dividends2' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_basic_dividends", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_basic_dividends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Last Bid-Ask Get last bid/ask data for US stocks. @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [LastBidAsk]
# File lib/finnhub_ruby/api/default_api.rb, line 3719 def stock_bidask(symbol, opts = {}) data, _status_code, _headers = stock_bidask_with_http_info(symbol, opts) data end
Last Bid-Ask Get last bid/ask data for US stocks. @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [Array<(LastBidAsk
, Integer, Hash)>] LastBidAsk
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3729 def stock_bidask_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_bidask ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_bidask" end # resource path local_var_path = '/stock/bidask' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LastBidAsk' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_bidask", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_bidask\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Stock
Candles <p>Get candlestick data (OHLCV) for stocks.</p><p>Daily data will be adjusted for Splits. Intraday data will remain unadjusted.</p> @param symbol [String] Symbol. @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param [Hash] opts the optional parameters @return [StockCandles]
# File lib/finnhub_ruby/api/default_api.rb, line 3786 def stock_candles(symbol, resolution, from, to, opts = {}) data, _status_code, _headers = stock_candles_with_http_info(symbol, resolution, from, to, opts) data end
Stock
Candles <p>Get candlestick data (OHLCV) for stocks.</p><p>Daily data will be adjusted for Splits. Intraday data will remain unadjusted.</p> @param symbol [String] Symbol. @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param [Hash] opts the optional parameters @return [Array<(StockCandles
, Integer, Hash)>] StockCandles
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3799 def stock_candles_with_http_info(symbol, resolution, from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_candles ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_candles" end # verify the required parameter 'resolution' is set if @api_client.config.client_side_validation && resolution.nil? fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.stock_candles" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_candles" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_candles" end # resource path local_var_path = '/stock/candle' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'resolution'] = resolution query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'StockCandles' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_candles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_candles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Dividends
Get dividends data for common stocks going back 30 years. @param symbol [String] Symbol. @param from [Date] YYYY-MM-DD. @param to [Date] YYYY-MM-DD. @param [Hash] opts the optional parameters @return [Array<Dividends>]
# File lib/finnhub_ruby/api/default_api.rb, line 3870 def stock_dividends(symbol, from, to, opts = {}) data, _status_code, _headers = stock_dividends_with_http_info(symbol, from, to, opts) data end
Dividends
Get dividends data for common stocks going back 30 years. @param symbol [String] Symbol. @param from [Date] YYYY-MM-DD. @param to [Date] YYYY-MM-DD. @param [Hash] opts the optional parameters @return [Array<(Array<Dividends>, Integer, Hash)>] Array<Dividends> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3882 def stock_dividends_with_http_info(symbol, from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_dividends ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_dividends" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_dividends" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_dividends" end # resource path local_var_path = '/stock/dividend' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Dividends>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_dividends", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_dividends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Historical NBBO <p>Get historical best bid and offer for US stocks, LSE, TSX, Euronext and Deutsche Borse.</p><p>For US market, this endpoint only serves historical NBBO from the beginning of 2020. To download more historical data, please visit our bulk download page in the Dashboard <a target="_blank" href="/dashboard/download",>here</a>.</p> @param symbol [String] Symbol. @param date [Date] Date: 2020-04-02. @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code> @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data. @param [Hash] opts the optional parameters @return [HistoricalNBBO]
# File lib/finnhub_ruby/api/default_api.rb, line 3949 def stock_nbbo(symbol, date, limit, skip, opts = {}) data, _status_code, _headers = stock_nbbo_with_http_info(symbol, date, limit, skip, opts) data end
Historical NBBO <p>Get historical best bid and offer for US stocks, LSE, TSX, Euronext and Deutsche Borse.</p><p>For US market, this endpoint only serves historical NBBO from the beginning of 2020. To download more historical data, please visit our bulk download page in the Dashboard <a target="_blank" href="/dashboard/download",>here</a>.</p> @param symbol [String] Symbol. @param date [Date] Date: 2020-04-02. @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code> @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data. @param [Hash] opts the optional parameters @return [Array<(HistoricalNBBO
, Integer, Hash)>] HistoricalNBBO
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 3962 def stock_nbbo_with_http_info(symbol, date, limit, skip, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_nbbo ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_nbbo" 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 DefaultApi.stock_nbbo" end # verify the required parameter 'limit' is set if @api_client.config.client_side_validation && limit.nil? fail ArgumentError, "Missing the required parameter 'limit' when calling DefaultApi.stock_nbbo" end # verify the required parameter 'skip' is set if @api_client.config.client_side_validation && skip.nil? fail ArgumentError, "Missing the required parameter 'skip' when calling DefaultApi.stock_nbbo" end # resource path local_var_path = '/stock/bbo' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'date'] = date query_params[:'limit'] = limit query_params[:'skip'] = skip # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'HistoricalNBBO' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_nbbo", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_nbbo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Splits Get splits data for stocks. @param symbol [String] Symbol. @param from [Date] YYYY-MM-DD. @param to [Date] YYYY-MM-DD. @param [Hash] opts the optional parameters @return [Array<Split>]
# File lib/finnhub_ruby/api/default_api.rb, line 4033 def stock_splits(symbol, from, to, opts = {}) data, _status_code, _headers = stock_splits_with_http_info(symbol, from, to, opts) data end
Splits Get splits data for stocks. @param symbol [String] Symbol. @param from [Date] YYYY-MM-DD. @param to [Date] YYYY-MM-DD. @param [Hash] opts the optional parameters @return [Array<(Array<Split>, Integer, Hash)>] Array<Split> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4045 def stock_splits_with_http_info(symbol, from, to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_splits ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_splits" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_splits" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_splits" end # resource path local_var_path = '/stock/split' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'from'] = from query_params[:'to'] = to # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Split>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_splits", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_splits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Stock
Symbol List supported stocks. We use the following symbology to identify stocks on Finnhub Exchange_Ticker.Exchange_Code
. A list of supported exchange codes can be found <a href="docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing" target="_blank">here</a>. A list of supported CFD Indices can be found <a href="docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp=sharing" target="_blank">here</a>. @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href="docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing" target="_blank">here</a>. @param [Hash] opts the optional parameters @option opts [String] :mic Filter by MIC code. @option opts [String] :security_type Filter by security type used by OpenFigi standard. @option opts [String] :currency Filter by currency. @return [Array<StockSymbol>]
# File lib/finnhub_ruby/api/default_api.rb, line 4112 def stock_symbols(exchange, opts = {}) data, _status_code, _headers = stock_symbols_with_http_info(exchange, opts) data end
Stock
Symbol List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href="docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing" target="_blank">here</a>. A list of supported CFD Indices can be found <a href="docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp=sharing" target="_blank">here</a>. @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href="docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing" target="_blank">here</a>. @param [Hash] opts the optional parameters @option opts [String] :mic Filter by MIC code. @option opts [String] :security_type Filter by security type used by OpenFigi standard. @option opts [String] :currency Filter by currency. @return [Array<(Array<StockSymbol>, Integer, Hash)>] Array<StockSymbol> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4125 def stock_symbols_with_http_info(exchange, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_symbols ...' end # verify the required parameter 'exchange' is set if @api_client.config.client_side_validation && exchange.nil? fail ArgumentError, "Missing the required parameter 'exchange' when calling DefaultApi.stock_symbols" end # resource path local_var_path = '/stock/symbol' # query parameters query_params = opts[:query_params] || {} query_params[:'exchange'] = exchange query_params[:'mic'] = opts[:'mic'] if !opts[:'mic'].nil? query_params[:'securityType'] = opts[:'security_type'] if !opts[:'security_type'].nil? query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<StockSymbol>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_symbols", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Tick Data <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href="https://tick.finnhub.io/tick.finnhub.io/">https://tick.finnhub.io/> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target="_blank" href="/dashboard/download",>here</a> to speed up the download process.</p><p>Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. </p><table class="table table-hover"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class="text-blue">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class="text-blue">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class="text-blue">LSE</th> <td><ul><li>London Stock
Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class="text-blue">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class="text-blue">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class="text-blue">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table> @param symbol [String] Symbol. @param date [Date] Date: 2020-04-02. @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code> @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data. @param [Hash] opts the optional parameters @return [TickData]
# File lib/finnhub_ruby/api/default_api.rb, line 4185 def stock_tick(symbol, date, limit, skip, opts = {}) data, _status_code, _headers = stock_tick_with_http_info(symbol, date, limit, skip, opts) data end
Tick Data <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href="tick.finnhub.io/">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target="_blank" href="/dashboard/download",>here</a> to speed up the download process.</p><p>Note that for Nasdaq Nordic and Baltic, you need to use ISIN instead of symbol to query tick data. </p><table class="table table-hover"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class="text-blue">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class="text-blue">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class="text-blue">LSE</th> <td><ul><li>London Stock
Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class="text-blue">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class="text-blue">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class="text-blue">Nasdaq Nordic & Baltic</th> <td> <ul> <li>Copenhagen (CO)</li> <li>Stockholm (ST)</li> <li>Helsinki (HE)</li> <li>Iceland (IC)</li> <li>Riga (RG)</li> <li>Tallinn (TL)</li> <li>Vilnius(VS)</li> <li>Fixed Income</li> <li>Derivatives</li> <li>Commodities</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table> @param symbol [String] Symbol. @param date [Date] Date: 2020-04-02. @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code> @param skip [Integer] Number of ticks to skip. Use this parameter to loop through the entire data. @param [Hash] opts the optional parameters @return [Array<(TickData
, Integer, Hash)>] TickData
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4198 def stock_tick_with_http_info(symbol, date, limit, skip, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.stock_tick ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_tick" 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 DefaultApi.stock_tick" end # verify the required parameter 'limit' is set if @api_client.config.client_side_validation && limit.nil? fail ArgumentError, "Missing the required parameter 'limit' when calling DefaultApi.stock_tick" end # verify the required parameter 'skip' is set if @api_client.config.client_side_validation && skip.nil? fail ArgumentError, "Missing the required parameter 'skip' when calling DefaultApi.stock_tick" end # resource path local_var_path = '/stock/tick' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'date'] = date query_params[:'limit'] = limit query_params[:'skip'] = skip # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TickData' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.stock_tick", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#stock_tick\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Supply Chain Relationships <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p><p>We currently cover data for S&P500 and Nasdaq 100 companies.</p> @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [SupplyChainRelationships]
# File lib/finnhub_ruby/api/default_api.rb, line 4267 def supply_chain_relationships(symbol, opts = {}) data, _status_code, _headers = supply_chain_relationships_with_http_info(symbol, opts) data end
Supply Chain Relationships <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p><p>We currently cover data for S&P500 and Nasdaq 100 companies.</p> @param symbol [String] Symbol. @param [Hash] opts the optional parameters @return [Array<(SupplyChainRelationships
, Integer, Hash)>] SupplyChainRelationships
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4277 def supply_chain_relationships_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.supply_chain_relationships ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.supply_chain_relationships" end # resource path local_var_path = '/stock/supply-chain' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SupplyChainRelationships' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.supply_chain_relationships", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#supply_chain_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Support/Resistance Get support and resistance levels for a symbol. @param symbol [String] Symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param [Hash] opts the optional parameters @return [SupportResistance]
# File lib/finnhub_ruby/api/default_api.rb, line 4332 def support_resistance(symbol, resolution, opts = {}) data, _status_code, _headers = support_resistance_with_http_info(symbol, resolution, opts) data end
Support/Resistance Get support and resistance levels for a symbol. @param symbol [String] Symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param [Hash] opts the optional parameters @return [Array<(SupportResistance
, Integer, Hash)>] SupportResistance
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4343 def support_resistance_with_http_info(symbol, resolution, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.support_resistance ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.support_resistance" end # verify the required parameter 'resolution' is set if @api_client.config.client_side_validation && resolution.nil? fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.support_resistance" end # resource path local_var_path = '/scan/support-resistance' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'resolution'] = resolution # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SupportResistance' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.support_resistance", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#support_resistance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Symbol Lookup Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip. @param q [String] Query text can be symbol, name, isin, or cusip. @param [Hash] opts the optional parameters @return [SymbolLookup]
# File lib/finnhub_ruby/api/default_api.rb, line 4402 def symbol_search(q, opts = {}) data, _status_code, _headers = symbol_search_with_http_info(q, opts) data end
Symbol Lookup Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip. @param q [String] Query text can be symbol, name, isin, or cusip. @param [Hash] opts the optional parameters @return [Array<(SymbolLookup
, Integer, Hash)>] SymbolLookup
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4412 def symbol_search_with_http_info(q, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.symbol_search ...' end # verify the required parameter 'q' is set if @api_client.config.client_side_validation && q.nil? fail ArgumentError, "Missing the required parameter 'q' when calling DefaultApi.symbol_search" end # resource path local_var_path = '/search' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = q # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SymbolLookup' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.symbol_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#symbol_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Technical Indicators Return technical indicator with price data. List of supported indicators can be found <a href="docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">here</a>. @param symbol [String] symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param indicator [String] Indicator
name. Full list can be found <a href="docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">here</a>. @param [Hash] opts the optional parameters @option opts [Object] :indicator_fields Check out <a href="docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">this page</a> to see which indicators and params are supported. @return [Object]
# File lib/finnhub_ruby/api/default_api.rb, line 4471 def technical_indicator(symbol, resolution, from, to, indicator, opts = {}) data, _status_code, _headers = technical_indicator_with_http_info(symbol, resolution, from, to, indicator, opts) data end
Technical Indicators Return technical indicator with price data. List of supported indicators can be found <a href="docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">here</a>. @param symbol [String] symbol @param resolution [String] Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange. @param from [Integer] UNIX timestamp. Interval initial value. @param to [Integer] UNIX timestamp. Interval end value. @param indicator [String] Indicator
name. Full list can be found <a href="docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">here</a>. @param [Hash] opts the optional parameters @option opts [Object] :indicator_fields Check out <a href="docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">this page</a> to see which indicators and params are supported. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4486 def technical_indicator_with_http_info(symbol, resolution, from, to, indicator, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.technical_indicator ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.technical_indicator" end # verify the required parameter 'resolution' is set if @api_client.config.client_side_validation && resolution.nil? fail ArgumentError, "Missing the required parameter 'resolution' when calling DefaultApi.technical_indicator" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.technical_indicator" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.technical_indicator" end # verify the required parameter 'indicator' is set if @api_client.config.client_side_validation && indicator.nil? fail ArgumentError, "Missing the required parameter 'indicator' when calling DefaultApi.technical_indicator" end # resource path local_var_path = '/indicator' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol query_params[:'resolution'] = resolution query_params[:'from'] = from query_params[:'to'] = to query_params[:'indicator'] = indicator # header parameters header_params = opts[: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 = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'indicator_fields']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.technical_indicator", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#technical_indicator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Earnings Call Transcripts <p>Get earnings call transcripts, audio and participants' list. This endpoint is only available for US, UK, and Candian companies. <p>15+ years of data is available with 220,000+ audio which add up to 7TB in size.</p> @param id [String] Transcript's id obtained with <a href="#transcripts-list">Transcripts List endpoint</a>. @param [Hash] opts the optional parameters @return [EarningsCallTranscripts]
# File lib/finnhub_ruby/api/default_api.rb, line 4562 def transcripts(id, opts = {}) data, _status_code, _headers = transcripts_with_http_info(id, opts) data end
Earnings Call Transcripts List List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies. @param symbol [String] Company
symbol: AAPL. Leave empty to list the latest transcripts @param [Hash] opts the optional parameters @return [EarningsCallTranscriptsList]
# File lib/finnhub_ruby/api/default_api.rb, line 4626 def transcripts_list(symbol, opts = {}) data, _status_code, _headers = transcripts_list_with_http_info(symbol, opts) data end
Earnings Call Transcripts List List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies. @param symbol [String] Company
symbol: AAPL. Leave empty to list the latest transcripts @param [Hash] opts the optional parameters @return [Array<(EarningsCallTranscriptsList
, Integer, Hash)>] EarningsCallTranscriptsList
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4636 def transcripts_list_with_http_info(symbol, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transcripts_list ...' end # verify the required parameter 'symbol' is set if @api_client.config.client_side_validation && symbol.nil? fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.transcripts_list" end # resource path local_var_path = '/stock/transcripts/list' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = symbol # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EarningsCallTranscriptsList' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.transcripts_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transcripts_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Earnings Call Transcripts <p>Get earnings call transcripts, audio and participants' list. This endpoint is only available for US, UK, and Candian companies. <p>15+ years of data is available with 220,000+ audio which add up to 7TB in size.</p> @param id [String] Transcript's id obtained with <a href="#transcripts-list">Transcripts List endpoint</a>. @param [Hash] opts the optional parameters @return [Array<(EarningsCallTranscripts
, Integer, Hash)>] EarningsCallTranscripts
data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4572 def transcripts_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.transcripts ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.transcripts" end # resource path local_var_path = '/stock/transcripts' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EarningsCallTranscripts' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.transcripts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#transcripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Stock
Upgrade/Downgrade Get latest stock upgrade and downgrade. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol of the company: AAPL. If left blank, the API will return latest stock upgrades/downgrades. @option opts [Date] :from From date: 2000-03-15. @option opts [Date] :to To date: 2020-03-16. @return [Array<UpgradeDowngrade>]
# File lib/finnhub_ruby/api/default_api.rb, line 4692 def upgrade_downgrade(opts = {}) data, _status_code, _headers = upgrade_downgrade_with_http_info(opts) data end
Stock
Upgrade/Downgrade Get latest stock upgrade and downgrade. @param [Hash] opts the optional parameters @option opts [String] :symbol Symbol of the company: AAPL. If left blank, the API will return latest stock upgrades/downgrades. @option opts [Date] :from From date: 2000-03-15. @option opts [Date] :to To date: 2020-03-16. @return [Array<(Array<UpgradeDowngrade>, Integer, Hash)>] Array<UpgradeDowngrade> data, response status code and response headers
# File lib/finnhub_ruby/api/default_api.rb, line 4704 def upgrade_downgrade_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.upgrade_downgrade ...' end # resource path local_var_path = '/stock/upgrade-downgrade' # query parameters query_params = opts[:query_params] || {} query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<UpgradeDowngrade>' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] new_options = opts.merge( :operation => :"DefaultApi.upgrade_downgrade", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#upgrade_downgrade\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end