Class: Intrinio::CompanyApi

Inherits:
Object
  • Object
show all
Defined in:
lib/intrinio-sdk/api/company_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CompanyApi

Returns a new instance of CompanyApi.



19
20
21
# File 'lib/intrinio-sdk/api/company_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/intrinio-sdk/api/company_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_all_companies(opts = {}) ⇒ ApiResponseCompanies

All Companies Returns all Companies. When parameters are specified, returns matching companies.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :latest_filing_date (Date)

    Return companies whose latest 10-Q or 10-K was filed on or after this date

  • :sic (String)

    Return companies with the given Standard Industrial Classification code

  • :template (String)

    Return companies with the given financial statement template

  • :sector (String)

    Return companies in the given industry sector

  • :industry_category (String)

    Return companies in the given industry category

  • :industry_group (String)

    Return companies in the given industry group

  • :has_fundamentals (BOOLEAN)

    Return only companies that have fundamentals when true

  • :has_stock_prices (BOOLEAN)

    Return only companies that have stock prices when true

  • :thea_enabled (BOOLEAN)

    Return companies whose have been read by our Thea NLP and are ready for our company answers endpoint

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



38
39
40
41
# File 'lib/intrinio-sdk/api/company_api.rb', line 38

def get_all_companies(opts = {})
  data, _status_code, _headers = get_all_companies_with_http_info(opts)
  return data
end

#get_all_companies_daily_metrics(opts = {}) ⇒ ApiResponseCompanyDailyMetrics

All Companies daily metrics Returns the company metrics for a date.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :on_date (Date)

    Date of the metric

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



118
119
120
121
# File 'lib/intrinio-sdk/api/company_api.rb', line 118

def get_all_companies_daily_metrics(opts = {})
  data, _status_code, _headers = get_all_companies_daily_metrics_with_http_info(opts)
  return data
end

#get_all_companies_daily_metrics_with_http_info(opts = {}) ⇒ Array<(ApiResponseCompanyDailyMetrics, Fixnum, Hash)>

All Companies daily metrics Returns the company metrics for a date.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :on_date (Date)

    Date of the metric

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/intrinio-sdk/api/company_api.rb', line 131

def get_all_companies_daily_metrics_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_all_companies_daily_metrics ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_all_companies_daily_metrics, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/daily_metrics"

  # query parameters
  query_params = {}
  query_params[:'on_date'] = opts[:'on_date'] if !opts[:'on_date'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
  query_params[:'next_page'] = opts[:'next_page2'] if !opts[:'next_page2'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyDailyMetrics')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_all_companies_daily_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_companies_with_http_info(opts = {}) ⇒ Array<(ApiResponseCompanies, Fixnum, Hash)>

All Companies Returns all Companies. When parameters are specified, returns matching companies.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :latest_filing_date (Date)

    Return companies whose latest 10-Q or 10-K was filed on or after this date

  • :sic (String)

    Return companies with the given Standard Industrial Classification code

  • :template (String)

    Return companies with the given financial statement template

  • :sector (String)

    Return companies in the given industry sector

  • :industry_category (String)

    Return companies in the given industry category

  • :industry_group (String)

    Return companies in the given industry group

  • :has_fundamentals (BOOLEAN)

    Return only companies that have fundamentals when true

  • :has_stock_prices (BOOLEAN)

    Return only companies that have stock prices when true

  • :thea_enabled (BOOLEAN)

    Return companies whose have been read by our Thea NLP and are ready for our company answers endpoint

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(ApiResponseCompanies, Fixnum, Hash)>)

    ApiResponseCompanies data, response status code and response headers



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/intrinio-sdk/api/company_api.rb', line 58

def get_all_companies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_all_companies ..."
  end
  if @api_client.config.client_side_validation && opts[:'template'] && !['indu', 'fin'].include?(opts[:'template'])
    fail ArgumentError, 'invalid value for "template", must be one of indu, fin'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_all_companies, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies"

  # query parameters
  query_params = {}
  query_params[:'latest_filing_date'] = opts[:'latest_filing_date'] if !opts[:'latest_filing_date'].nil?
  query_params[:'sic'] = opts[:'sic'] if !opts[:'sic'].nil?
  query_params[:'template'] = opts[:'template'] if !opts[:'template'].nil?
  query_params[:'sector'] = opts[:'sector'] if !opts[:'sector'].nil?
  query_params[:'industry_category'] = opts[:'industry_category'] if !opts[:'industry_category'].nil?
  query_params[:'industry_group'] = opts[:'industry_group'] if !opts[:'industry_group'].nil?
  query_params[:'has_fundamentals'] = opts[:'has_fundamentals'] if !opts[:'has_fundamentals'].nil?
  query_params[:'has_stock_prices'] = opts[:'has_stock_prices'] if !opts[:'has_stock_prices'].nil?
  query_params[:'thea_enabled'] = opts[:'thea_enabled'] if !opts[:'thea_enabled'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanies')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_all_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_company_news(opts = {}) ⇒ ApiResponseNews

All News Returns the latest news article links, headlines and summaries for all US traded companies allowing you to keep a pulse on companies and their business operations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :specific_source (String)

    Only news from this source. Defaults to highest available if not present.

  • :page_size (Integer)

    The maximum number of results to return. (default to 100)

  • :sentiment (String)

    Filter by sentiment. Unsupported for yahoo source.

  • :topic (String)

    Filter by topic. Unsupported for yahoo source.

  • :company (String)

    Filter by &#x60;company&#x60; identifier (ticker, CIK, LEI, Intrinio ID)

  • :security (String)

    Filter by &#x60;security&#x60; identifier (ticker, figi, isin, cusip, Intrinio ID). Unsupported for yahoo source.

  • :start_date (Date)

    Limit news stories to those on or after this date. Defaults to yesterday if unspecified.

  • :end_date (Date)

    Limit news stories to those on or before this date.

  • :language (String)

    Filter by language. Unsupported for yahoo source.

  • :word_count_greater_than (Integer)

    News stories will have a word count greater than this value. Unsupported for yahoo source.

  • :word_count_less_than (Integer)

    News stories will have a word count less than this value. Unsupported for yahoo source.

  • :is_spam (BOOLEAN)

    Filter whether it is marked as spam or not. Unsupported for yahoo source.

  • :business_relevance_greater_than (Float)

    News stories will have a business relevance score more than this value. Unsupported for yahoo source.

  • :business_relevance_less_than (Float)

    News stories will have a business relevance score less than this value. Unsupported for yahoo source.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



192
193
194
195
# File 'lib/intrinio-sdk/api/company_api.rb', line 192

def get_all_company_news(opts = {})
  data, _status_code, _headers = get_all_company_news_with_http_info(opts)
  return data
end

#get_all_company_news_with_http_info(opts = {}) ⇒ Array<(ApiResponseNews, Fixnum, Hash)>

All News Returns the latest news article links, headlines and summaries for all US traded companies allowing you to keep a pulse on companies and their business operations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :specific_source (String)

    Only news from this source. Defaults to highest available if not present.

  • :page_size (Integer)

    The maximum number of results to return.

  • :sentiment (String)

    Filter by sentiment. Unsupported for yahoo source.

  • :topic (String)

    Filter by topic. Unsupported for yahoo source.

  • :company (String)

    Filter by &#x60;company&#x60; identifier (ticker, CIK, LEI, Intrinio ID)

  • :security (String)

    Filter by &#x60;security&#x60; identifier (ticker, figi, isin, cusip, Intrinio ID). Unsupported for yahoo source.

  • :start_date (Date)

    Limit news stories to those on or after this date. Defaults to yesterday if unspecified.

  • :end_date (Date)

    Limit news stories to those on or before this date.

  • :language (String)

    Filter by language. Unsupported for yahoo source.

  • :word_count_greater_than (Integer)

    News stories will have a word count greater than this value. Unsupported for yahoo source.

  • :word_count_less_than (Integer)

    News stories will have a word count less than this value. Unsupported for yahoo source.

  • :is_spam (BOOLEAN)

    Filter whether it is marked as spam or not. Unsupported for yahoo source.

  • :business_relevance_greater_than (Float)

    News stories will have a business relevance score more than this value. Unsupported for yahoo source.

  • :business_relevance_less_than (Float)

    News stories will have a business relevance score less than this value. Unsupported for yahoo source.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(ApiResponseNews, Fixnum, Hash)>)

    ApiResponseNews data, response status code and response headers



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/intrinio-sdk/api/company_api.rb', line 216

def get_all_company_news_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_all_company_news ..."
  end
  if @api_client.config.client_side_validation && opts[:'specific_source'] && !['yahoo', 'moody', 'moody_us_news', 'moody_us_press_releases'].include?(opts[:'specific_source'])
    fail ArgumentError, 'invalid value for "specific_source", must be one of yahoo, moody, moody_us_news, moody_us_press_releases'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_all_company_news, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && opts[:'sentiment'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment'])
    fail ArgumentError, 'invalid value for "sentiment", must be one of positive, neutral, negative'
  end
  # resource path
  local_var_path = "/companies/news"

  # query parameters
  query_params = {}
  query_params[:'specific_source'] = opts[:'specific_source'] if !opts[:'specific_source'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'sentiment'] = opts[:'sentiment'] if !opts[:'sentiment'].nil?
  query_params[:'topic'] = opts[:'topic'] if !opts[:'topic'].nil?
  query_params[:'company'] = opts[:'company'] if !opts[:'company'].nil?
  query_params[:'security'] = opts[:'security'] if !opts[:'security'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'word_count_greater_than'] = opts[:'word_count_greater_than'] if !opts[:'word_count_greater_than'].nil?
  query_params[:'word_count_less_than'] = opts[:'word_count_less_than'] if !opts[:'word_count_less_than'].nil?
  query_params[:'is_spam'] = opts[:'is_spam'] if !opts[:'is_spam'].nil?
  query_params[:'business_relevance_greater_than'] = opts[:'business_relevance_greater_than'] if !opts[:'business_relevance_greater_than'].nil?
  query_params[:'business_relevance_less_than'] = opts[:'business_relevance_less_than'] if !opts[:'business_relevance_less_than'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseNews')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_all_company_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company(identifier, opts = {}) ⇒ Company

Lookup Company Returns company reference and metadata such as tickers, CIK, and a unique company identifier, as well as company metadata such as business description, employee count, and company URL.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



280
281
282
283
# File 'lib/intrinio-sdk/api/company_api.rb', line 280

def get_company(identifier, opts = {})
  data, _status_code, _headers = get_company_with_http_info(identifier, opts)
  return data
end

#get_company_answers(identifier, query, opts = {}) ⇒ ApiResponseCompanyAnswers

Company Answers Returns answers for a question about the Company with the given ‘identifier`

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • query

    The query to ask the Thea API

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



334
335
336
337
# File 'lib/intrinio-sdk/api/company_api.rb', line 334

def get_company_answers(identifier, query, opts = {})
  data, _status_code, _headers = get_company_answers_with_http_info(identifier, query, opts)
  return data
end

#get_company_answers_with_http_info(identifier, query, opts = {}) ⇒ Array<(ApiResponseCompanyAnswers, Fixnum, Hash)>

Company Answers Returns answers for a question about the Company with the given &#x60;identifier&#x60;

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • query

    The query to ask the Thea API

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiResponseCompanyAnswers, Fixnum, Hash)>)

    ApiResponseCompanyAnswers data, response status code and response headers



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/intrinio-sdk/api/company_api.rb', line 345

def get_company_answers_with_http_info(identifier, query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_answers ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_answers"
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling CompanyApi.get_company_answers"
  end
  # resource path
  local_var_path = "/companies/{identifier}/answers".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'query'] = query

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyAnswers')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_answers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_daily_metrics(identifier, opts = {}) ⇒ ApiResponseCompanyDailyMetrics

Company metrics by Company Returns the latest company metrics.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :on_date (Date)

    Date of the metric

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



397
398
399
400
# File 'lib/intrinio-sdk/api/company_api.rb', line 397

def get_company_daily_metrics(identifier, opts = {})
  data, _status_code, _headers = get_company_daily_metrics_with_http_info(identifier, opts)
  return data
end

#get_company_daily_metrics_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseCompanyDailyMetrics, Fixnum, Hash)>

Company metrics by Company Returns the latest company metrics.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :on_date (Date)

    Date of the metric

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/intrinio-sdk/api/company_api.rb', line 411

def get_company_daily_metrics_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_daily_metrics ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_daily_metrics"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_company_daily_metrics, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/daily_metrics".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'on_date'] = opts[:'on_date'] if !opts[:'on_date'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
  query_params[:'next_page'] = opts[:'next_page2'] if !opts[:'next_page2'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyDailyMetrics')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_daily_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_data_point_number(identifier, tag, opts = {}) ⇒ Float

Data Point (Number) for Company Returns latest value for calculations, metrics, and financial data points for a company.

Parameters:

Returns:

  • (Float)


463
464
465
466
# File 'lib/intrinio-sdk/api/company_api.rb', line 463

def get_company_data_point_number(identifier, tag, opts = {})
  data, _status_code, _headers = get_company_data_point_number_with_http_info(identifier, tag, opts)
  return data
end

#get_company_data_point_number_with_http_info(identifier, tag, opts = {}) ⇒ Array<(Float, Fixnum, Hash)>

Data Point (Number) for Company Returns latest value for calculations, metrics, and financial data points for a company.

Parameters:

Returns:

  • (Array<(Float, Fixnum, Hash)>)

    Float data, response status code and response headers



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/intrinio-sdk/api/company_api.rb', line 474

def get_company_data_point_number_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_data_point_number ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_data_point_number"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_data_point_number"
  end
  # resource path
  local_var_path = "/companies/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Float')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_data_point_text(identifier, tag, opts = {}) ⇒ String

Data Point (Text) for Company Returns latest value for metadata items for a company.

Parameters:

Returns:

  • (String)


522
523
524
525
# File 'lib/intrinio-sdk/api/company_api.rb', line 522

def get_company_data_point_text(identifier, tag, opts = {})
  data, _status_code, _headers = get_company_data_point_text_with_http_info(identifier, tag, opts)
  return data
end

#get_company_data_point_text_with_http_info(identifier, tag, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Data Point (Text) for Company Returns latest value for metadata items for a company.

Parameters:

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
# File 'lib/intrinio-sdk/api/company_api.rb', line 533

def get_company_data_point_text_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_data_point_text ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_data_point_text"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_data_point_text"
  end
  # resource path
  local_var_path = "/companies/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_filings(identifier, opts = {}) ⇒ ApiResponseCompanyFilings

All Filings by Company Returns a complete list of SEC filings for the Company with the given ‘identifier`

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :report_type (String)

    Filter by &lt;a href&#x3D;&quot;docs.intrinio.com/documentation/sec_filing_report_types&quot; target&#x3D;&quot;_blank&quot;&gt;report type&lt;/a&gt;. Separate values with commas to return multiple report types.

  • :start_date (Date)

    Filed on or after the given date

  • :end_date (Date)

    Filed before or after the given date

  • :thea_enabled (BOOLEAN)

    Return filings that have been read by our Thea NLP and are ready for our answers endpoint

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



586
587
588
589
# File 'lib/intrinio-sdk/api/company_api.rb', line 586

def get_company_filings(identifier, opts = {})
  data, _status_code, _headers = get_company_filings_with_http_info(identifier, opts)
  return data
end

#get_company_filings_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseCompanyFilings, Fixnum, Hash)>

All Filings by Company Returns a complete list of SEC filings for the Company with the given &#x60;identifier&#x60;

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :report_type (String)

    Filter by &lt;a href&#x3D;&quot;docs.intrinio.com/documentation/sec_filing_report_types&quot; target&#x3D;&quot;_blank&quot;&gt;report type&lt;/a&gt;. Separate values with commas to return multiple report types.

  • :start_date (Date)

    Filed on or after the given date

  • :end_date (Date)

    Filed before or after the given date

  • :thea_enabled (BOOLEAN)

    Return filings that have been read by our Thea NLP and are ready for our answers endpoint

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(ApiResponseCompanyFilings, Fixnum, Hash)>)

    ApiResponseCompanyFilings data, response status code and response headers



602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'lib/intrinio-sdk/api/company_api.rb', line 602

def get_company_filings_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_filings ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_filings"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_company_filings, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/filings".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'report_type'] = opts[:'report_type'] if !opts[:'report_type'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'thea_enabled'] = opts[:'thea_enabled'] if !opts[:'thea_enabled'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyFilings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_filings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_fundamentals(identifier, opts = {}) ⇒ ApiResponseCompanyFundamentals

All Fundamentals by Company Returns a list of fundamentals with unique fundamental IDs associated with a particular company. Useful to obtain all historical and/or latest fundamental IDs for a given company to then use to loop through and pull all fundamental data available.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filed_after (Date)

    Filed on or after this date

  • :filed_before (Date)

    Filed on or before this date

  • :reported_only (BOOLEAN)

    Only as-reported fundamentals

  • :fiscal_year (Integer)

    Only for the given fiscal year

  • :statement_code (String)

    Only of the given statement code

  • :type (String)

    Only of the given type

  • :start_date (Date)

    Only on or after the given date

  • :end_date (Date)

    Only on or before the given date

  • :updated_after (Date)

    Only include fundamentals where it was updated after this date.

  • :updated_before (Date)

    Only include fundamentals where it was updated before this date.

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



667
668
669
670
# File 'lib/intrinio-sdk/api/company_api.rb', line 667

def get_company_fundamentals(identifier, opts = {})
  data, _status_code, _headers = get_company_fundamentals_with_http_info(identifier, opts)
  return data
end

#get_company_fundamentals_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseCompanyFundamentals, Fixnum, Hash)>

All Fundamentals by Company Returns a list of fundamentals with unique fundamental IDs associated with a particular company. Useful to obtain all historical and/or latest fundamental IDs for a given company to then use to loop through and pull all fundamental data available.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :filed_after (Date)

    Filed on or after this date

  • :filed_before (Date)

    Filed on or before this date

  • :reported_only (BOOLEAN)

    Only as-reported fundamentals

  • :fiscal_year (Integer)

    Only for the given fiscal year

  • :statement_code (String)

    Only of the given statement code

  • :type (String)

    Only of the given type

  • :start_date (Date)

    Only on or after the given date

  • :end_date (Date)

    Only on or before the given date

  • :updated_after (Date)

    Only include fundamentals where it was updated after this date.

  • :updated_before (Date)

    Only include fundamentals where it was updated before this date.

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/intrinio-sdk/api/company_api.rb', line 689

def get_company_fundamentals_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_fundamentals ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_fundamentals"
  end
  if @api_client.config.client_side_validation && opts[:'statement_code'] && !['income_statement', 'balance_sheet_statement', 'cash_flow_statement', 'calculations'].include?(opts[:'statement_code'])
    fail ArgumentError, 'invalid value for "statement_code", must be one of income_statement, balance_sheet_statement, cash_flow_statement, calculations'
  end
  if @api_client.config.client_side_validation && opts[:'type'] && !['QTR', 'YTD', 'FY', 'TTM'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of QTR, YTD, FY, TTM'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_company_fundamentals, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/fundamentals".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'filed_after'] = opts[:'filed_after'] if !opts[:'filed_after'].nil?
  query_params[:'filed_before'] = opts[:'filed_before'] if !opts[:'filed_before'].nil?
  query_params[:'reported_only'] = opts[:'reported_only'] if !opts[:'reported_only'].nil?
  query_params[:'fiscal_year'] = opts[:'fiscal_year'] if !opts[:'fiscal_year'].nil?
  query_params[:'statement_code'] = opts[:'statement_code'] if !opts[:'statement_code'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'updated_after'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
  query_params[:'updated_before'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyFundamentals')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_fundamentals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_historical_data(identifier, tag, opts = {}) ⇒ ApiResponseCompanyHistoricalData

Historical Data for Company Returns historical values for the given ‘tag` and the Company with the given `identifier`

Parameters:

Options Hash (opts):

  • :frequency (String)

    Return historical data in the given frequency (default to daily)

  • :type (String)

    Return historical data for given fiscal period type

  • :start_date (Date)

    Return historical data on or after this date

  • :end_date (Date)

    Return historical data on or before this date

  • :sort_order (String)

    Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc)

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



762
763
764
765
# File 'lib/intrinio-sdk/api/company_api.rb', line 762

def get_company_historical_data(identifier, tag, opts = {})
  data, _status_code, _headers = get_company_historical_data_with_http_info(identifier, tag, opts)
  return data
end

#get_company_historical_data_with_http_info(identifier, tag, opts = {}) ⇒ Array<(ApiResponseCompanyHistoricalData, Fixnum, Hash)>

Historical Data for Company Returns historical values for the given &#x60;tag&#x60; and the Company with the given &#x60;identifier&#x60;

Parameters:

Options Hash (opts):

  • :frequency (String)

    Return historical data in the given frequency

  • :type (String)

    Return historical data for given fiscal period type

  • :start_date (Date)

    Return historical data on or after this date

  • :end_date (Date)

    Return historical data on or before this date

  • :sort_order (String)

    Sort by date &#x60;asc&#x60; or &#x60;desc&#x60;

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'lib/intrinio-sdk/api/company_api.rb', line 780

def get_company_historical_data_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_historical_data ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_historical_data"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling CompanyApi.get_company_historical_data"
  end
  if @api_client.config.client_side_validation && opts[:'frequency'] && !['daily', 'weekly', 'monthly', 'quarterly', 'yearly'].include?(opts[:'frequency'])
    fail ArgumentError, 'invalid value for "frequency", must be one of daily, weekly, monthly, quarterly, yearly'
  end
  if @api_client.config.client_side_validation && opts[:'type'] && !['FY', 'QTR', 'TTM'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of FY, QTR, TTM'
  end
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_company_historical_data, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}
  query_params[:'frequency'] = opts[:'frequency'] if !opts[:'frequency'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyHistoricalData')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_ipos(opts = {}) ⇒ ApiResponseInitialPublicOfferings

IPOs Returns a list of historical, current, and upcoming initial public offerings (IPOs) across the major US Exchanges. Includes relevant information such as the IPO status, the offer amount, the total share count and target share price.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :ticker (String)

    Return IPOs with the given ticker (typically the IPO for the company)

  • :status (String)

    Return IPOs with the given status. Upcoming IPOs are scheduled to occur in the future. Priced IPOs have occurred and the company should be trading publicly. Withdrawn IPOs were planned to occurr but were withdrawn beforehand

  • :start_date (Date)

    Return IPOs on or after the given date

  • :end_date (Date)

    Return IPOs on or before the given date

  • :offer_amount_greater_than (Integer)

    Return IPOs with an offer dollar amount greater than the given amount

  • :offer_amount_less_than (Integer)

    Return IPOs with an offer dollar amount less than the given amount

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



854
855
856
857
# File 'lib/intrinio-sdk/api/company_api.rb', line 854

def get_company_ipos(opts = {})
  data, _status_code, _headers = get_company_ipos_with_http_info(opts)
  return data
end

#get_company_ipos_with_http_info(opts = {}) ⇒ Array<(ApiResponseInitialPublicOfferings, Fixnum, Hash)>

IPOs Returns a list of historical, current, and upcoming initial public offerings (IPOs) across the major US Exchanges. Includes relevant information such as the IPO status, the offer amount, the total share count and target share price.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :ticker (String)

    Return IPOs with the given ticker (typically the IPO for the company)

  • :status (String)

    Return IPOs with the given status. Upcoming IPOs are scheduled to occur in the future. Priced IPOs have occurred and the company should be trading publicly. Withdrawn IPOs were planned to occurr but were withdrawn beforehand

  • :start_date (Date)

    Return IPOs on or after the given date

  • :end_date (Date)

    Return IPOs on or before the given date

  • :offer_amount_greater_than (Integer)

    Return IPOs with an offer dollar amount greater than the given amount

  • :offer_amount_less_than (Integer)

    Return IPOs with an offer dollar amount less than the given amount

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
# File 'lib/intrinio-sdk/api/company_api.rb', line 871

def get_company_ipos_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_ipos ..."
  end
  if @api_client.config.client_side_validation && opts[:'status'] && !['upcoming', 'priced', 'withdrawn'].include?(opts[:'status'])
    fail ArgumentError, 'invalid value for "status", must be one of upcoming, priced, withdrawn'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_company_ipos, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/ipos"

  # query parameters
  query_params = {}
  query_params[:'ticker'] = opts[:'ticker'] if !opts[:'ticker'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'offer_amount_greater_than'] = opts[:'offer_amount_greater_than'] if !opts[:'offer_amount_greater_than'].nil?
  query_params[:'offer_amount_less_than'] = opts[:'offer_amount_less_than'] if !opts[:'offer_amount_less_than'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseInitialPublicOfferings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_ipos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_news(identifier, opts = {}) ⇒ ApiResponseCompanyNews

All News by Company Returns the latest and historical news article links, headlines and summaries for a specified US traded company.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :specific_source (String)

    Only news from this source. Defaults to highest available if not present.

  • :page_size (Integer)

    The maximum number of results to return (default to 100)

  • :sentiment (String)

    Filter by sentiment. Unsupported for yahoo source.

  • :topic (String)

    Filter by topic. Unsupported for yahoo source.

  • :security (String)

    Filter by &#x60;security&#x60; identifier (ticker, figi, isin, cusip, Intrinio ID). Unsupported for yahoo source.

  • :start_date (Date)

    Limit news stories to those on or after this date. Defaults to yesterday if unspecified.

  • :end_date (Date)

    Limit news stories to those on or before this date

  • :language (String)

    Filter by language. Unsupported for yahoo source.

  • :word_count_greater_than (Integer)

    News stories will have a word count greater than this value. Unsupported for yahoo source.

  • :word_count_less_than (Integer)

    News stories will have a word count less than this value. Unsupported for yahoo source.

  • :is_spam (BOOLEAN)

    Filter whether it is marked as spam or not. Unsupported for yahoo source.

  • :business_relevance_greater_than (Float)

    News stories will have a business relevance score more than this value. Unsupported for yahoo source.

  • :business_relevance_less_than (Float)

    News stories will have a business relevance score less than this value. Unsupported for yahoo source.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



939
940
941
942
# File 'lib/intrinio-sdk/api/company_api.rb', line 939

def get_company_news(identifier, opts = {})
  data, _status_code, _headers = get_company_news_with_http_info(identifier, opts)
  return data
end

#get_company_news_body(news_story_id, publication_date, opts = {}) ⇒ ApiResponseCompanyNewsBody

News Article Body Returns the body of a news article. This endpoint requires additional authorization beyond basic news access. Please see a representative for details.

Parameters:

  • news_story_id

    The identifier of the news story.

  • publication_date

    The DateTime of the story.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :specific_source (String)

    Only news from this source. Defaults to highest available if not present.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



1033
1034
1035
1036
# File 'lib/intrinio-sdk/api/company_api.rb', line 1033

def get_company_news_body(news_story_id, publication_date, opts = {})
  data, _status_code, _headers = get_company_news_body_with_http_info(news_story_id, publication_date, opts)
  return data
end

#get_company_news_body_with_http_info(news_story_id, publication_date, opts = {}) ⇒ Array<(ApiResponseCompanyNewsBody, Fixnum, Hash)>

News Article Body Returns the body of a news article. This endpoint requires additional authorization beyond basic news access. Please see a representative for details.

Parameters:

  • news_story_id

    The identifier of the news story.

  • publication_date

    The DateTime of the story.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :specific_source (String)

    Only news from this source. Defaults to highest available if not present.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(ApiResponseCompanyNewsBody, Fixnum, Hash)>)

    ApiResponseCompanyNewsBody data, response status code and response headers



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
# File 'lib/intrinio-sdk/api/company_api.rb', line 1046

def get_company_news_body_with_http_info(news_story_id, publication_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_news_body ..."
  end
  # verify the required parameter 'news_story_id' is set
  if @api_client.config.client_side_validation && news_story_id.nil?
    fail ArgumentError, "Missing the required parameter 'news_story_id' when calling CompanyApi.get_company_news_body"
  end
  # verify the required parameter 'publication_date' is set
  if @api_client.config.client_side_validation && publication_date.nil?
    fail ArgumentError, "Missing the required parameter 'publication_date' when calling CompanyApi.get_company_news_body"
  end
  if @api_client.config.client_side_validation && opts[:'specific_source'] && !['yahoo', 'moody', 'moody_us_news', 'moody_us_press_releases'].include?(opts[:'specific_source'])
    fail ArgumentError, 'invalid value for "specific_source", must be one of yahoo, moody, moody_us_news, moody_us_press_releases'
  end
  # resource path
  local_var_path = "/companies/news/body"

  # query parameters
  query_params = {}
  query_params[:'news_story_id'] = news_story_id
  query_params[:'publication_date'] = publication_date
  query_params[:'specific_source'] = opts[:'specific_source'] if !opts[:'specific_source'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyNewsBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_news_body\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_news_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseCompanyNews, Fixnum, Hash)>

All News by Company Returns the latest and historical news article links, headlines and summaries for a specified US traded company.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :specific_source (String)

    Only news from this source. Defaults to highest available if not present.

  • :page_size (Integer)

    The maximum number of results to return

  • :sentiment (String)

    Filter by sentiment. Unsupported for yahoo source.

  • :topic (String)

    Filter by topic. Unsupported for yahoo source.

  • :security (String)

    Filter by &#x60;security&#x60; identifier (ticker, figi, isin, cusip, Intrinio ID). Unsupported for yahoo source.

  • :start_date (Date)

    Limit news stories to those on or after this date. Defaults to yesterday if unspecified.

  • :end_date (Date)

    Limit news stories to those on or before this date

  • :language (String)

    Filter by language. Unsupported for yahoo source.

  • :word_count_greater_than (Integer)

    News stories will have a word count greater than this value. Unsupported for yahoo source.

  • :word_count_less_than (Integer)

    News stories will have a word count less than this value. Unsupported for yahoo source.

  • :is_spam (BOOLEAN)

    Filter whether it is marked as spam or not. Unsupported for yahoo source.

  • :business_relevance_greater_than (Float)

    News stories will have a business relevance score more than this value. Unsupported for yahoo source.

  • :business_relevance_less_than (Float)

    News stories will have a business relevance score less than this value. Unsupported for yahoo source.

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(ApiResponseCompanyNews, Fixnum, Hash)>)

    ApiResponseCompanyNews data, response status code and response headers



963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
# File 'lib/intrinio-sdk/api/company_api.rb', line 963

def get_company_news_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_news ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_news"
  end
  if @api_client.config.client_side_validation && opts[:'specific_source'] && !['yahoo', 'moody', 'moody_us_news', 'moody_us_press_releases'].include?(opts[:'specific_source'])
    fail ArgumentError, 'invalid value for "specific_source", must be one of yahoo, moody, moody_us_news, moody_us_press_releases'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.get_company_news, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && opts[:'sentiment'] && !['positive', 'neutral', 'negative'].include?(opts[:'sentiment'])
    fail ArgumentError, 'invalid value for "sentiment", must be one of positive, neutral, negative'
  end
  # resource path
  local_var_path = "/companies/{identifier}/news".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'specific_source'] = opts[:'specific_source'] if !opts[:'specific_source'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'sentiment'] = opts[:'sentiment'] if !opts[:'sentiment'].nil?
  query_params[:'topic'] = opts[:'topic'] if !opts[:'topic'].nil?
  query_params[:'security'] = opts[:'security'] if !opts[:'security'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'word_count_greater_than'] = opts[:'word_count_greater_than'] if !opts[:'word_count_greater_than'].nil?
  query_params[:'word_count_less_than'] = opts[:'word_count_less_than'] if !opts[:'word_count_less_than'].nil?
  query_params[:'is_spam'] = opts[:'is_spam'] if !opts[:'is_spam'].nil?
  query_params[:'business_relevance_greater_than'] = opts[:'business_relevance_greater_than'] if !opts[:'business_relevance_greater_than'].nil?
  query_params[:'business_relevance_less_than'] = opts[:'business_relevance_less_than'] if !opts[:'business_relevance_less_than'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyNews')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_news\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_public_float(identifier, opts = {}) ⇒ ApiResponseCompanyPublicFloatResult

Get Company’s public float Returns a list of public float data tied to a given company identifier.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :float_date_greater_than (Date)

    The lower-bound date for the data being requested.

  • :float_date_less_than (Date)

    The upper-bound date for the data being requested.

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



1104
1105
1106
1107
# File 'lib/intrinio-sdk/api/company_api.rb', line 1104

def get_company_public_float(identifier, opts = {})
  data, _status_code, _headers = get_company_public_float_with_http_info(identifier, opts)
  return data
end

#get_company_public_float_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseCompanyPublicFloatResult, Fixnum, Hash)>

Get Company&#39;s public float Returns a list of public float data tied to a given company identifier.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :float_date_greater_than (Date)

    The lower-bound date for the data being requested.

  • :float_date_less_than (Date)

    The upper-bound date for the data being requested.

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
# File 'lib/intrinio-sdk/api/company_api.rb', line 1118

def get_company_public_float_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_public_float ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_public_float"
  end
  # resource path
  local_var_path = "/companies/{identifier}/public_float".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'float_date_greater_than'] = opts[:'float_date_greater_than'] if !opts[:'float_date_greater_than'].nil?
  query_params[:'float_date_less_than'] = opts[:'float_date_less_than'] if !opts[:'float_date_less_than'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
  query_params[:'next_page'] = opts[:'next_page2'] if !opts[:'next_page2'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyPublicFloatResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_public_float\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_securities(identifier, opts = {}) ⇒ ApiResponseCompanySecurities

All Securities by Company Returns a list of underlying securities with associated reference data tied to a given company identifier.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



1166
1167
1168
1169
# File 'lib/intrinio-sdk/api/company_api.rb', line 1166

def get_company_securities(identifier, opts = {})
  data, _status_code, _headers = get_company_securities_with_http_info(identifier, opts)
  return data
end

#get_company_securities_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseCompanySecurities, Fixnum, Hash)>

All Securities by Company Returns a list of underlying securities with associated reference data tied to a given company identifier.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
# File 'lib/intrinio-sdk/api/company_api.rb', line 1177

def get_company_securities_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company_securities ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company_securities"
  end
  # resource path
  local_var_path = "/companies/{identifier}/securities".sub('{' + 'identifier' + '}', identifier.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanySecurities')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company_securities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_company_with_http_info(identifier, opts = {}) ⇒ Array<(Company, Fixnum, Hash)>

Lookup Company Returns company reference and metadata such as tickers, CIK, and a unique company identifier, as well as company metadata such as business description, employee count, and company URL.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Company, Fixnum, Hash)>)

    Company data, response status code and response headers



290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/intrinio-sdk/api/company_api.rb', line 290

def get_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.get_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.get_company"
  end
  # resource path
  local_var_path = "/companies/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Company')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#get_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#insider_transaction_filings_by_company(identifier, opts = {}) ⇒ ApiResponseInsiderTransactionFilings

Insider Transaction Filings by Company Returns a list of all insider transaction filings in a company. Criteria for being an insider include being a director, officer, or 10%+ owner in the company. Transactions are detailed for both non-derivative and derivative transactions by the insider.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (Date)

    Return Company&#39;s insider transaction filings on or after this date

  • :end_date (Date)

    Return Company&#39;s insider transaction filings on or before this date

  • :ownership_type (String)

    The type of ownership to return transaction filings for. &#39;D&#39; is for direct transactions. &#39;I&#39; is for indirect transactions. Omit for both types.

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :page_size (Integer)

    The number of results to return (default to 1000)

  • :sort_by (String)

    The field to sort by. Default is &#39;filing_date&#39;.

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



1228
1229
1230
1231
# File 'lib/intrinio-sdk/api/company_api.rb', line 1228

def insider_transaction_filings_by_company(identifier, opts = {})
  data, _status_code, _headers = insider_transaction_filings_by_company_with_http_info(identifier, opts)
  return data
end

#insider_transaction_filings_by_company_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseInsiderTransactionFilings, Fixnum, Hash)>

Insider Transaction Filings by Company Returns a list of all insider transaction filings in a company. Criteria for being an insider include being a director, officer, or 10%+ owner in the company. Transactions are detailed for both non-derivative and derivative transactions by the insider.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (Date)

    Return Company&#39;s insider transaction filings on or after this date

  • :end_date (Date)

    Return Company&#39;s insider transaction filings on or before this date

  • :ownership_type (String)

    The type of ownership to return transaction filings for. &#39;D&#39; is for direct transactions. &#39;I&#39; is for indirect transactions. Omit for both types.

  • :next_page (String)

    Gets the next page of data from a previous API call

  • :page_size (Integer)

    The number of results to return

  • :sort_by (String)

    The field to sort by. Default is &#39;filing_date&#39;.

  • :next_page2 (String)

    Gets the next page of data from a previous API call

Returns:



1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
# File 'lib/intrinio-sdk/api/company_api.rb', line 1245

def insider_transaction_filings_by_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.insider_transaction_filings_by_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.insider_transaction_filings_by_company"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.insider_transaction_filings_by_company, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && opts[:'sort_by'] && !['filing_date', 'updated_on'].include?(opts[:'sort_by'])
    fail ArgumentError, 'invalid value for "sort_by", must be one of filing_date, updated_on'
  end
  # resource path
  local_var_path = "/companies/{identifier}/insider_transaction_filings".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'ownership_type'] = opts[:'ownership_type'] if !opts[:'ownership_type'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
  query_params[:'next_page'] = opts[:'next_page2'] if !opts[:'next_page2'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseInsiderTransactionFilings')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#insider_transaction_filings_by_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#latest_insider_transaction_filing_by_company(identifier, opts = {}) ⇒ InsiderTransactionFiling

Latest Insider Transaction Filing by Company Returns the latest insider transaction filing for a company.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



1303
1304
1305
1306
# File 'lib/intrinio-sdk/api/company_api.rb', line 1303

def latest_insider_transaction_filing_by_company(identifier, opts = {})
  data, _status_code, _headers = latest_insider_transaction_filing_by_company_with_http_info(identifier, opts)
  return data
end

#latest_insider_transaction_filing_by_company_with_http_info(identifier, opts = {}) ⇒ Array<(InsiderTransactionFiling, Fixnum, Hash)>

Latest Insider Transaction Filing by Company Returns the latest insider transaction filing for a company.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

  • (Array<(InsiderTransactionFiling, Fixnum, Hash)>)

    InsiderTransactionFiling data, response status code and response headers



1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
# File 'lib/intrinio-sdk/api/company_api.rb', line 1314

def latest_insider_transaction_filing_by_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.latest_insider_transaction_filing_by_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.latest_insider_transaction_filing_by_company"
  end
  # resource path
  local_var_path = "/companies/{identifier}/insider_transaction_filings/latest".sub('{' + 'identifier' + '}', identifier.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InsiderTransactionFiling')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#latest_insider_transaction_filing_by_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#lookup_company_fundamental(identifier, statement_code, fiscal_period, fiscal_year, opts = {}) ⇒ Fundamental

Lookup Fundamental by Company Returns the Fundamental for the Company with the given ‘identifier` and with the given parameters

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • statement_code

    The statement code

  • fiscal_period

    The fiscal period

  • fiscal_year

    The fiscal year

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1361
1362
1363
1364
# File 'lib/intrinio-sdk/api/company_api.rb', line 1361

def lookup_company_fundamental(identifier, statement_code, fiscal_period, fiscal_year, opts = {})
  data, _status_code, _headers = lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts)
  return data
end

#lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts = {}) ⇒ Array<(Fundamental, Fixnum, Hash)>

Lookup Fundamental by Company Returns the Fundamental for the Company with the given &#x60;identifier&#x60; and with the given parameters

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • statement_code

    The statement code

  • fiscal_period

    The fiscal period

  • fiscal_year

    The fiscal year

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Fundamental, Fixnum, Hash)>)

    Fundamental data, response status code and response headers



1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
# File 'lib/intrinio-sdk/api/company_api.rb', line 1374

def lookup_company_fundamental_with_http_info(identifier, statement_code, fiscal_period, fiscal_year, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.lookup_company_fundamental ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.lookup_company_fundamental"
  end
  # verify the required parameter 'statement_code' is set
  if @api_client.config.client_side_validation && statement_code.nil?
    fail ArgumentError, "Missing the required parameter 'statement_code' when calling CompanyApi.lookup_company_fundamental"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['income_statement', 'balance_sheet_statement', 'cash_flow_statement', 'calculations'].include?(statement_code)
    fail ArgumentError, "invalid value for 'statement_code', must be one of income_statement, balance_sheet_statement, cash_flow_statement, calculations"
  end
  # verify the required parameter 'fiscal_period' is set
  if @api_client.config.client_side_validation && fiscal_period.nil?
    fail ArgumentError, "Missing the required parameter 'fiscal_period' when calling CompanyApi.lookup_company_fundamental"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['Q1TTM', 'Q2TTM', 'Q3TTM', 'FY', 'Q1', 'Q2', 'Q3', 'Q4', 'Q2YTD', 'Q3YTD'].include?(fiscal_period)
    fail ArgumentError, "invalid value for 'fiscal_period', must be one of Q1TTM, Q2TTM, Q3TTM, FY, Q1, Q2, Q3, Q4, Q2YTD, Q3YTD"
  end
  # verify the required parameter 'fiscal_year' is set
  if @api_client.config.client_side_validation && fiscal_year.nil?
    fail ArgumentError, "Missing the required parameter 'fiscal_year' when calling CompanyApi.lookup_company_fundamental"
  end
  # resource path
  local_var_path = "/companies/{identifier}/fundamentals/lookup/{statement_code}/{fiscal_year}/{fiscal_period}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'statement_code' + '}', statement_code.to_s).sub('{' + 'fiscal_period' + '}', fiscal_period.to_s).sub('{' + 'fiscal_year' + '}', fiscal_year.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Fundamental')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#lookup_company_fundamental\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#recognize_company(text, opts = {}) ⇒ ApiResponseCompanyRecognize

Recognize Company Returns a list of companies recognized by the Thea API in the given ‘text` query string parameter.

Parameters:

  • text

    The text sent to the Thea API to analyze

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1437
1438
1439
1440
# File 'lib/intrinio-sdk/api/company_api.rb', line 1437

def recognize_company(text, opts = {})
  data, _status_code, _headers = recognize_company_with_http_info(text, opts)
  return data
end

#recognize_company_with_http_info(text, opts = {}) ⇒ Array<(ApiResponseCompanyRecognize, Fixnum, Hash)>

Recognize Company Returns a list of companies recognized by the Thea API in the given &#x60;text&#x60; query string parameter.

Parameters:

  • text

    The text sent to the Thea API to analyze

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
# File 'lib/intrinio-sdk/api/company_api.rb', line 1447

def recognize_company_with_http_info(text, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.recognize_company ..."
  end
  # verify the required parameter 'text' is set
  if @api_client.config.client_side_validation && text.nil?
    fail ArgumentError, "Missing the required parameter 'text' when calling CompanyApi.recognize_company"
  end
  # resource path
  local_var_path = "/companies/recognize"

  # query parameters
  query_params = {}
  query_params[:'text'] = text

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanyRecognize')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#recognize_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_companies(query, opts = {}) ⇒ ApiResponseCompaniesSearch

Search Companies Search the companies database and return a list of companies matching the text query parameter passed through. Query parameter searches across the company ticker and name.

Parameters:

  • query

    Search parameters

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :active (BOOLEAN)

    When true, return companies that are actively traded (having stock prices within the past 14 days). When false, return companies that are not actively traded or never have been traded. Not setting this value returns all. Not used when mode is set.

  • :mode (String)

    When set, changes search mode to the specified mode.

  • :page_size (Integer)

    The number of results to return (default to 100)

Returns:



1494
1495
1496
1497
# File 'lib/intrinio-sdk/api/company_api.rb', line 1494

def search_companies(query, opts = {})
  data, _status_code, _headers = search_companies_with_http_info(query, opts)
  return data
end

#search_companies_with_http_info(query, opts = {}) ⇒ Array<(ApiResponseCompaniesSearch, Fixnum, Hash)>

Search Companies Search the companies database and return a list of companies matching the text query parameter passed through. Query parameter searches across the company ticker and name.

Parameters:

  • query

    Search parameters

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :active (BOOLEAN)

    When true, return companies that are actively traded (having stock prices within the past 14 days). When false, return companies that are not actively traded or never have been traded. Not setting this value returns all. Not used when mode is set.

  • :mode (String)

    When set, changes search mode to the specified mode.

  • :page_size (Integer)

    The number of results to return

Returns:

  • (Array<(ApiResponseCompaniesSearch, Fixnum, Hash)>)

    ApiResponseCompaniesSearch data, response status code and response headers



1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
# File 'lib/intrinio-sdk/api/company_api.rb', line 1507

def search_companies_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.search_companies ..."
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling CompanyApi.search_companies"
  end
  if @api_client.config.client_side_validation && opts[:'mode'] && !['starts_with'].include?(opts[:'mode'])
    fail ArgumentError, 'invalid value for "mode", must be one of starts_with'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CompanyApi.search_companies, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/companies/search"

  # query parameters
  query_params = {}
  query_params[:'query'] = query
  query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil?
  query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompaniesSearch')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#search_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#shares_outstanding_by_company(identifier, opts = {}) ⇒ ApiResponseCompanySharesOutstanding

Shares Outstanding by Company Returns the shares outstanding reported on the front cover of the SEC 10-K and 10-Q filings.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_date_greater_than (Date)

    Returns shares outstanding after this date.

  • :end_date_less_than (Date)

    Returns shares outstanding before this date.

Returns:



1563
1564
1565
1566
# File 'lib/intrinio-sdk/api/company_api.rb', line 1563

def shares_outstanding_by_company(identifier, opts = {})
  data, _status_code, _headers = shares_outstanding_by_company_with_http_info(identifier, opts)
  return data
end

#shares_outstanding_by_company_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseCompanySharesOutstanding, Fixnum, Hash)>

Shares Outstanding by Company Returns the shares outstanding reported on the front cover of the SEC 10-K and 10-Q filings.

Parameters:

  • identifier

    A Company identifier (Ticker, CIK, LEI, Intrinio ID)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :end_date_greater_than (Date)

    Returns shares outstanding after this date.

  • :end_date_less_than (Date)

    Returns shares outstanding before this date.

Returns:



1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
# File 'lib/intrinio-sdk/api/company_api.rb', line 1575

def shares_outstanding_by_company_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CompanyApi.shares_outstanding_by_company ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling CompanyApi.shares_outstanding_by_company"
  end
  # resource path
  local_var_path = "/companies/{identifier}/shares_outstanding".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}
  query_params[:'end_date_greater_than'] = opts[:'end_date_greater_than'] if !opts[:'end_date_greater_than'].nil?
  query_params[:'end_date_less_than'] = opts[:'end_date_less_than'] if !opts[:'end_date_less_than'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseCompanySharesOutstanding')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CompanyApi#shares_outstanding_by_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end