finnhub_ruby 1.1.14 → 1.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/BondCandles.md +22 -0
  4. data/docs/BondProfile.md +58 -0
  5. data/docs/Company.md +1 -1
  6. data/docs/DefaultApi.md +382 -4
  7. data/docs/KeyCustomersSuppliers.md +4 -0
  8. data/docs/LobbyingData.md +46 -0
  9. data/docs/LobbyingResult.md +20 -0
  10. data/docs/MutualFundProfileData.md +5 -1
  11. data/docs/SectorMetric.md +20 -0
  12. data/docs/SectorMetricData.md +20 -0
  13. data/docs/UsaSpending.md +56 -0
  14. data/docs/UsaSpendingResult.md +20 -0
  15. data/finnhub_ruby-1.1.14.gem +0 -0
  16. data/finnhub_ruby-1.1.15.gem +0 -0
  17. data/finnhub_ruby-1.1.16.gem +0 -0
  18. data/lib/finnhub_ruby/api/default_api.rb +372 -8
  19. data/lib/finnhub_ruby/models/bond_candles.rb +243 -0
  20. data/lib/finnhub_ruby/models/bond_profile.rb +419 -0
  21. data/lib/finnhub_ruby/models/company.rb +1 -1
  22. data/lib/finnhub_ruby/models/key_customers_suppliers.rb +21 -1
  23. data/lib/finnhub_ruby/models/lobbying_data.rb +359 -0
  24. data/lib/finnhub_ruby/models/lobbying_result.rb +231 -0
  25. data/lib/finnhub_ruby/models/mutual_fund_profile_data.rb +24 -4
  26. data/lib/finnhub_ruby/models/sector_metric.rb +231 -0
  27. data/lib/finnhub_ruby/models/sector_metric_data.rb +229 -0
  28. data/lib/finnhub_ruby/models/usa_spending.rb +409 -0
  29. data/lib/finnhub_ruby/models/usa_spending_result.rb +231 -0
  30. data/lib/finnhub_ruby/version.rb +1 -1
  31. data/lib/finnhub_ruby.rb +8 -0
  32. data/spec/models/bond_candles_spec.rb +46 -0
  33. data/spec/models/bond_profile_spec.rb +154 -0
  34. data/spec/models/lobbying_data_spec.rb +118 -0
  35. data/spec/models/lobbying_result_spec.rb +40 -0
  36. data/spec/models/sector_metric_data_spec.rb +40 -0
  37. data/spec/models/sector_metric_spec.rb +40 -0
  38. data/spec/models/usa_spending_result_spec.rb +40 -0
  39. data/spec/models/usa_spending_spec.rb +148 -0
  40. metadata +37 -2
@@ -0,0 +1,20 @@
1
+ # FinnhubRuby::SectorMetric
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **region** | **String** | Region. | [optional] |
8
+ | **data** | [**Array<SectorMetricData>**](SectorMetricData.md) | Metrics for each sector. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'finnhub_ruby'
14
+
15
+ instance = FinnhubRuby::SectorMetric.new(
16
+ region: null,
17
+ data: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # FinnhubRuby::SectorMetricData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **sector** | **String** | Sector | [optional] |
8
+ | **metrics** | **Object** | Metrics data in key-value format. <code>a</code> and <code>m</code> fields are for average and median respectively. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'finnhub_ruby'
14
+
15
+ instance = FinnhubRuby::SectorMetricData.new(
16
+ sector: null,
17
+ metrics: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,56 @@
1
+ # FinnhubRuby::UsaSpending
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **symbol** | **String** | Symbol. | [optional] |
8
+ | **recipient_name** | **String** | Company's name. | [optional] |
9
+ | **recipient_parent_name** | **String** | Company's name. | [optional] |
10
+ | **award_description** | **String** | Description. | [optional] |
11
+ | **country** | **String** | Recipient's country. | [optional] |
12
+ | **action_date** | **String** | Period. | [optional] |
13
+ | **total_value** | **Float** | Income reported by lobbying firms. | [optional] |
14
+ | **performance_start_date** | **String** | Performance start date. | [optional] |
15
+ | **performance_end_date** | **String** | Performance end date. | [optional] |
16
+ | **awarding_agency_name** | **String** | Award agency. | [optional] |
17
+ | **awarding_sub_agency_name** | **String** | Award sub-agency. | [optional] |
18
+ | **awarding_office_name** | **String** | Award office name. | [optional] |
19
+ | **performance_country** | **String** | Performance country. | [optional] |
20
+ | **performance_city** | **String** | Performance city. | [optional] |
21
+ | **performance_county** | **String** | Performance county. | [optional] |
22
+ | **performance_state** | **String** | Performance state. | [optional] |
23
+ | **performance_zip_code** | **String** | Performance zip code. | [optional] |
24
+ | **performance_congressional_district** | **String** | Performance congressional district. | [optional] |
25
+ | **naics_code** | **String** | NAICS code. | [optional] |
26
+ | **permalink** | **String** | Permalink. | [optional] |
27
+
28
+ ## Example
29
+
30
+ ```ruby
31
+ require 'finnhub_ruby'
32
+
33
+ instance = FinnhubRuby::UsaSpending.new(
34
+ symbol: null,
35
+ recipient_name: null,
36
+ recipient_parent_name: null,
37
+ award_description: null,
38
+ country: null,
39
+ action_date: null,
40
+ total_value: null,
41
+ performance_start_date: null,
42
+ performance_end_date: null,
43
+ awarding_agency_name: null,
44
+ awarding_sub_agency_name: null,
45
+ awarding_office_name: null,
46
+ performance_country: null,
47
+ performance_city: null,
48
+ performance_county: null,
49
+ performance_state: null,
50
+ performance_zip_code: null,
51
+ performance_congressional_district: null,
52
+ naics_code: null,
53
+ permalink: null
54
+ )
55
+ ```
56
+
@@ -0,0 +1,20 @@
1
+ # FinnhubRuby::UsaSpendingResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **symbol** | **String** | Symbol. | [optional] |
8
+ | **data** | [**Array<UsaSpending>**](UsaSpending.md) | Array of government's spending data points. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'finnhub_ruby'
14
+
15
+ instance = FinnhubRuby::UsaSpendingResult.new(
16
+ symbol: null,
17
+ data: null
18
+ )
19
+ ```
20
+
Binary file
Binary file
Binary file
@@ -90,6 +90,150 @@ module FinnhubRuby
90
90
  return data, status_code, headers
91
91
  end
92
92
 
93
+ # Bond price data
94
+ # Get end-of-day bond's price data.
95
+ # @param isin [String] ISIN.
96
+ # @param from [Integer] UNIX timestamp. Interval initial value.
97
+ # @param to [Integer] UNIX timestamp. Interval end value.
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [BondCandles]
100
+ def bond_price(isin, from, to, opts = {})
101
+ data, _status_code, _headers = bond_price_with_http_info(isin, from, to, opts)
102
+ data
103
+ end
104
+
105
+ # Bond price data
106
+ # Get end-of-day bond's price data.
107
+ # @param isin [String] ISIN.
108
+ # @param from [Integer] UNIX timestamp. Interval initial value.
109
+ # @param to [Integer] UNIX timestamp. Interval end value.
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [Array<(BondCandles, Integer, Hash)>] BondCandles data, response status code and response headers
112
+ def bond_price_with_http_info(isin, from, to, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug 'Calling API: DefaultApi.bond_price ...'
115
+ end
116
+ # verify the required parameter 'isin' is set
117
+ if @api_client.config.client_side_validation && isin.nil?
118
+ fail ArgumentError, "Missing the required parameter 'isin' when calling DefaultApi.bond_price"
119
+ end
120
+ # verify the required parameter 'from' is set
121
+ if @api_client.config.client_side_validation && from.nil?
122
+ fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.bond_price"
123
+ end
124
+ # verify the required parameter 'to' is set
125
+ if @api_client.config.client_side_validation && to.nil?
126
+ fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.bond_price"
127
+ end
128
+ # resource path
129
+ local_var_path = '/bond/price'
130
+
131
+ # query parameters
132
+ query_params = opts[:query_params] || {}
133
+ query_params[:'isin'] = isin
134
+ query_params[:'from'] = from
135
+ query_params[:'to'] = to
136
+
137
+ # header parameters
138
+ header_params = opts[:header_params] || {}
139
+ # HTTP header 'Accept' (if needed)
140
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
141
+
142
+ # form parameters
143
+ form_params = opts[:form_params] || {}
144
+
145
+ # http body (model)
146
+ post_body = opts[:debug_body]
147
+
148
+ # return_type
149
+ return_type = opts[:debug_return_type] || 'BondCandles'
150
+
151
+ # auth_names
152
+ auth_names = opts[:debug_auth_names] || ['api_key']
153
+
154
+ new_options = opts.merge(
155
+ :operation => :"DefaultApi.bond_price",
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names,
161
+ :return_type => return_type
162
+ )
163
+
164
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug "API called: DefaultApi#bond_price\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
+ end
168
+ return data, status_code, headers
169
+ end
170
+
171
+ # Bond Profile
172
+ # Get general information of a bond. You can query by FIGI, ISIN or CUSIP
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [String] :isin ISIN
175
+ # @option opts [String] :cusip CUSIP
176
+ # @option opts [String] :figi FIGI
177
+ # @return [BondProfile]
178
+ def bond_profile(opts = {})
179
+ data, _status_code, _headers = bond_profile_with_http_info(opts)
180
+ data
181
+ end
182
+
183
+ # Bond Profile
184
+ # Get general information of a bond. You can query by FIGI, ISIN or CUSIP
185
+ # @param [Hash] opts the optional parameters
186
+ # @option opts [String] :isin ISIN
187
+ # @option opts [String] :cusip CUSIP
188
+ # @option opts [String] :figi FIGI
189
+ # @return [Array<(BondProfile, Integer, Hash)>] BondProfile data, response status code and response headers
190
+ def bond_profile_with_http_info(opts = {})
191
+ if @api_client.config.debugging
192
+ @api_client.config.logger.debug 'Calling API: DefaultApi.bond_profile ...'
193
+ end
194
+ # resource path
195
+ local_var_path = '/bond/profile'
196
+
197
+ # query parameters
198
+ query_params = opts[:query_params] || {}
199
+ query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
200
+ query_params[:'cusip'] = opts[:'cusip'] if !opts[:'cusip'].nil?
201
+ query_params[:'figi'] = opts[:'figi'] if !opts[:'figi'].nil?
202
+
203
+ # header parameters
204
+ header_params = opts[:header_params] || {}
205
+ # HTTP header 'Accept' (if needed)
206
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
207
+
208
+ # form parameters
209
+ form_params = opts[:form_params] || {}
210
+
211
+ # http body (model)
212
+ post_body = opts[:debug_body]
213
+
214
+ # return_type
215
+ return_type = opts[:debug_return_type] || 'BondProfile'
216
+
217
+ # auth_names
218
+ auth_names = opts[:debug_auth_names] || ['api_key']
219
+
220
+ new_options = opts.merge(
221
+ :operation => :"DefaultApi.bond_profile",
222
+ :header_params => header_params,
223
+ :query_params => query_params,
224
+ :form_params => form_params,
225
+ :body => post_body,
226
+ :auth_names => auth_names,
227
+ :return_type => return_type
228
+ )
229
+
230
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "API called: DefaultApi#bond_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ end
234
+ return data, status_code, headers
235
+ end
236
+
93
237
  # Basic Financials
94
238
  # Get company basic financials such as margin, P/E ratio, 52-week high/low etc.
95
239
  # @param symbol [String] Symbol of the company: AAPL.
@@ -2822,7 +2966,7 @@ module FinnhubRuby
2822
2966
  end
2823
2967
 
2824
2968
  # International Filings
2825
- # List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
2969
+ # List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. Only support SEDAR and UK Companies House for normal usage. Enterprise clients who need access to the full filings for global markets should contact us for the access.
2826
2970
  # @param [Hash] opts the optional parameters
2827
2971
  # @option opts [String] :symbol Symbol. Leave empty to list latest filings.
2828
2972
  # @option opts [String] :country Filter by country using country&#39;s 2-letter code.
@@ -2833,7 +2977,7 @@ module FinnhubRuby
2833
2977
  end
2834
2978
 
2835
2979
  # International Filings
2836
- # List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data.
2980
+ # List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. Only support SEDAR and UK Companies House for normal usage. Enterprise clients who need access to the full filings for global markets should contact us for the access.
2837
2981
  # @param [Hash] opts the optional parameters
2838
2982
  # @option opts [String] :symbol Symbol. Leave empty to list latest filings.
2839
2983
  # @option opts [String] :country Filter by country using country&#39;s 2-letter code.
@@ -3151,7 +3295,7 @@ module FinnhubRuby
3151
3295
  end
3152
3296
 
3153
3297
  # Mutual Funds Holdings
3154
- # Get full Mutual Funds holdings/constituents.
3298
+ # Get full Mutual Funds holdings/constituents. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN.
3155
3299
  # @param [Hash] opts the optional parameters
3156
3300
  # @option opts [String] :symbol Fund&#39;s symbol.
3157
3301
  # @option opts [String] :isin Fund&#39;s isin.
@@ -3163,7 +3307,7 @@ module FinnhubRuby
3163
3307
  end
3164
3308
 
3165
3309
  # Mutual Funds Holdings
3166
- # Get full Mutual Funds holdings/constituents.
3310
+ # Get full Mutual Funds holdings/constituents. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN.
3167
3311
  # @param [Hash] opts the optional parameters
3168
3312
  # @option opts [String] :symbol Fund&#39;s symbol.
3169
3313
  # @option opts [String] :isin Fund&#39;s isin.
@@ -3217,7 +3361,7 @@ module FinnhubRuby
3217
3361
  end
3218
3362
 
3219
3363
  # Mutual Funds Profile
3220
- # Get mutual funds profile information. This endpoint covers US mutual funds only.
3364
+ # Get mutual funds profile information. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN.
3221
3365
  # @param [Hash] opts the optional parameters
3222
3366
  # @option opts [String] :symbol Fund&#39;s symbol.
3223
3367
  # @option opts [String] :isin Fund&#39;s isin.
@@ -3228,7 +3372,7 @@ module FinnhubRuby
3228
3372
  end
3229
3373
 
3230
3374
  # Mutual Funds Profile
3231
- # Get mutual funds profile information. This endpoint covers US mutual funds only.
3375
+ # Get mutual funds profile information. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN.
3232
3376
  # @param [Hash] opts the optional parameters
3233
3377
  # @option opts [String] :symbol Fund&#39;s symbol.
3234
3378
  # @option opts [String] :isin Fund&#39;s isin.
@@ -3546,7 +3690,7 @@ module FinnhubRuby
3546
3690
  end
3547
3691
 
3548
3692
  # Major Press Releases
3549
- # Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.
3693
+ # <p>Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.</p><p>Full-text press releases data is available for Enterprise clients. <a href=\"mailto:support@finnhub.io\">Contact Us</a> to learn more.</p>
3550
3694
  # @param symbol [String] Company symbol.
3551
3695
  # @param [Hash] opts the optional parameters
3552
3696
  # @option opts [Date] :from From time: 2020-01-01.
@@ -3558,7 +3702,7 @@ module FinnhubRuby
3558
3702
  end
3559
3703
 
3560
3704
  # Major Press Releases
3561
- # Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.
3705
+ # &lt;p&gt;Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.&lt;/p&gt;&lt;p&gt;Full-text press releases data is available for Enterprise clients. &lt;a href&#x3D;\&quot;mailto:support@finnhub.io\&quot;&gt;Contact Us&lt;/a&gt; to learn more.&lt;/p&gt;
3562
3706
  # @param symbol [String] Company symbol.
3563
3707
  # @param [Hash] opts the optional parameters
3564
3708
  # @option opts [Date] :from From time: 2020-01-01.
@@ -3870,6 +4014,70 @@ module FinnhubRuby
3870
4014
  return data, status_code, headers
3871
4015
  end
3872
4016
 
4017
+ # Sector Metrics
4018
+ # Get ratios for different sectors and regions/indices.
4019
+ # @param region [String] Region. A list of supported values for this field can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1afedyv7yWJ-z7pMjaAZK-f6ENY3mI3EBCk95QffpoHw/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
4020
+ # @param [Hash] opts the optional parameters
4021
+ # @return [SectorMetric]
4022
+ def sector_metric(region, opts = {})
4023
+ data, _status_code, _headers = sector_metric_with_http_info(region, opts)
4024
+ data
4025
+ end
4026
+
4027
+ # Sector Metrics
4028
+ # Get ratios for different sectors and regions/indices.
4029
+ # @param region [String] Region. A list of supported values for this field can be found &lt;a href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1afedyv7yWJ-z7pMjaAZK-f6ENY3mI3EBCk95QffpoHw/edit?usp&#x3D;sharing\&quot; target&#x3D;\&quot;_blank\&quot;&gt;here&lt;/a&gt;.
4030
+ # @param [Hash] opts the optional parameters
4031
+ # @return [Array<(SectorMetric, Integer, Hash)>] SectorMetric data, response status code and response headers
4032
+ def sector_metric_with_http_info(region, opts = {})
4033
+ if @api_client.config.debugging
4034
+ @api_client.config.logger.debug 'Calling API: DefaultApi.sector_metric ...'
4035
+ end
4036
+ # verify the required parameter 'region' is set
4037
+ if @api_client.config.client_side_validation && region.nil?
4038
+ fail ArgumentError, "Missing the required parameter 'region' when calling DefaultApi.sector_metric"
4039
+ end
4040
+ # resource path
4041
+ local_var_path = '/sector/metrics'
4042
+
4043
+ # query parameters
4044
+ query_params = opts[:query_params] || {}
4045
+ query_params[:'region'] = region
4046
+
4047
+ # header parameters
4048
+ header_params = opts[:header_params] || {}
4049
+ # HTTP header 'Accept' (if needed)
4050
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4051
+
4052
+ # form parameters
4053
+ form_params = opts[:form_params] || {}
4054
+
4055
+ # http body (model)
4056
+ post_body = opts[:debug_body]
4057
+
4058
+ # return_type
4059
+ return_type = opts[:debug_return_type] || 'SectorMetric'
4060
+
4061
+ # auth_names
4062
+ auth_names = opts[:debug_auth_names] || ['api_key']
4063
+
4064
+ new_options = opts.merge(
4065
+ :operation => :"DefaultApi.sector_metric",
4066
+ :header_params => header_params,
4067
+ :query_params => query_params,
4068
+ :form_params => form_params,
4069
+ :body => post_body,
4070
+ :auth_names => auth_names,
4071
+ :return_type => return_type
4072
+ )
4073
+
4074
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4075
+ if @api_client.config.debugging
4076
+ @api_client.config.logger.debug "API called: DefaultApi#sector_metric\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4077
+ end
4078
+ return data, status_code, headers
4079
+ end
4080
+
3873
4081
  # Similarity Index
3874
4082
  # <p>Calculate the textual difference between a company's 10-K / 10-Q reports and the same type of report in the previous year using Cosine Similarity. For example, this endpoint compares 2019's 10-K with 2018's 10-K. Companies breaking from its routines in disclosure of financial condition and risk analysis section can signal a significant change in the company's stock price in the upcoming 4 quarters.</p>
3875
4083
  # @param [Hash] opts the optional parameters
@@ -4297,6 +4505,84 @@ module FinnhubRuby
4297
4505
  return data, status_code, headers
4298
4506
  end
4299
4507
 
4508
+ # Senate Lobbying
4509
+ # Get a list of reported lobbying activities in the Senate and the House.
4510
+ # @param symbol [String] Symbol.
4511
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4512
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4513
+ # @param [Hash] opts the optional parameters
4514
+ # @return [LobbyingResult]
4515
+ def stock_lobbying(symbol, from, to, opts = {})
4516
+ data, _status_code, _headers = stock_lobbying_with_http_info(symbol, from, to, opts)
4517
+ data
4518
+ end
4519
+
4520
+ # Senate Lobbying
4521
+ # Get a list of reported lobbying activities in the Senate and the House.
4522
+ # @param symbol [String] Symbol.
4523
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4524
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;.
4525
+ # @param [Hash] opts the optional parameters
4526
+ # @return [Array<(LobbyingResult, Integer, Hash)>] LobbyingResult data, response status code and response headers
4527
+ def stock_lobbying_with_http_info(symbol, from, to, opts = {})
4528
+ if @api_client.config.debugging
4529
+ @api_client.config.logger.debug 'Calling API: DefaultApi.stock_lobbying ...'
4530
+ end
4531
+ # verify the required parameter 'symbol' is set
4532
+ if @api_client.config.client_side_validation && symbol.nil?
4533
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_lobbying"
4534
+ end
4535
+ # verify the required parameter 'from' is set
4536
+ if @api_client.config.client_side_validation && from.nil?
4537
+ fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_lobbying"
4538
+ end
4539
+ # verify the required parameter 'to' is set
4540
+ if @api_client.config.client_side_validation && to.nil?
4541
+ fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_lobbying"
4542
+ end
4543
+ # resource path
4544
+ local_var_path = '/stock/lobbying'
4545
+
4546
+ # query parameters
4547
+ query_params = opts[:query_params] || {}
4548
+ query_params[:'symbol'] = symbol
4549
+ query_params[:'from'] = from
4550
+ query_params[:'to'] = to
4551
+
4552
+ # header parameters
4553
+ header_params = opts[:header_params] || {}
4554
+ # HTTP header 'Accept' (if needed)
4555
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4556
+
4557
+ # form parameters
4558
+ form_params = opts[:form_params] || {}
4559
+
4560
+ # http body (model)
4561
+ post_body = opts[:debug_body]
4562
+
4563
+ # return_type
4564
+ return_type = opts[:debug_return_type] || 'LobbyingResult'
4565
+
4566
+ # auth_names
4567
+ auth_names = opts[:debug_auth_names] || ['api_key']
4568
+
4569
+ new_options = opts.merge(
4570
+ :operation => :"DefaultApi.stock_lobbying",
4571
+ :header_params => header_params,
4572
+ :query_params => query_params,
4573
+ :form_params => form_params,
4574
+ :body => post_body,
4575
+ :auth_names => auth_names,
4576
+ :return_type => return_type
4577
+ )
4578
+
4579
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4580
+ if @api_client.config.debugging
4581
+ @api_client.config.logger.debug "API called: DefaultApi#stock_lobbying\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4582
+ end
4583
+ return data, status_code, headers
4584
+ end
4585
+
4300
4586
  # Historical NBBO
4301
4587
  # <p>Get historical best bid and offer for US stocks, LSE, TSX, Euronext and Deutsche Borse.</p><p>For US market, this endpoint only serves historical NBBO from the beginning of 2020. To download more historical data, please visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a>.</p>
4302
4588
  # @param symbol [String] Symbol.
@@ -4618,6 +4904,84 @@ module FinnhubRuby
4618
4904
  return data, status_code, headers
4619
4905
  end
4620
4906
 
4907
+ # USA Spending
4908
+ # Get a list of government's spending activities from USASpending dataset for public companies. This dataset can help you identify companies that win big government contracts which is extremely important for industries such as Defense, Aerospace, and Education.
4909
+ # @param symbol [String] Symbol.
4910
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter for &lt;code&gt;actionDate&lt;/code&gt;
4911
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter for &lt;code&gt;actionDate&lt;/code&gt;
4912
+ # @param [Hash] opts the optional parameters
4913
+ # @return [UsaSpendingResult]
4914
+ def stock_usa_spending(symbol, from, to, opts = {})
4915
+ data, _status_code, _headers = stock_usa_spending_with_http_info(symbol, from, to, opts)
4916
+ data
4917
+ end
4918
+
4919
+ # USA Spending
4920
+ # Get a list of government&#39;s spending activities from USASpending dataset for public companies. This dataset can help you identify companies that win big government contracts which is extremely important for industries such as Defense, Aerospace, and Education.
4921
+ # @param symbol [String] Symbol.
4922
+ # @param from [Date] From date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter for &lt;code&gt;actionDate&lt;/code&gt;
4923
+ # @param to [Date] To date &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. Filter for &lt;code&gt;actionDate&lt;/code&gt;
4924
+ # @param [Hash] opts the optional parameters
4925
+ # @return [Array<(UsaSpendingResult, Integer, Hash)>] UsaSpendingResult data, response status code and response headers
4926
+ def stock_usa_spending_with_http_info(symbol, from, to, opts = {})
4927
+ if @api_client.config.debugging
4928
+ @api_client.config.logger.debug 'Calling API: DefaultApi.stock_usa_spending ...'
4929
+ end
4930
+ # verify the required parameter 'symbol' is set
4931
+ if @api_client.config.client_side_validation && symbol.nil?
4932
+ fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_usa_spending"
4933
+ end
4934
+ # verify the required parameter 'from' is set
4935
+ if @api_client.config.client_side_validation && from.nil?
4936
+ fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_usa_spending"
4937
+ end
4938
+ # verify the required parameter 'to' is set
4939
+ if @api_client.config.client_side_validation && to.nil?
4940
+ fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_usa_spending"
4941
+ end
4942
+ # resource path
4943
+ local_var_path = '/stock/usa-spending'
4944
+
4945
+ # query parameters
4946
+ query_params = opts[:query_params] || {}
4947
+ query_params[:'symbol'] = symbol
4948
+ query_params[:'from'] = from
4949
+ query_params[:'to'] = to
4950
+
4951
+ # header parameters
4952
+ header_params = opts[:header_params] || {}
4953
+ # HTTP header 'Accept' (if needed)
4954
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4955
+
4956
+ # form parameters
4957
+ form_params = opts[:form_params] || {}
4958
+
4959
+ # http body (model)
4960
+ post_body = opts[:debug_body]
4961
+
4962
+ # return_type
4963
+ return_type = opts[:debug_return_type] || 'UsaSpendingResult'
4964
+
4965
+ # auth_names
4966
+ auth_names = opts[:debug_auth_names] || ['api_key']
4967
+
4968
+ new_options = opts.merge(
4969
+ :operation => :"DefaultApi.stock_usa_spending",
4970
+ :header_params => header_params,
4971
+ :query_params => query_params,
4972
+ :form_params => form_params,
4973
+ :body => post_body,
4974
+ :auth_names => auth_names,
4975
+ :return_type => return_type
4976
+ )
4977
+
4978
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4979
+ if @api_client.config.debugging
4980
+ @api_client.config.logger.debug "API called: DefaultApi#stock_usa_spending\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4981
+ end
4982
+ return data, status_code, headers
4983
+ end
4984
+
4621
4985
  # USPTO Patents
4622
4986
  # List USPTO patents for companies. Limit to 250 records per API call.
4623
4987
  # @param symbol [String] Symbol.