finnhub_ruby 1.1.14 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +230 -0
- data/docs/LobbyingData.md +46 -0
- data/docs/LobbyingResult.md +20 -0
- data/finnhub_ruby-1.1.14.gem +0 -0
- data/lib/finnhub_ruby/api/default_api.rb +222 -0
- 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/lobbying_data.rb +359 -0
- data/lib/finnhub_ruby/models/lobbying_result.rb +231 -0
- data/lib/finnhub_ruby/version.rb +1 -1
- data/lib/finnhub_ruby.rb +4 -0
- data/spec/models/bond_candles_spec.rb +46 -0
- data/spec/models/bond_profile_spec.rb +154 -0
- data/spec/models/lobbying_data_spec.rb +118 -0
- data/spec/models/lobbying_result_spec.rb +40 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eb9be10d64f2d31e2bc650ead53d2cf0171ab2a5745def2db38f07d77762176
|
4
|
+
data.tar.gz: 77a1b37f54aea5c20055e0d3a4df528bfd5e26620aa197c37c3f14d1843fa4a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0430e5f97277f8449e84b4c74e5e5809b4a566ee5a51654b18e580ed5020a6f2ed1365f613100b083800b26e4e57b337e5843ace61cad8120866c0590b36bb3b
|
7
|
+
data.tar.gz: c578d69cef0a0c8559502a8404e0698dff090fdf37cc4b480d1eaffa714b7565bee6ebfb1728a674debd8a2f6b70808c8cb24d3ae150089dcf834ab8a4addbee
|
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.
|
4
|
+
- Package version: 1.1.15
|
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.
|
16
|
+
gem 'finnhub_ruby', '~> 1.1.15'
|
17
17
|
```
|
18
18
|
|
19
19
|
## Getting Started
|
data/docs/BondCandles.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# FinnhubRuby::BondCandles
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **c** | **Array<Float>** | List of close prices for returned candles. | [optional] |
|
8
|
+
| **t** | **Array<Integer>** | List of timestamp for returned candles. | [optional] |
|
9
|
+
| **s** | **String** | Status of the response. This field can either be ok or no_data. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'finnhub_ruby'
|
15
|
+
|
16
|
+
instance = FinnhubRuby::BondCandles.new(
|
17
|
+
c: null,
|
18
|
+
t: null,
|
19
|
+
s: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/BondProfile.md
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# FinnhubRuby::BondProfile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **isin** | **String** | ISIN. | [optional] |
|
8
|
+
| **cusip** | **String** | Cusip. | [optional] |
|
9
|
+
| **figi** | **String** | FIGI. | [optional] |
|
10
|
+
| **coupon** | **Float** | Coupon. | [optional] |
|
11
|
+
| **maturity_date** | **String** | Period. | [optional] |
|
12
|
+
| **offering_price** | **Float** | Offering price. | [optional] |
|
13
|
+
| **issue_date** | **String** | Issue date. | [optional] |
|
14
|
+
| **bond_type** | **String** | Bond type. | [optional] |
|
15
|
+
| **debt_type** | **String** | Bond type. | [optional] |
|
16
|
+
| **industry_group** | **String** | Industry. | [optional] |
|
17
|
+
| **industry_sub_group** | **String** | Sub-Industry. | [optional] |
|
18
|
+
| **asset** | **String** | Asset. | [optional] |
|
19
|
+
| **asset_type** | **String** | Asset. | [optional] |
|
20
|
+
| **dated_date** | **String** | Dated date. | [optional] |
|
21
|
+
| **first_coupon_date** | **String** | First coupon date. | [optional] |
|
22
|
+
| **original_offering** | **Float** | Offering amount. | [optional] |
|
23
|
+
| **amount_outstanding** | **Float** | Outstanding amount. | [optional] |
|
24
|
+
| **payment_frequency** | **String** | Payment frequency. | [optional] |
|
25
|
+
| **security_level** | **String** | Security level. | [optional] |
|
26
|
+
| **callable** | **Boolean** | Callable. | [optional] |
|
27
|
+
| **coupon_type** | **String** | Coupon type. | [optional] |
|
28
|
+
|
29
|
+
## Example
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
require 'finnhub_ruby'
|
33
|
+
|
34
|
+
instance = FinnhubRuby::BondProfile.new(
|
35
|
+
isin: null,
|
36
|
+
cusip: null,
|
37
|
+
figi: null,
|
38
|
+
coupon: null,
|
39
|
+
maturity_date: null,
|
40
|
+
offering_price: null,
|
41
|
+
issue_date: null,
|
42
|
+
bond_type: null,
|
43
|
+
debt_type: null,
|
44
|
+
industry_group: null,
|
45
|
+
industry_sub_group: null,
|
46
|
+
asset: null,
|
47
|
+
asset_type: null,
|
48
|
+
dated_date: null,
|
49
|
+
first_coupon_date: null,
|
50
|
+
original_offering: null,
|
51
|
+
amount_outstanding: null,
|
52
|
+
payment_frequency: null,
|
53
|
+
security_level: null,
|
54
|
+
callable: null,
|
55
|
+
coupon_type: null
|
56
|
+
)
|
57
|
+
```
|
58
|
+
|
data/docs/DefaultApi.md
CHANGED
@@ -5,6 +5,8 @@ All URIs are relative to *https://finnhub.io/api/v1*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**aggregate_indicator**](DefaultApi.md#aggregate_indicator) | **GET** /scan/technical-indicator | Aggregate Indicators |
|
8
|
+
| [**bond_price**](DefaultApi.md#bond_price) | **GET** /bond/price | Bond price data |
|
9
|
+
| [**bond_profile**](DefaultApi.md#bond_profile) | **GET** /bond/profile | Bond Profile |
|
8
10
|
| [**company_basic_financials**](DefaultApi.md#company_basic_financials) | **GET** /stock/metric | Basic Financials |
|
9
11
|
| [**company_earnings**](DefaultApi.md#company_earnings) | **GET** /stock/earnings | Earnings Surprises |
|
10
12
|
| [**company_earnings_quality_score**](DefaultApi.md#company_earnings_quality_score) | **GET** /stock/earnings-quality-score | Company Earnings Quality Score |
|
@@ -68,6 +70,7 @@ All URIs are relative to *https://finnhub.io/api/v1*
|
|
68
70
|
| [**stock_bidask**](DefaultApi.md#stock_bidask) | **GET** /stock/bidask | Last Bid-Ask |
|
69
71
|
| [**stock_candles**](DefaultApi.md#stock_candles) | **GET** /stock/candle | Stock Candles |
|
70
72
|
| [**stock_dividends**](DefaultApi.md#stock_dividends) | **GET** /stock/dividend | Dividends |
|
73
|
+
| [**stock_lobbying**](DefaultApi.md#stock_lobbying) | **GET** /stock/lobbying | Senate Lobbying |
|
71
74
|
| [**stock_nbbo**](DefaultApi.md#stock_nbbo) | **GET** /stock/bbo | Historical NBBO |
|
72
75
|
| [**stock_splits**](DefaultApi.md#stock_splits) | **GET** /stock/split | Splits |
|
73
76
|
| [**stock_symbols**](DefaultApi.md#stock_symbols) | **GET** /stock/symbol | Stock Symbol |
|
@@ -156,6 +159,158 @@ end
|
|
156
159
|
- **Accept**: application/json
|
157
160
|
|
158
161
|
|
162
|
+
## bond_price
|
163
|
+
|
164
|
+
> <BondCandles> bond_price(isin, from, to)
|
165
|
+
|
166
|
+
Bond price data
|
167
|
+
|
168
|
+
Get end-of-day bond's price data.
|
169
|
+
|
170
|
+
### Examples
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
require 'time'
|
174
|
+
require 'finnhub_ruby'
|
175
|
+
# setup authorization
|
176
|
+
FinnhubRuby.configure do |config|
|
177
|
+
# Configure API key authorization: api_key
|
178
|
+
config.api_key['api_key'] = 'YOUR API KEY'
|
179
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
180
|
+
# config.api_key_prefix['api_key'] = 'Bearer'
|
181
|
+
end
|
182
|
+
|
183
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
184
|
+
isin = 'isin_example' # String | ISIN.
|
185
|
+
from = 789 # Integer | UNIX timestamp. Interval initial value.
|
186
|
+
to = 789 # Integer | UNIX timestamp. Interval end value.
|
187
|
+
|
188
|
+
begin
|
189
|
+
# Bond price data
|
190
|
+
result = api_instance.bond_price(isin, from, to)
|
191
|
+
p result
|
192
|
+
rescue FinnhubRuby::ApiError => e
|
193
|
+
puts "Error when calling DefaultApi->bond_price: #{e}"
|
194
|
+
end
|
195
|
+
```
|
196
|
+
|
197
|
+
#### Using the bond_price_with_http_info variant
|
198
|
+
|
199
|
+
This returns an Array which contains the response data, status code and headers.
|
200
|
+
|
201
|
+
> <Array(<BondCandles>, Integer, Hash)> bond_price_with_http_info(isin, from, to)
|
202
|
+
|
203
|
+
```ruby
|
204
|
+
begin
|
205
|
+
# Bond price data
|
206
|
+
data, status_code, headers = api_instance.bond_price_with_http_info(isin, from, to)
|
207
|
+
p status_code # => 2xx
|
208
|
+
p headers # => { ... }
|
209
|
+
p data # => <BondCandles>
|
210
|
+
rescue FinnhubRuby::ApiError => e
|
211
|
+
puts "Error when calling DefaultApi->bond_price_with_http_info: #{e}"
|
212
|
+
end
|
213
|
+
```
|
214
|
+
|
215
|
+
### Parameters
|
216
|
+
|
217
|
+
| Name | Type | Description | Notes |
|
218
|
+
| ---- | ---- | ----------- | ----- |
|
219
|
+
| **isin** | **String** | ISIN. | |
|
220
|
+
| **from** | **Integer** | UNIX timestamp. Interval initial value. | |
|
221
|
+
| **to** | **Integer** | UNIX timestamp. Interval end value. | |
|
222
|
+
|
223
|
+
### Return type
|
224
|
+
|
225
|
+
[**BondCandles**](BondCandles.md)
|
226
|
+
|
227
|
+
### Authorization
|
228
|
+
|
229
|
+
[api_key](../README.md#api_key)
|
230
|
+
|
231
|
+
### HTTP request headers
|
232
|
+
|
233
|
+
- **Content-Type**: Not defined
|
234
|
+
- **Accept**: application/json
|
235
|
+
|
236
|
+
|
237
|
+
## bond_profile
|
238
|
+
|
239
|
+
> <BondProfile> bond_profile(opts)
|
240
|
+
|
241
|
+
Bond Profile
|
242
|
+
|
243
|
+
Get general information of a bond. You can query by FIGI, ISIN or CUSIP
|
244
|
+
|
245
|
+
### Examples
|
246
|
+
|
247
|
+
```ruby
|
248
|
+
require 'time'
|
249
|
+
require 'finnhub_ruby'
|
250
|
+
# setup authorization
|
251
|
+
FinnhubRuby.configure do |config|
|
252
|
+
# Configure API key authorization: api_key
|
253
|
+
config.api_key['api_key'] = 'YOUR API KEY'
|
254
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
255
|
+
# config.api_key_prefix['api_key'] = 'Bearer'
|
256
|
+
end
|
257
|
+
|
258
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
259
|
+
opts = {
|
260
|
+
isin: 'isin_example', # String | ISIN
|
261
|
+
cusip: 'cusip_example', # String | CUSIP
|
262
|
+
figi: 'figi_example' # String | FIGI
|
263
|
+
}
|
264
|
+
|
265
|
+
begin
|
266
|
+
# Bond Profile
|
267
|
+
result = api_instance.bond_profile(opts)
|
268
|
+
p result
|
269
|
+
rescue FinnhubRuby::ApiError => e
|
270
|
+
puts "Error when calling DefaultApi->bond_profile: #{e}"
|
271
|
+
end
|
272
|
+
```
|
273
|
+
|
274
|
+
#### Using the bond_profile_with_http_info variant
|
275
|
+
|
276
|
+
This returns an Array which contains the response data, status code and headers.
|
277
|
+
|
278
|
+
> <Array(<BondProfile>, Integer, Hash)> bond_profile_with_http_info(opts)
|
279
|
+
|
280
|
+
```ruby
|
281
|
+
begin
|
282
|
+
# Bond Profile
|
283
|
+
data, status_code, headers = api_instance.bond_profile_with_http_info(opts)
|
284
|
+
p status_code # => 2xx
|
285
|
+
p headers # => { ... }
|
286
|
+
p data # => <BondProfile>
|
287
|
+
rescue FinnhubRuby::ApiError => e
|
288
|
+
puts "Error when calling DefaultApi->bond_profile_with_http_info: #{e}"
|
289
|
+
end
|
290
|
+
```
|
291
|
+
|
292
|
+
### Parameters
|
293
|
+
|
294
|
+
| Name | Type | Description | Notes |
|
295
|
+
| ---- | ---- | ----------- | ----- |
|
296
|
+
| **isin** | **String** | ISIN | [optional] |
|
297
|
+
| **cusip** | **String** | CUSIP | [optional] |
|
298
|
+
| **figi** | **String** | FIGI | [optional] |
|
299
|
+
|
300
|
+
### Return type
|
301
|
+
|
302
|
+
[**BondProfile**](BondProfile.md)
|
303
|
+
|
304
|
+
### Authorization
|
305
|
+
|
306
|
+
[api_key](../README.md#api_key)
|
307
|
+
|
308
|
+
### HTTP request headers
|
309
|
+
|
310
|
+
- **Content-Type**: Not defined
|
311
|
+
- **Accept**: application/json
|
312
|
+
|
313
|
+
|
159
314
|
## company_basic_financials
|
160
315
|
|
161
316
|
> <BasicFinancials> company_basic_financials(symbol, metric)
|
@@ -4787,6 +4942,81 @@ end
|
|
4787
4942
|
- **Accept**: application/json
|
4788
4943
|
|
4789
4944
|
|
4945
|
+
## stock_lobbying
|
4946
|
+
|
4947
|
+
> <LobbyingResult> stock_lobbying(symbol, from, to)
|
4948
|
+
|
4949
|
+
Senate Lobbying
|
4950
|
+
|
4951
|
+
Get a list of reported lobbying activities in the Senate and the House.
|
4952
|
+
|
4953
|
+
### Examples
|
4954
|
+
|
4955
|
+
```ruby
|
4956
|
+
require 'time'
|
4957
|
+
require 'finnhub_ruby'
|
4958
|
+
# setup authorization
|
4959
|
+
FinnhubRuby.configure do |config|
|
4960
|
+
# Configure API key authorization: api_key
|
4961
|
+
config.api_key['api_key'] = 'YOUR API KEY'
|
4962
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
4963
|
+
# config.api_key_prefix['api_key'] = 'Bearer'
|
4964
|
+
end
|
4965
|
+
|
4966
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
4967
|
+
symbol = 'symbol_example' # String | Symbol.
|
4968
|
+
from = Date.parse('2013-10-20') # Date | From date <code>YYYY-MM-DD</code>.
|
4969
|
+
to = Date.parse('2013-10-20') # Date | To date <code>YYYY-MM-DD</code>.
|
4970
|
+
|
4971
|
+
begin
|
4972
|
+
# Senate Lobbying
|
4973
|
+
result = api_instance.stock_lobbying(symbol, from, to)
|
4974
|
+
p result
|
4975
|
+
rescue FinnhubRuby::ApiError => e
|
4976
|
+
puts "Error when calling DefaultApi->stock_lobbying: #{e}"
|
4977
|
+
end
|
4978
|
+
```
|
4979
|
+
|
4980
|
+
#### Using the stock_lobbying_with_http_info variant
|
4981
|
+
|
4982
|
+
This returns an Array which contains the response data, status code and headers.
|
4983
|
+
|
4984
|
+
> <Array(<LobbyingResult>, Integer, Hash)> stock_lobbying_with_http_info(symbol, from, to)
|
4985
|
+
|
4986
|
+
```ruby
|
4987
|
+
begin
|
4988
|
+
# Senate Lobbying
|
4989
|
+
data, status_code, headers = api_instance.stock_lobbying_with_http_info(symbol, from, to)
|
4990
|
+
p status_code # => 2xx
|
4991
|
+
p headers # => { ... }
|
4992
|
+
p data # => <LobbyingResult>
|
4993
|
+
rescue FinnhubRuby::ApiError => e
|
4994
|
+
puts "Error when calling DefaultApi->stock_lobbying_with_http_info: #{e}"
|
4995
|
+
end
|
4996
|
+
```
|
4997
|
+
|
4998
|
+
### Parameters
|
4999
|
+
|
5000
|
+
| Name | Type | Description | Notes |
|
5001
|
+
| ---- | ---- | ----------- | ----- |
|
5002
|
+
| **symbol** | **String** | Symbol. | |
|
5003
|
+
| **from** | **Date** | From date <code>YYYY-MM-DD</code>. | |
|
5004
|
+
| **to** | **Date** | To date <code>YYYY-MM-DD</code>. | |
|
5005
|
+
|
5006
|
+
### Return type
|
5007
|
+
|
5008
|
+
[**LobbyingResult**](LobbyingResult.md)
|
5009
|
+
|
5010
|
+
### Authorization
|
5011
|
+
|
5012
|
+
[api_key](../README.md#api_key)
|
5013
|
+
|
5014
|
+
### HTTP request headers
|
5015
|
+
|
5016
|
+
- **Content-Type**: Not defined
|
5017
|
+
- **Accept**: application/json
|
5018
|
+
|
5019
|
+
|
4790
5020
|
## stock_nbbo
|
4791
5021
|
|
4792
5022
|
> <HistoricalNBBO> stock_nbbo(symbol, date, limit, skip)
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# FinnhubRuby::LobbyingData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **symbol** | **String** | Symbol. | [optional] |
|
8
|
+
| **name** | **String** | Company's name. | [optional] |
|
9
|
+
| **description** | **String** | Description. | [optional] |
|
10
|
+
| **country** | **String** | Country. | [optional] |
|
11
|
+
| **year** | **Integer** | Year. | [optional] |
|
12
|
+
| **period** | **String** | Period. | [optional] |
|
13
|
+
| **income** | **Float** | Income reported by lobbying firms. | [optional] |
|
14
|
+
| **expenses** | **Float** | Expenses reported by the company. | [optional] |
|
15
|
+
| **document_url** | **String** | Document's URL. | [optional] |
|
16
|
+
| **posted_name** | **String** | Posted name. | [optional] |
|
17
|
+
| **date** | **String** | Date. | [optional] |
|
18
|
+
| **client_id** | **String** | Client ID. | [optional] |
|
19
|
+
| **registrant_id** | **String** | Registrant ID. | [optional] |
|
20
|
+
| **senate_id** | **String** | Senate ID. | [optional] |
|
21
|
+
| **houseregistrant_id** | **String** | House registrant ID. | [optional] |
|
22
|
+
|
23
|
+
## Example
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'finnhub_ruby'
|
27
|
+
|
28
|
+
instance = FinnhubRuby::LobbyingData.new(
|
29
|
+
symbol: null,
|
30
|
+
name: null,
|
31
|
+
description: null,
|
32
|
+
country: null,
|
33
|
+
year: null,
|
34
|
+
period: null,
|
35
|
+
income: null,
|
36
|
+
expenses: null,
|
37
|
+
document_url: null,
|
38
|
+
posted_name: null,
|
39
|
+
date: null,
|
40
|
+
client_id: null,
|
41
|
+
registrant_id: null,
|
42
|
+
senate_id: null,
|
43
|
+
houseregistrant_id: null
|
44
|
+
)
|
45
|
+
```
|
46
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# FinnhubRuby::LobbyingResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **symbol** | **String** | Symbol. | [optional] |
|
8
|
+
| **data** | [**Array<LobbyingData>**](LobbyingData.md) | Array of lobbying activities. | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'finnhub_ruby'
|
14
|
+
|
15
|
+
instance = FinnhubRuby::LobbyingResult.new(
|
16
|
+
symbol: null,
|
17
|
+
data: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
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.
|
@@ -4297,6 +4441,84 @@ module FinnhubRuby
|
|
4297
4441
|
return data, status_code, headers
|
4298
4442
|
end
|
4299
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
|
+
|
4300
4522
|
# Historical NBBO
|
4301
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>
|
4302
4524
|
# @param symbol [String] Symbol.
|