finnhub_ruby 1.1.13 → 1.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/BondCandles.md +22 -0
- data/docs/BondProfile.md +58 -0
- data/docs/DefaultApi.md +392 -8
- data/docs/InsiderSentiments.md +20 -0
- data/docs/InsiderSentimentsData.md +26 -0
- data/docs/LobbyingData.md +46 -0
- data/docs/LobbyingResult.md +20 -0
- data/docs/UsaSpending.md +56 -0
- data/docs/UsaSpendingResult.md +20 -0
- data/docs/VisaApplication.md +2 -2
- data/finnhub_ruby-1.1.13.gem +0 -0
- data/finnhub_ruby-1.1.14.gem +0 -0
- data/finnhub_ruby-1.1.15.gem +0 -0
- data/lib/finnhub_ruby/api/default_api.rb +395 -14
- data/lib/finnhub_ruby/models/bond_candles.rb +243 -0
- data/lib/finnhub_ruby/models/bond_profile.rb +419 -0
- data/lib/finnhub_ruby/models/insider_sentiments.rb +231 -0
- data/lib/finnhub_ruby/models/insider_sentiments_data.rb +259 -0
- data/lib/finnhub_ruby/models/lobbying_data.rb +359 -0
- data/lib/finnhub_ruby/models/lobbying_result.rb +231 -0
- data/lib/finnhub_ruby/models/usa_spending.rb +409 -0
- data/lib/finnhub_ruby/models/usa_spending_result.rb +231 -0
- data/lib/finnhub_ruby/models/visa_application.rb +7 -7
- data/lib/finnhub_ruby/version.rb +1 -1
- data/lib/finnhub_ruby.rb +8 -0
- data/spec/models/bond_candles_spec.rb +46 -0
- data/spec/models/bond_profile_spec.rb +154 -0
- data/spec/models/insider_sentiments_data_spec.rb +58 -0
- data/spec/models/insider_sentiments_spec.rb +40 -0
- data/spec/models/lobbying_data_spec.rb +118 -0
- data/spec/models/lobbying_result_spec.rb +40 -0
- data/spec/models/usa_spending_result_spec.rb +40 -0
- data/spec/models/usa_spending_spec.rb +148 -0
- metadata +37 -2
@@ -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.
|
@@ -1676,6 +1820,7 @@ module FinnhubRuby
|
|
1676
1820
|
# @option opts [String] :symbol ETF symbol.
|
1677
1821
|
# @option opts [String] :isin ETF isin.
|
1678
1822
|
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
1823
|
+
# @option opts [String] :date Query holdings by date. You can use either this param or <code>skip</code> param, not both.
|
1679
1824
|
# @return [ETFsHoldings]
|
1680
1825
|
def etfs_holdings(opts = {})
|
1681
1826
|
data, _status_code, _headers = etfs_holdings_with_http_info(opts)
|
@@ -1688,6 +1833,7 @@ module FinnhubRuby
|
|
1688
1833
|
# @option opts [String] :symbol ETF symbol.
|
1689
1834
|
# @option opts [String] :isin ETF isin.
|
1690
1835
|
# @option opts [Integer] :skip Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
|
1836
|
+
# @option opts [String] :date Query holdings by date. You can use either this param or <code>skip</code> param, not both.
|
1691
1837
|
# @return [Array<(ETFsHoldings, Integer, Hash)>] ETFsHoldings data, response status code and response headers
|
1692
1838
|
def etfs_holdings_with_http_info(opts = {})
|
1693
1839
|
if @api_client.config.debugging
|
@@ -1701,6 +1847,7 @@ module FinnhubRuby
|
|
1701
1847
|
query_params[:'symbol'] = opts[:'symbol'] if !opts[:'symbol'].nil?
|
1702
1848
|
query_params[:'isin'] = opts[:'isin'] if !opts[:'isin'].nil?
|
1703
1849
|
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
1850
|
+
query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
|
1704
1851
|
|
1705
1852
|
# header parameters
|
1706
1853
|
header_params = opts[:header_params] || {}
|
@@ -2607,7 +2754,7 @@ module FinnhubRuby
|
|
2607
2754
|
end
|
2608
2755
|
|
2609
2756
|
# Indices Historical Constituents
|
2610
|
-
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC
|
2757
|
+
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC</code>, <code>^NDX</code>, <code>^DJI</code>
|
2611
2758
|
# @param symbol [String] symbol
|
2612
2759
|
# @param [Hash] opts the optional parameters
|
2613
2760
|
# @return [IndicesHistoricalConstituents]
|
@@ -2617,7 +2764,7 @@ module FinnhubRuby
|
|
2617
2764
|
end
|
2618
2765
|
|
2619
2766
|
# Indices Historical Constituents
|
2620
|
-
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC
|
2767
|
+
# Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC</code>, <code>^NDX</code>, <code>^DJI</code>
|
2621
2768
|
# @param symbol [String] symbol
|
2622
2769
|
# @param [Hash] opts the optional parameters
|
2623
2770
|
# @return [Array<(IndicesHistoricalConstituents, Integer, Hash)>] IndicesHistoricalConstituents data, response status code and response headers
|
@@ -2670,6 +2817,84 @@ module FinnhubRuby
|
|
2670
2817
|
return data, status_code, headers
|
2671
2818
|
end
|
2672
2819
|
|
2820
|
+
# Insider Sentiment
|
2821
|
+
# Get insider sentiment data for US companies calculated using method discussed <a href=\"https://medium.com/@stock-api/finnhub-insiders-sentiment-analysis-cc43f9f64b3a\" target=\"_blank\">here</a>. The MSPR ranges from -100 for the most negative to 100 for the most positive which can signal price changes in the coming 30-90 days.
|
2822
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
2823
|
+
# @param from [Date] From date: 2020-03-15.
|
2824
|
+
# @param to [Date] To date: 2020-03-16.
|
2825
|
+
# @param [Hash] opts the optional parameters
|
2826
|
+
# @return [InsiderSentiments]
|
2827
|
+
def insider_sentiment(symbol, from, to, opts = {})
|
2828
|
+
data, _status_code, _headers = insider_sentiment_with_http_info(symbol, from, to, opts)
|
2829
|
+
data
|
2830
|
+
end
|
2831
|
+
|
2832
|
+
# Insider Sentiment
|
2833
|
+
# Get insider sentiment data for US companies calculated using method discussed <a href=\"https://medium.com/@stock-api/finnhub-insiders-sentiment-analysis-cc43f9f64b3a\" target=\"_blank\">here</a>. The MSPR ranges from -100 for the most negative to 100 for the most positive which can signal price changes in the coming 30-90 days.
|
2834
|
+
# @param symbol [String] Symbol of the company: AAPL.
|
2835
|
+
# @param from [Date] From date: 2020-03-15.
|
2836
|
+
# @param to [Date] To date: 2020-03-16.
|
2837
|
+
# @param [Hash] opts the optional parameters
|
2838
|
+
# @return [Array<(InsiderSentiments, Integer, Hash)>] InsiderSentiments data, response status code and response headers
|
2839
|
+
def insider_sentiment_with_http_info(symbol, from, to, opts = {})
|
2840
|
+
if @api_client.config.debugging
|
2841
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.insider_sentiment ...'
|
2842
|
+
end
|
2843
|
+
# verify the required parameter 'symbol' is set
|
2844
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
2845
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.insider_sentiment"
|
2846
|
+
end
|
2847
|
+
# verify the required parameter 'from' is set
|
2848
|
+
if @api_client.config.client_side_validation && from.nil?
|
2849
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.insider_sentiment"
|
2850
|
+
end
|
2851
|
+
# verify the required parameter 'to' is set
|
2852
|
+
if @api_client.config.client_side_validation && to.nil?
|
2853
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.insider_sentiment"
|
2854
|
+
end
|
2855
|
+
# resource path
|
2856
|
+
local_var_path = '/stock/insider-sentiment'
|
2857
|
+
|
2858
|
+
# query parameters
|
2859
|
+
query_params = opts[:query_params] || {}
|
2860
|
+
query_params[:'symbol'] = symbol
|
2861
|
+
query_params[:'from'] = from
|
2862
|
+
query_params[:'to'] = to
|
2863
|
+
|
2864
|
+
# header parameters
|
2865
|
+
header_params = opts[:header_params] || {}
|
2866
|
+
# HTTP header 'Accept' (if needed)
|
2867
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2868
|
+
|
2869
|
+
# form parameters
|
2870
|
+
form_params = opts[:form_params] || {}
|
2871
|
+
|
2872
|
+
# http body (model)
|
2873
|
+
post_body = opts[:debug_body]
|
2874
|
+
|
2875
|
+
# return_type
|
2876
|
+
return_type = opts[:debug_return_type] || 'InsiderSentiments'
|
2877
|
+
|
2878
|
+
# auth_names
|
2879
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
2880
|
+
|
2881
|
+
new_options = opts.merge(
|
2882
|
+
:operation => :"DefaultApi.insider_sentiment",
|
2883
|
+
:header_params => header_params,
|
2884
|
+
:query_params => query_params,
|
2885
|
+
:form_params => form_params,
|
2886
|
+
:body => post_body,
|
2887
|
+
:auth_names => auth_names,
|
2888
|
+
:return_type => return_type
|
2889
|
+
)
|
2890
|
+
|
2891
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2892
|
+
if @api_client.config.debugging
|
2893
|
+
@api_client.config.logger.debug "API called: DefaultApi#insider_sentiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2894
|
+
end
|
2895
|
+
return data, status_code, headers
|
2896
|
+
end
|
2897
|
+
|
2673
2898
|
# Insider Transactions
|
2674
2899
|
# Company insider transactions data sourced from <code>Form 3,4,5</code>. This endpoint only covers US companies at the moment. Limit to 100 transactions per API call.
|
2675
2900
|
# @param symbol [String] Symbol of the company: AAPL. Leave this param blank to get the latest transactions.
|
@@ -3070,7 +3295,7 @@ module FinnhubRuby
|
|
3070
3295
|
end
|
3071
3296
|
|
3072
3297
|
# Mutual Funds Holdings
|
3073
|
-
# 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.
|
3074
3299
|
# @param [Hash] opts the optional parameters
|
3075
3300
|
# @option opts [String] :symbol Fund's symbol.
|
3076
3301
|
# @option opts [String] :isin Fund's isin.
|
@@ -3082,7 +3307,7 @@ module FinnhubRuby
|
|
3082
3307
|
end
|
3083
3308
|
|
3084
3309
|
# Mutual Funds Holdings
|
3085
|
-
# 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.
|
3086
3311
|
# @param [Hash] opts the optional parameters
|
3087
3312
|
# @option opts [String] :symbol Fund's symbol.
|
3088
3313
|
# @option opts [String] :isin Fund's isin.
|
@@ -3136,7 +3361,7 @@ module FinnhubRuby
|
|
3136
3361
|
end
|
3137
3362
|
|
3138
3363
|
# Mutual Funds Profile
|
3139
|
-
# Get mutual funds profile information. This endpoint covers US mutual funds
|
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.
|
3140
3365
|
# @param [Hash] opts the optional parameters
|
3141
3366
|
# @option opts [String] :symbol Fund's symbol.
|
3142
3367
|
# @option opts [String] :isin Fund's isin.
|
@@ -3147,7 +3372,7 @@ module FinnhubRuby
|
|
3147
3372
|
end
|
3148
3373
|
|
3149
3374
|
# Mutual Funds Profile
|
3150
|
-
# Get mutual funds profile information. This endpoint covers US mutual funds
|
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.
|
3151
3376
|
# @param [Hash] opts the optional parameters
|
3152
3377
|
# @option opts [String] :symbol Fund's symbol.
|
3153
3378
|
# @option opts [String] :isin Fund's isin.
|
@@ -4216,6 +4441,84 @@ module FinnhubRuby
|
|
4216
4441
|
return data, status_code, headers
|
4217
4442
|
end
|
4218
4443
|
|
4444
|
+
# Senate Lobbying
|
4445
|
+
# Get a list of reported lobbying activities in the Senate and the House.
|
4446
|
+
# @param symbol [String] Symbol.
|
4447
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
4448
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
4449
|
+
# @param [Hash] opts the optional parameters
|
4450
|
+
# @return [LobbyingResult]
|
4451
|
+
def stock_lobbying(symbol, from, to, opts = {})
|
4452
|
+
data, _status_code, _headers = stock_lobbying_with_http_info(symbol, from, to, opts)
|
4453
|
+
data
|
4454
|
+
end
|
4455
|
+
|
4456
|
+
# Senate Lobbying
|
4457
|
+
# Get a list of reported lobbying activities in the Senate and the House.
|
4458
|
+
# @param symbol [String] Symbol.
|
4459
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>.
|
4460
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>.
|
4461
|
+
# @param [Hash] opts the optional parameters
|
4462
|
+
# @return [Array<(LobbyingResult, Integer, Hash)>] LobbyingResult data, response status code and response headers
|
4463
|
+
def stock_lobbying_with_http_info(symbol, from, to, opts = {})
|
4464
|
+
if @api_client.config.debugging
|
4465
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_lobbying ...'
|
4466
|
+
end
|
4467
|
+
# verify the required parameter 'symbol' is set
|
4468
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
4469
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_lobbying"
|
4470
|
+
end
|
4471
|
+
# verify the required parameter 'from' is set
|
4472
|
+
if @api_client.config.client_side_validation && from.nil?
|
4473
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_lobbying"
|
4474
|
+
end
|
4475
|
+
# verify the required parameter 'to' is set
|
4476
|
+
if @api_client.config.client_side_validation && to.nil?
|
4477
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_lobbying"
|
4478
|
+
end
|
4479
|
+
# resource path
|
4480
|
+
local_var_path = '/stock/lobbying'
|
4481
|
+
|
4482
|
+
# query parameters
|
4483
|
+
query_params = opts[:query_params] || {}
|
4484
|
+
query_params[:'symbol'] = symbol
|
4485
|
+
query_params[:'from'] = from
|
4486
|
+
query_params[:'to'] = to
|
4487
|
+
|
4488
|
+
# header parameters
|
4489
|
+
header_params = opts[:header_params] || {}
|
4490
|
+
# HTTP header 'Accept' (if needed)
|
4491
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4492
|
+
|
4493
|
+
# form parameters
|
4494
|
+
form_params = opts[:form_params] || {}
|
4495
|
+
|
4496
|
+
# http body (model)
|
4497
|
+
post_body = opts[:debug_body]
|
4498
|
+
|
4499
|
+
# return_type
|
4500
|
+
return_type = opts[:debug_return_type] || 'LobbyingResult'
|
4501
|
+
|
4502
|
+
# auth_names
|
4503
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
4504
|
+
|
4505
|
+
new_options = opts.merge(
|
4506
|
+
:operation => :"DefaultApi.stock_lobbying",
|
4507
|
+
:header_params => header_params,
|
4508
|
+
:query_params => query_params,
|
4509
|
+
:form_params => form_params,
|
4510
|
+
:body => post_body,
|
4511
|
+
:auth_names => auth_names,
|
4512
|
+
:return_type => return_type
|
4513
|
+
)
|
4514
|
+
|
4515
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4516
|
+
if @api_client.config.debugging
|
4517
|
+
@api_client.config.logger.debug "API called: DefaultApi#stock_lobbying\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4518
|
+
end
|
4519
|
+
return data, status_code, headers
|
4520
|
+
end
|
4521
|
+
|
4219
4522
|
# Historical NBBO
|
4220
4523
|
# <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>
|
4221
4524
|
# @param symbol [String] Symbol.
|
@@ -4380,7 +4683,7 @@ module FinnhubRuby
|
|
4380
4683
|
end
|
4381
4684
|
|
4382
4685
|
# Stock Symbol
|
4383
|
-
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4686
|
+
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4384
4687
|
# @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4385
4688
|
# @param [Hash] opts the optional parameters
|
4386
4689
|
# @option opts [String] :mic Filter by MIC code.
|
@@ -4393,7 +4696,7 @@ module FinnhubRuby
|
|
4393
4696
|
end
|
4394
4697
|
|
4395
4698
|
# Stock Symbol
|
4396
|
-
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4699
|
+
# List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4397
4700
|
# @param exchange [String] Exchange you want to get the list of symbols from. List of exchange codes can be found <a href=\"https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing\" target=\"_blank\">here</a>.
|
4398
4701
|
# @param [Hash] opts the optional parameters
|
4399
4702
|
# @option opts [String] :mic Filter by MIC code.
|
@@ -4453,7 +4756,7 @@ module FinnhubRuby
|
|
4453
4756
|
end
|
4454
4757
|
|
4455
4758
|
# Tick Data
|
4456
|
-
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr>
|
4759
|
+
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
|
4457
4760
|
# @param symbol [String] Symbol.
|
4458
4761
|
# @param date [Date] Date: 2020-04-02.
|
4459
4762
|
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
@@ -4466,7 +4769,7 @@ module FinnhubRuby
|
|
4466
4769
|
end
|
4467
4770
|
|
4468
4771
|
# Tick Data
|
4469
|
-
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr>
|
4772
|
+
# <p>Get historical tick data for global exchanges. You can send the request directly to our tick server at <a href=\"https://tick.finnhub.io/\">https://tick.finnhub.io/</a> with the same path and parameters or get redirected there if you call our main server.</p><p>For US market, you can visit our bulk download page in the Dashboard <a target=\"_blank\" href=\"/dashboard/download\",>here</a> to speed up the download process.</p><table class=\"table table-hover\"> <thead> <tr> <th>Exchange</th> <th>Segment</th> <th>Delay</th> </tr> </thead> <tbody> <tr> <td class=\"text-blue\">US CTA/UTP</th> <td>Full SIP</td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">TSX</th> <td><ul><li>TSX</li><li>TSX Venture</li><li>Index</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">LSE</th> <td><ul><li>London Stock Exchange (L)</li><li>LSE International (L)</li><li>LSE European (L)</li></ul></td> <td>15 minute</td> </tr> <tr> <td class=\"text-blue\">Euronext</th> <td><ul> <li>Euronext Paris (PA)</li> <li>Euronext Amsterdam (AS)</li> <li>Euronext Lisbon (LS)</li> <li>Euronext Brussels (BR)</li> <li>Euronext Oslo (OL)</li> <li>Euronext London (LN)</li> <li>Euronext Dublin (IR)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> <tr> <td class=\"text-blue\">Deutsche Börse</th> <td><ul> <li>Frankfurt (F)</li> <li>Xetra (DE)</li> <li>Duesseldorf (DU)</li> <li>Hamburg (HM)</li> <li>Berlin (BE)</li> <li>Hanover (HA)</li> <li>Stoxx (SX)</li> <li>TradeGate (TG)</li> <li>Zertifikate (SC)</li> <li>Index</li> <li>Warrant</li></ul></td> <td>End-of-day</td> </tr> </tbody> </table>
|
4470
4773
|
# @param symbol [String] Symbol.
|
4471
4774
|
# @param date [Date] Date: 2020-04-02.
|
4472
4775
|
# @param limit [Integer] Limit number of ticks returned. Maximum value: <code>25000</code>
|
@@ -4537,6 +4840,84 @@ module FinnhubRuby
|
|
4537
4840
|
return data, status_code, headers
|
4538
4841
|
end
|
4539
4842
|
|
4843
|
+
# USA Spending
|
4844
|
+
# 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.
|
4845
|
+
# @param symbol [String] Symbol.
|
4846
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>. Filter for <code>actionDate</code>
|
4847
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>. Filter for <code>actionDate</code>
|
4848
|
+
# @param [Hash] opts the optional parameters
|
4849
|
+
# @return [UsaSpendingResult]
|
4850
|
+
def stock_usa_spending(symbol, from, to, opts = {})
|
4851
|
+
data, _status_code, _headers = stock_usa_spending_with_http_info(symbol, from, to, opts)
|
4852
|
+
data
|
4853
|
+
end
|
4854
|
+
|
4855
|
+
# USA Spending
|
4856
|
+
# 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.
|
4857
|
+
# @param symbol [String] Symbol.
|
4858
|
+
# @param from [Date] From date <code>YYYY-MM-DD</code>. Filter for <code>actionDate</code>
|
4859
|
+
# @param to [Date] To date <code>YYYY-MM-DD</code>. Filter for <code>actionDate</code>
|
4860
|
+
# @param [Hash] opts the optional parameters
|
4861
|
+
# @return [Array<(UsaSpendingResult, Integer, Hash)>] UsaSpendingResult data, response status code and response headers
|
4862
|
+
def stock_usa_spending_with_http_info(symbol, from, to, opts = {})
|
4863
|
+
if @api_client.config.debugging
|
4864
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.stock_usa_spending ...'
|
4865
|
+
end
|
4866
|
+
# verify the required parameter 'symbol' is set
|
4867
|
+
if @api_client.config.client_side_validation && symbol.nil?
|
4868
|
+
fail ArgumentError, "Missing the required parameter 'symbol' when calling DefaultApi.stock_usa_spending"
|
4869
|
+
end
|
4870
|
+
# verify the required parameter 'from' is set
|
4871
|
+
if @api_client.config.client_side_validation && from.nil?
|
4872
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling DefaultApi.stock_usa_spending"
|
4873
|
+
end
|
4874
|
+
# verify the required parameter 'to' is set
|
4875
|
+
if @api_client.config.client_side_validation && to.nil?
|
4876
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling DefaultApi.stock_usa_spending"
|
4877
|
+
end
|
4878
|
+
# resource path
|
4879
|
+
local_var_path = '/stock/usa-spending'
|
4880
|
+
|
4881
|
+
# query parameters
|
4882
|
+
query_params = opts[:query_params] || {}
|
4883
|
+
query_params[:'symbol'] = symbol
|
4884
|
+
query_params[:'from'] = from
|
4885
|
+
query_params[:'to'] = to
|
4886
|
+
|
4887
|
+
# header parameters
|
4888
|
+
header_params = opts[:header_params] || {}
|
4889
|
+
# HTTP header 'Accept' (if needed)
|
4890
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
4891
|
+
|
4892
|
+
# form parameters
|
4893
|
+
form_params = opts[:form_params] || {}
|
4894
|
+
|
4895
|
+
# http body (model)
|
4896
|
+
post_body = opts[:debug_body]
|
4897
|
+
|
4898
|
+
# return_type
|
4899
|
+
return_type = opts[:debug_return_type] || 'UsaSpendingResult'
|
4900
|
+
|
4901
|
+
# auth_names
|
4902
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
4903
|
+
|
4904
|
+
new_options = opts.merge(
|
4905
|
+
:operation => :"DefaultApi.stock_usa_spending",
|
4906
|
+
:header_params => header_params,
|
4907
|
+
:query_params => query_params,
|
4908
|
+
:form_params => form_params,
|
4909
|
+
:body => post_body,
|
4910
|
+
:auth_names => auth_names,
|
4911
|
+
:return_type => return_type
|
4912
|
+
)
|
4913
|
+
|
4914
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4915
|
+
if @api_client.config.debugging
|
4916
|
+
@api_client.config.logger.debug "API called: DefaultApi#stock_usa_spending\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4917
|
+
end
|
4918
|
+
return data, status_code, headers
|
4919
|
+
end
|
4920
|
+
|
4540
4921
|
# USPTO Patents
|
4541
4922
|
# List USPTO patents for companies. Limit to 250 records per API call.
|
4542
4923
|
# @param symbol [String] Symbol.
|
@@ -4694,7 +5075,7 @@ module FinnhubRuby
|
|
4694
5075
|
end
|
4695
5076
|
|
4696
5077
|
# Supply Chain Relationships
|
4697
|
-
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p
|
5078
|
+
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p>
|
4698
5079
|
# @param symbol [String] Symbol.
|
4699
5080
|
# @param [Hash] opts the optional parameters
|
4700
5081
|
# @return [SupplyChainRelationships]
|
@@ -4704,7 +5085,7 @@ module FinnhubRuby
|
|
4704
5085
|
end
|
4705
5086
|
|
4706
5087
|
# Supply Chain Relationships
|
4707
|
-
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p>
|
5088
|
+
# <p>This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.</p>
|
4708
5089
|
# @param symbol [String] Symbol.
|
4709
5090
|
# @param [Hash] opts the optional parameters
|
4710
5091
|
# @return [Array<(SupplyChainRelationships, Integer, Hash)>] SupplyChainRelationships data, response status code and response headers
|
@@ -5053,7 +5434,7 @@ module FinnhubRuby
|
|
5053
5434
|
end
|
5054
5435
|
|
5055
5436
|
# Earnings Call Transcripts List
|
5056
|
-
# List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies.
|
5437
|
+
# List earnings call transcripts' metadata. This endpoint is available for US, UK, European, Australian and Canadian companies.
|
5057
5438
|
# @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
|
5058
5439
|
# @param [Hash] opts the optional parameters
|
5059
5440
|
# @return [EarningsCallTranscriptsList]
|
@@ -5063,7 +5444,7 @@ module FinnhubRuby
|
|
5063
5444
|
end
|
5064
5445
|
|
5065
5446
|
# Earnings Call Transcripts List
|
5066
|
-
# List earnings call transcripts' metadata. This endpoint is available for US, UK and Canadian companies.
|
5447
|
+
# List earnings call transcripts' metadata. This endpoint is available for US, UK, European, Australian and Canadian companies.
|
5067
5448
|
# @param symbol [String] Company symbol: AAPL. Leave empty to list the latest transcripts
|
5068
5449
|
# @param [Hash] opts the optional parameters
|
5069
5450
|
# @return [Array<(EarningsCallTranscriptsList, Integer, Hash)>] EarningsCallTranscriptsList data, response status code and response headers
|