finnhub_ruby 1.1.10 → 1.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbdf62aa52f5b7d31e2134fd935b04906e61fd118678ee2d3021c58bc669424a
4
- data.tar.gz: 8ec2fa32472ecff1afb17a345c6c78182b3cfdec7ea6779c03f1488789ad6f94
3
+ metadata.gz: 887ccfa4be052b78b027b7a389128310365222765cd7bfee47740c83d6d3e22a
4
+ data.tar.gz: 95ee3425f9777f58cb12cad609c491bebb6b01cbbef5b6f6cabca2d4dd109f44
5
5
  SHA512:
6
- metadata.gz: 1a983fadf46c2bdeeba2b924090291cc80e31b8744aaf010d98ddf9e4e24fe48d3dd862f82962b0fbbc10150da45f3d3879291099ce0bd405f8b9682b80836f0
7
- data.tar.gz: efc37d1b2179e095a91b04961a08abff5e3fc5e4e6b63921f405016c20f7d728177615ea925ecb88736b39d5bf713ae0382964b250c49f13078ba561c26f5e7c
6
+ metadata.gz: 8225eea9a2bd4790c0290b299cf176c21c48c3c1a4fb2a3c2daab585b4b68ac2e937c043f26ef4f3ebb0db36b27dcfba6e54c8537562d91b298cdabdd9809e25
7
+ data.tar.gz: d46aefa594bd4363c4a2fd061b2f9e9c42b96c58c85465f467331f98fe4518f55215d5d4119f1f7a4408643bc777e5bb33c336c19f36ff9441e1e265acafa82e
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # finnhub-ruby
2
2
  - API documentation: https://finnhub.io/docs/api
3
3
  - API version: 1.0.0
4
- - Package version: 1.1.10
4
+ - Package version: 1.1.11
5
5
 
6
6
  ## Installation
7
7
  https://rubygems.org/gems/finnhub_ruby
@@ -13,7 +13,7 @@ gem install finnhub_ruby
13
13
  or in your Gemfile
14
14
 
15
15
  ```ruby
16
- gem 'finnhub_ruby', '~> 1.1.10'
16
+ gem 'finnhub_ruby', '~> 1.1.11'
17
17
  ```
18
18
 
19
19
  ## Getting Started
@@ -246,6 +246,11 @@ puts(finnhub_client.company_earnings_quality_score('AAPL', 'quarterly'))
246
246
  # Crypto Profile
247
247
  puts(finnhub_client.crypto_profile('BTC'))
248
248
 
249
+ # EBITDA Estimates
250
+ puts(finnhub_client.company_ebitda_estimates('AAPL', {freq: 'quarterly'}))
251
+
252
+ # EBIT Estimates
253
+ puts(finnhub_client.company_ebit_estimates('TSLA', {freq: 'quarterly'}))
249
254
  ```
250
255
 
251
256
  ## License
data/docs/DefaultApi.md CHANGED
@@ -8,6 +8,8 @@ All URIs are relative to *https://finnhub.io/api/v1*
8
8
  | [**company_basic_financials**](DefaultApi.md#company_basic_financials) | **GET** /stock/metric | Basic Financials |
9
9
  | [**company_earnings**](DefaultApi.md#company_earnings) | **GET** /stock/earnings | Earnings Surprises |
10
10
  | [**company_earnings_quality_score**](DefaultApi.md#company_earnings_quality_score) | **GET** /stock/earnings-quality-score | Company Earnings Quality Score |
11
+ | [**company_ebit_estimates**](DefaultApi.md#company_ebit_estimates) | **GET** /stock/ebit-estimate | EBIT Estimates |
12
+ | [**company_ebitda_estimates**](DefaultApi.md#company_ebitda_estimates) | **GET** /stock/ebitda-estimate | EBITDA Estimates |
11
13
  | [**company_eps_estimates**](DefaultApi.md#company_eps_estimates) | **GET** /stock/eps-estimate | Earnings Estimates |
12
14
  | [**company_esg_score**](DefaultApi.md#company_esg_score) | **GET** /stock/esg | Company ESG Scores |
13
15
  | [**company_executive**](DefaultApi.md#company_executive) | **GET** /stock/executive | Company Executive |
@@ -372,6 +374,156 @@ end
372
374
  - **Accept**: application/json
373
375
 
374
376
 
377
+ ## company_ebit_estimates
378
+
379
+ > <EbitEstimates> company_ebit_estimates(symbol, opts)
380
+
381
+ EBIT Estimates
382
+
383
+ Get company's ebit estimates.
384
+
385
+ ### Examples
386
+
387
+ ```ruby
388
+ require 'time'
389
+ require 'finnhub_ruby'
390
+ # setup authorization
391
+ FinnhubRuby.configure do |config|
392
+ # Configure API key authorization: api_key
393
+ config.api_key['api_key'] = 'YOUR API KEY'
394
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
395
+ # config.api_key_prefix['api_key'] = 'Bearer'
396
+ end
397
+
398
+ api_instance = FinnhubRuby::DefaultApi.new
399
+ symbol = 'symbol_example' # String | Symbol of the company: AAPL.
400
+ opts = {
401
+ freq: 'freq_example' # String | Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code>
402
+ }
403
+
404
+ begin
405
+ # EBIT Estimates
406
+ result = api_instance.company_ebit_estimates(symbol, opts)
407
+ p result
408
+ rescue FinnhubRuby::ApiError => e
409
+ puts "Error when calling DefaultApi->company_ebit_estimates: #{e}"
410
+ end
411
+ ```
412
+
413
+ #### Using the company_ebit_estimates_with_http_info variant
414
+
415
+ This returns an Array which contains the response data, status code and headers.
416
+
417
+ > <Array(<EbitEstimates>, Integer, Hash)> company_ebit_estimates_with_http_info(symbol, opts)
418
+
419
+ ```ruby
420
+ begin
421
+ # EBIT Estimates
422
+ data, status_code, headers = api_instance.company_ebit_estimates_with_http_info(symbol, opts)
423
+ p status_code # => 2xx
424
+ p headers # => { ... }
425
+ p data # => <EbitEstimates>
426
+ rescue FinnhubRuby::ApiError => e
427
+ puts "Error when calling DefaultApi->company_ebit_estimates_with_http_info: #{e}"
428
+ end
429
+ ```
430
+
431
+ ### Parameters
432
+
433
+ | Name | Type | Description | Notes |
434
+ | ---- | ---- | ----------- | ----- |
435
+ | **symbol** | **String** | Symbol of the company: AAPL. | |
436
+ | **freq** | **String** | Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt; | [optional] |
437
+
438
+ ### Return type
439
+
440
+ [**EbitEstimates**](EbitEstimates.md)
441
+
442
+ ### Authorization
443
+
444
+ [api_key](../README.md#api_key)
445
+
446
+ ### HTTP request headers
447
+
448
+ - **Content-Type**: Not defined
449
+ - **Accept**: application/json
450
+
451
+
452
+ ## company_ebitda_estimates
453
+
454
+ > <EbitdaEstimates> company_ebitda_estimates(symbol, opts)
455
+
456
+ EBITDA Estimates
457
+
458
+ Get company's ebitda estimates.
459
+
460
+ ### Examples
461
+
462
+ ```ruby
463
+ require 'time'
464
+ require 'finnhub_ruby'
465
+ # setup authorization
466
+ FinnhubRuby.configure do |config|
467
+ # Configure API key authorization: api_key
468
+ config.api_key['api_key'] = 'YOUR API KEY'
469
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
470
+ # config.api_key_prefix['api_key'] = 'Bearer'
471
+ end
472
+
473
+ api_instance = FinnhubRuby::DefaultApi.new
474
+ symbol = 'symbol_example' # String | Symbol of the company: AAPL.
475
+ opts = {
476
+ freq: 'freq_example' # String | Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code>
477
+ }
478
+
479
+ begin
480
+ # EBITDA Estimates
481
+ result = api_instance.company_ebitda_estimates(symbol, opts)
482
+ p result
483
+ rescue FinnhubRuby::ApiError => e
484
+ puts "Error when calling DefaultApi->company_ebitda_estimates: #{e}"
485
+ end
486
+ ```
487
+
488
+ #### Using the company_ebitda_estimates_with_http_info variant
489
+
490
+ This returns an Array which contains the response data, status code and headers.
491
+
492
+ > <Array(<EbitdaEstimates>, Integer, Hash)> company_ebitda_estimates_with_http_info(symbol, opts)
493
+
494
+ ```ruby
495
+ begin
496
+ # EBITDA Estimates
497
+ data, status_code, headers = api_instance.company_ebitda_estimates_with_http_info(symbol, opts)
498
+ p status_code # => 2xx
499
+ p headers # => { ... }
500
+ p data # => <EbitdaEstimates>
501
+ rescue FinnhubRuby::ApiError => e
502
+ puts "Error when calling DefaultApi->company_ebitda_estimates_with_http_info: #{e}"
503
+ end
504
+ ```
505
+
506
+ ### Parameters
507
+
508
+ | Name | Type | Description | Notes |
509
+ | ---- | ---- | ----------- | ----- |
510
+ | **symbol** | **String** | Symbol of the company: AAPL. | |
511
+ | **freq** | **String** | Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt; | [optional] |
512
+
513
+ ### Return type
514
+
515
+ [**EbitdaEstimates**](EbitdaEstimates.md)
516
+
517
+ ### Authorization
518
+
519
+ [api_key](../README.md#api_key)
520
+
521
+ ### HTTP request headers
522
+
523
+ - **Content-Type**: Not defined
524
+ - **Accept**: application/json
525
+
526
+
375
527
  ## company_eps_estimates
376
528
 
377
529
  > <EarningsEstimates> company_eps_estimates(symbol, opts)
@@ -0,0 +1,22 @@
1
+ # FinnhubRuby::EbitEstimates
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array&lt;EbitEstimatesInfo&gt;**](EbitEstimatesInfo.md) | List of estimates | [optional] |
8
+ | **freq** | **String** | Frequency: annual or quarterly. | [optional] |
9
+ | **symbol** | **String** | Company symbol. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'finnhub_ruby'
15
+
16
+ instance = FinnhubRuby::EbitEstimates.new(
17
+ data: null,
18
+ freq: null,
19
+ symbol: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # FinnhubRuby::EbitEstimatesInfo
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ebit_avg** | **Float** | Average EBIT estimates including Finnhub&#39;s proprietary estimates. | [optional] |
8
+ | **ebit_high** | **Float** | Highest estimate. | [optional] |
9
+ | **ebit_low** | **Float** | Lowest estimate. | [optional] |
10
+ | **number_analysts** | **Integer** | Number of Analysts. | [optional] |
11
+ | **period** | **Date** | Period. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'finnhub_ruby'
17
+
18
+ instance = FinnhubRuby::EbitEstimatesInfo.new(
19
+ ebit_avg: null,
20
+ ebit_high: null,
21
+ ebit_low: null,
22
+ number_analysts: null,
23
+ period: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,22 @@
1
+ # FinnhubRuby::EbitdaEstimates
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array&lt;EbitdaEstimatesInfo&gt;**](EbitdaEstimatesInfo.md) | List of estimates | [optional] |
8
+ | **freq** | **String** | Frequency: annual or quarterly. | [optional] |
9
+ | **symbol** | **String** | Company symbol. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'finnhub_ruby'
15
+
16
+ instance = FinnhubRuby::EbitdaEstimates.new(
17
+ data: null,
18
+ freq: null,
19
+ symbol: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # FinnhubRuby::EbitdaEstimatesInfo
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ebitda_avg** | **Float** | Average EBITDA estimates including Finnhub&#39;s proprietary estimates. | [optional] |
8
+ | **ebitda_high** | **Float** | Highest estimate. | [optional] |
9
+ | **ebitda_low** | **Float** | Lowest estimate. | [optional] |
10
+ | **number_analysts** | **Integer** | Number of Analysts. | [optional] |
11
+ | **period** | **Date** | Period. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'finnhub_ruby'
17
+
18
+ instance = FinnhubRuby::EbitdaEstimatesInfo.new(
19
+ ebitda_avg: null,
20
+ ebitda_high: null,
21
+ ebitda_low: null,
22
+ number_analysts: null,
23
+ period: null
24
+ )
25
+ ```
26
+
@@ -25,6 +25,10 @@
25
25
  | **max_redemption_fee** | **Float** | Max redemption fee. | [optional] |
26
26
  | **standard_min_investment** | **Float** | Minimum investment for standard accounts. | [optional] |
27
27
  | **turnover** | **Float** | Turnover. | [optional] |
28
+ | **series_id** | **String** | Fund&#39;s series ID. This field can be used to group multiple share classes into 1 unique fund. | [optional] |
29
+ | **series_name** | **String** | Fund&#39;s series name. | [optional] |
30
+ | **class_id** | **String** | Class ID. | [optional] |
31
+ | **class_name** | **String** | Class name. | [optional] |
28
32
 
29
33
  ## Example
30
34
 
@@ -52,7 +56,11 @@ instance = FinnhubRuby::MutualFundProfileData.new(
52
56
  cusip: null,
53
57
  max_redemption_fee: null,
54
58
  standard_min_investment: null,
55
- turnover: null
59
+ turnover: null,
60
+ series_id: null,
61
+ series_name: null,
62
+ class_id: null,
63
+ class_name: null
56
64
  )
57
65
  ```
58
66
 
data/docs/Transactions.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **symbol** | **String** | Symbol. | [optional] |
7
8
  | **name** | **String** | Insider&#39;s name. | [optional] |
8
9
  | **share** | **Integer** | Number of shares held after the transaction. | [optional] |
9
10
  | **change** | **Integer** | Number of share changed from the last period. A positive value suggests a &lt;code&gt;BUY&lt;/code&gt; transaction. A negative value suggests a &lt;code&gt;SELL&lt;/code&gt; transaction. | [optional] |
@@ -18,6 +19,7 @@
18
19
  require 'finnhub_ruby'
19
20
 
20
21
  instance = FinnhubRuby::Transactions.new(
22
+ symbol: null,
21
23
  name: null,
22
24
  share: null,
23
25
  change: null,
Binary file
@@ -299,6 +299,140 @@ module FinnhubRuby
299
299
  return data, status_code, headers
300
300
  end
301
301
 
302
+ # EBIT Estimates
303
+ # Get company's ebit estimates.
304
+ # @param symbol [String] Symbol of the company: AAPL.
305
+ # @param [Hash] opts the optional parameters
306
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
307
+ # @return [EbitEstimates]
308
+ def company_ebit_estimates(symbol, opts = {})
309
+ data, _status_code, _headers = company_ebit_estimates_with_http_info(symbol, opts)
310
+ data
311
+ end
312
+
313
+ # EBIT Estimates
314
+ # Get company&#39;s ebit estimates.
315
+ # @param symbol [String] Symbol of the company: AAPL.
316
+ # @param [Hash] opts the optional parameters
317
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
318
+ # @return [Array<(EbitEstimates, Integer, Hash)>] EbitEstimates data, response status code and response headers
319
+ def company_ebit_estimates_with_http_info(symbol, opts = {})
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug 'Calling API: DefaultApi.company_ebit_estimates ...'
322
+ end
323
+ # verify the required parameter 'symbol' is set
324
+ if @api_client.config.client_side_validation && symbol.nil?
325
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_ebit_estimates"
326
+ end
327
+ # resource path
328
+ local_var_path = '/stock/ebit-estimate'
329
+
330
+ # query parameters
331
+ query_params = opts[:query_params] || {}
332
+ query_params[:'symbol'] = symbol
333
+ query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
334
+
335
+ # header parameters
336
+ header_params = opts[:header_params] || {}
337
+ # HTTP header 'Accept' (if needed)
338
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
339
+
340
+ # form parameters
341
+ form_params = opts[:form_params] || {}
342
+
343
+ # http body (model)
344
+ post_body = opts[:debug_body]
345
+
346
+ # return_type
347
+ return_type = opts[:debug_return_type] || 'EbitEstimates'
348
+
349
+ # auth_names
350
+ auth_names = opts[:debug_auth_names] || ['api_key']
351
+
352
+ new_options = opts.merge(
353
+ :operation => :"DefaultApi.company_ebit_estimates",
354
+ :header_params => header_params,
355
+ :query_params => query_params,
356
+ :form_params => form_params,
357
+ :body => post_body,
358
+ :auth_names => auth_names,
359
+ :return_type => return_type
360
+ )
361
+
362
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug "API called: DefaultApi#company_ebit_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
365
+ end
366
+ return data, status_code, headers
367
+ end
368
+
369
+ # EBITDA Estimates
370
+ # Get company's ebitda estimates.
371
+ # @param symbol [String] Symbol of the company: AAPL.
372
+ # @param [Hash] opts the optional parameters
373
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
374
+ # @return [EbitdaEstimates]
375
+ def company_ebitda_estimates(symbol, opts = {})
376
+ data, _status_code, _headers = company_ebitda_estimates_with_http_info(symbol, opts)
377
+ data
378
+ end
379
+
380
+ # EBITDA Estimates
381
+ # Get company&#39;s ebitda estimates.
382
+ # @param symbol [String] Symbol of the company: AAPL.
383
+ # @param [Hash] opts the optional parameters
384
+ # @option opts [String] :freq Can take 1 of the following values: &lt;code&gt;annual, quarterly&lt;/code&gt;. Default to &lt;code&gt;quarterly&lt;/code&gt;
385
+ # @return [Array<(EbitdaEstimates, Integer, Hash)>] EbitdaEstimates data, response status code and response headers
386
+ def company_ebitda_estimates_with_http_info(symbol, opts = {})
387
+ if @api_client.config.debugging
388
+ @api_client.config.logger.debug 'Calling API: DefaultApi.company_ebitda_estimates ...'
389
+ end
390
+ # verify the required parameter 'symbol' is set
391
+ if @api_client.config.client_side_validation && symbol.nil?
392
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.company_ebitda_estimates"
393
+ end
394
+ # resource path
395
+ local_var_path = '/stock/ebitda-estimate'
396
+
397
+ # query parameters
398
+ query_params = opts[:query_params] || {}
399
+ query_params[:'symbol'] = symbol
400
+ query_params[:'freq'] = opts[:'freq'] if !opts[:'freq'].nil?
401
+
402
+ # header parameters
403
+ header_params = opts[:header_params] || {}
404
+ # HTTP header 'Accept' (if needed)
405
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
406
+
407
+ # form parameters
408
+ form_params = opts[:form_params] || {}
409
+
410
+ # http body (model)
411
+ post_body = opts[:debug_body]
412
+
413
+ # return_type
414
+ return_type = opts[:debug_return_type] || 'EbitdaEstimates'
415
+
416
+ # auth_names
417
+ auth_names = opts[:debug_auth_names] || ['api_key']
418
+
419
+ new_options = opts.merge(
420
+ :operation => :"DefaultApi.company_ebitda_estimates",
421
+ :header_params => header_params,
422
+ :query_params => query_params,
423
+ :form_params => form_params,
424
+ :body => post_body,
425
+ :auth_names => auth_names,
426
+ :return_type => return_type
427
+ )
428
+
429
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: DefaultApi#company_ebitda_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+
302
436
  # Earnings Estimates
303
437
  # Get company's EPS estimates.
304
438
  # @param symbol [String] Symbol of the company: AAPL.