finnhub_ruby 1.0.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -2
- data/docs/CompanyProfile.md +1 -1
- data/docs/DefaultApi.md +394 -3
- data/docs/ETFCountryExposureData.md +19 -0
- data/docs/ETFHoldingsData.md +21 -0
- data/docs/ETFSectorExposureData.md +19 -0
- data/docs/ETFsCountryExposure.md +19 -0
- data/docs/ETFsHoldings.md +19 -0
- data/docs/ETFsIndustryExposure.md +19 -0
- data/docs/ETFsProfile.md +19 -0
- data/docs/IndexHistoricalConstituent.md +21 -0
- data/docs/IndicesConstituents.md +19 -0
- data/docs/IndicesHistoricalConstituents.md +19 -0
- data/docs/SimilarityIndex.md +21 -0
- data/docs/Stock.md +5 -1
- data/docs/Trend.md +3 -1
- data/lib/finnhub_ruby.rb +11 -0
- data/lib/finnhub_ruby/api/default_api.rb +447 -4
- data/lib/finnhub_ruby/api_client.rb +1 -2
- data/lib/finnhub_ruby/models/company_profile.rb +1 -1
- data/lib/finnhub_ruby/models/et_fs_country_exposure.rb +219 -0
- data/lib/finnhub_ruby/models/et_fs_holdings.rb +219 -0
- data/lib/finnhub_ruby/models/et_fs_industry_exposure.rb +219 -0
- data/lib/finnhub_ruby/models/et_fs_profile.rb +216 -0
- data/lib/finnhub_ruby/models/etf_country_exposure_data.rb +217 -0
- data/lib/finnhub_ruby/models/etf_holdings_data.rb +227 -0
- data/lib/finnhub_ruby/models/etf_sector_exposure_data.rb +217 -0
- data/lib/finnhub_ruby/models/index_historical_constituent.rb +227 -0
- data/lib/finnhub_ruby/models/indices_constituents.rb +219 -0
- data/lib/finnhub_ruby/models/indices_historical_constituents.rb +219 -0
- data/lib/finnhub_ruby/models/similarity_index.rb +229 -0
- data/lib/finnhub_ruby/models/stock.rb +24 -4
- data/lib/finnhub_ruby/models/trend.rb +14 -4
- data/lib/finnhub_ruby/version.rb +1 -1
- data/release.sh +1 -1
- data/spec/api/default_api_spec.rb +88 -2
- data/spec/models/et_fs_country_exposure_spec.rb +47 -0
- data/spec/models/et_fs_holdings_spec.rb +47 -0
- data/spec/models/et_fs_industry_exposure_spec.rb +47 -0
- data/spec/models/et_fs_profile_spec.rb +47 -0
- data/spec/models/etf_country_exposure_data_spec.rb +47 -0
- data/spec/models/etf_holdings_data_spec.rb +53 -0
- data/spec/models/etf_sector_exposure_data_spec.rb +47 -0
- data/spec/models/index_historical_constituent_spec.rb +53 -0
- data/spec/models/indices_constituents_spec.rb +47 -0
- data/spec/models/indices_historical_constituents_spec.rb +47 -0
- data/spec/models/similarity_index_spec.rb +53 -0
- data/spec/models/stock_spec.rb +12 -0
- data/spec/models/trend_spec.rb +6 -0
- data/test.rb +18 -0
- metadata +46 -3
- data/finnhub_ruby-1.0.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03b4f036da13874d02dce82fe8620103e5ddc8434cac7380fee5a1ab6ead4ee1
|
4
|
+
data.tar.gz: f8cd880646d1b79a97b18007bc1dde08f7cad20efd1f2a61cf8327e2e409c294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30846c760b942085a9f6b825792a02d9f8edf0561ac30bb786d493bf3d030947deaf3433c92fd3d431cd205b510079c8a42413b91c960af1a169b397768c86d4
|
7
|
+
data.tar.gz: 81e20e75a2cadd5da24782ac1b60b9542622be78e536a922b794d8643b67310c9e0c559ccacb28db4015281f5dc2c485c140395c5b70af24ce7929083c54a552
|
data/README.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
# finnhub-python
|
2
2
|
- API documentation: https://finnhub.io/docs/api
|
3
3
|
- API version: 1.0.0
|
4
|
-
- Package version: 1.
|
4
|
+
- Package version: 1.1.2
|
5
5
|
|
6
6
|
## Installation
|
7
|
+
https://rubygems.org/gems/finnhub_ruby
|
7
8
|
|
8
9
|
```sh
|
9
10
|
gem install finnhub_ruby
|
@@ -12,7 +13,7 @@ gem install finnhub_ruby
|
|
12
13
|
or in your Gemfile
|
13
14
|
|
14
15
|
```ruby
|
15
|
-
gem 'finnhub_ruby', '~> 1.
|
16
|
+
gem 'finnhub_ruby', '~> 1.1.2'
|
16
17
|
```
|
17
18
|
|
18
19
|
## Getting Started
|
@@ -157,6 +158,24 @@ puts(finnhub_client.stock_tick_with_http_info('AAPL', '2020-03-25', 500, 0))
|
|
157
158
|
|
158
159
|
# Technical Indicator
|
159
160
|
puts(finnhub_client.technical_indicator("AAPL", 'D', 1583098857, 1584308457, 'rsi', {"timeperiod": 3}))
|
161
|
+
|
162
|
+
# Indices Constituents
|
163
|
+
puts(finnhub_client.indices_constituents("^GSPC"))
|
164
|
+
|
165
|
+
# Indices Historical Constituents
|
166
|
+
puts(finnhub_client.indices_historical_constituents("^GSPC"))
|
167
|
+
|
168
|
+
# ETFs Profile
|
169
|
+
puts(finnhub_client.etfs_profile('SPY'))
|
170
|
+
|
171
|
+
# ETFs Holdings
|
172
|
+
puts(finnhub_client.etfs_holdings('SPY'))
|
173
|
+
|
174
|
+
# ETFs Industry Exposure
|
175
|
+
puts(finnhub_client.etfs_industry_exposure('SPY'))
|
176
|
+
|
177
|
+
# ETFs Country Exposure
|
178
|
+
puts(finnhub_client.etfs_country_exposure('SPY'))
|
160
179
|
```
|
161
180
|
|
162
181
|
## License
|
data/docs/CompanyProfile.md
CHANGED
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**country** | **String** | Country of company's headquarter. | [optional]
|
10
10
|
**currency** | **String** | Currency used in company filings. | [optional]
|
11
11
|
**cusip** | **String** | CUSIP number. | [optional]
|
12
|
-
**sedol** | **
|
12
|
+
**sedol** | **String** | Sedol number. | [optional]
|
13
13
|
**description** | **String** | Company business summary. | [optional]
|
14
14
|
**exchange** | **String** | Listed exchange. | [optional]
|
15
15
|
**ggroup** | **String** | GICS industry group. | [optional]
|
data/docs/DefaultApi.md
CHANGED
@@ -22,6 +22,10 @@ Method | HTTP request | Description
|
|
22
22
|
[**earnings_calendar**](DefaultApi.md#earnings_calendar) | **GET** /calendar/earnings | Earnings Calendar
|
23
23
|
[**economic_code**](DefaultApi.md#economic_code) | **GET** /economic/code | Economic Code
|
24
24
|
[**economic_data**](DefaultApi.md#economic_data) | **GET** /economic | Economic Data
|
25
|
+
[**etfs_country_exposure**](DefaultApi.md#etfs_country_exposure) | **GET** /etf/country | ETFs Country Exposure
|
26
|
+
[**etfs_holdings**](DefaultApi.md#etfs_holdings) | **GET** /etf/holdings | ETFs Holdings
|
27
|
+
[**etfs_industry_exposure**](DefaultApi.md#etfs_industry_exposure) | **GET** /etf/sector | ETFs Industry Exposure
|
28
|
+
[**etfs_profile**](DefaultApi.md#etfs_profile) | **GET** /etf/profile | ETFs Profile
|
25
29
|
[**filings**](DefaultApi.md#filings) | **GET** /stock/filings | Filings
|
26
30
|
[**financials**](DefaultApi.md#financials) | **GET** /stock/financials | Financial Statements
|
27
31
|
[**financials_reported**](DefaultApi.md#financials_reported) | **GET** /stock/financials-reported | Financials As Reported
|
@@ -31,6 +35,8 @@ Method | HTTP request | Description
|
|
31
35
|
[**forex_symbols**](DefaultApi.md#forex_symbols) | **GET** /forex/symbol | Forex Symbol
|
32
36
|
[**fund_ownership**](DefaultApi.md#fund_ownership) | **GET** /stock/fund-ownership | Fund Ownership
|
33
37
|
[**general_news**](DefaultApi.md#general_news) | **GET** /news | General News
|
38
|
+
[**indices_constituents**](DefaultApi.md#indices_constituents) | **GET** /index/constituents | Indices Constituents
|
39
|
+
[**indices_historical_constituents**](DefaultApi.md#indices_historical_constituents) | **GET** /index/historical-constituents | Indices Historical Constituents
|
34
40
|
[**investors_ownership**](DefaultApi.md#investors_ownership) | **GET** /stock/investor-ownership | Investors Ownership
|
35
41
|
[**ipo_calendar**](DefaultApi.md#ipo_calendar) | **GET** /calendar/ipo | IPO Calendar
|
36
42
|
[**major_developments**](DefaultApi.md#major_developments) | **GET** /major-development | Major Developments
|
@@ -39,6 +45,7 @@ Method | HTTP request | Description
|
|
39
45
|
[**price_target**](DefaultApi.md#price_target) | **GET** /stock/price-target | Price Target
|
40
46
|
[**quote**](DefaultApi.md#quote) | **GET** /quote | Quote
|
41
47
|
[**recommendation_trends**](DefaultApi.md#recommendation_trends) | **GET** /stock/recommendation | Recommendation Trends
|
48
|
+
[**similarity_index**](DefaultApi.md#similarity_index) | **GET** /stock/similarity-index | Similarity Index
|
42
49
|
[**stock_bidask**](DefaultApi.md#stock_bidask) | **GET** /stock/bidask | Last Bid-Ask
|
43
50
|
[**stock_candles**](DefaultApi.md#stock_candles) | **GET** /stock/candle | Stock Candles
|
44
51
|
[**stock_dividends**](DefaultApi.md#stock_dividends) | **GET** /stock/dividend | Dividends
|
@@ -915,7 +922,7 @@ opts = {
|
|
915
922
|
from: Date.parse('2013-10-20'), # Date | From date: 2020-03-15.
|
916
923
|
to: Date.parse('2013-10-20'), # Date | To date: 2020-03-16.
|
917
924
|
symbol: 'symbol_example', # String | Filter by symbol: AAPL.
|
918
|
-
international:
|
925
|
+
international: true # Boolean | Set to <code>true</code> to include international markets. Default value is <code>false</code>
|
919
926
|
}
|
920
927
|
|
921
928
|
begin
|
@@ -935,7 +942,7 @@ Name | Type | Description | Notes
|
|
935
942
|
**from** | **Date**| From date: 2020-03-15. | [optional]
|
936
943
|
**to** | **Date**| To date: 2020-03-16. | [optional]
|
937
944
|
**symbol** | **String**| Filter by symbol: AAPL. | [optional]
|
938
|
-
**international** |
|
945
|
+
**international** | **Boolean**| Set to <code>true</code> to include international markets. Default value is <code>false</code> | [optional]
|
939
946
|
|
940
947
|
### Return type
|
941
948
|
|
@@ -1055,6 +1062,222 @@ Name | Type | Description | Notes
|
|
1055
1062
|
- **Accept**: application/json
|
1056
1063
|
|
1057
1064
|
|
1065
|
+
## etfs_country_exposure
|
1066
|
+
|
1067
|
+
> ETFsCountryExposure etfs_country_exposure(symbol)
|
1068
|
+
|
1069
|
+
ETFs Country Exposure
|
1070
|
+
|
1071
|
+
Get ETF country exposure data.
|
1072
|
+
|
1073
|
+
### Example
|
1074
|
+
|
1075
|
+
```ruby
|
1076
|
+
# load the gem
|
1077
|
+
require 'finnhub_ruby'
|
1078
|
+
# setup authorization
|
1079
|
+
FinnhubRuby.configure do |config|
|
1080
|
+
# Configure API key authorization: api_key
|
1081
|
+
config.api_key['token'] = 'YOUR API KEY'
|
1082
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1083
|
+
#config.api_key_prefix['token'] = 'Bearer'
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
1087
|
+
symbol = 'symbol_example' # String | ETF symbol.
|
1088
|
+
|
1089
|
+
begin
|
1090
|
+
#ETFs Country Exposure
|
1091
|
+
result = api_instance.etfs_country_exposure(symbol)
|
1092
|
+
p result
|
1093
|
+
rescue FinnhubRuby::ApiError => e
|
1094
|
+
puts "Exception when calling DefaultApi->etfs_country_exposure: #{e}"
|
1095
|
+
end
|
1096
|
+
```
|
1097
|
+
|
1098
|
+
### Parameters
|
1099
|
+
|
1100
|
+
|
1101
|
+
Name | Type | Description | Notes
|
1102
|
+
------------- | ------------- | ------------- | -------------
|
1103
|
+
**symbol** | **String**| ETF symbol. |
|
1104
|
+
|
1105
|
+
### Return type
|
1106
|
+
|
1107
|
+
[**ETFsCountryExposure**](ETFsCountryExposure.md)
|
1108
|
+
|
1109
|
+
### Authorization
|
1110
|
+
|
1111
|
+
[api_key](../README.md#api_key)
|
1112
|
+
|
1113
|
+
### HTTP request headers
|
1114
|
+
|
1115
|
+
- **Content-Type**: Not defined
|
1116
|
+
- **Accept**: application/json
|
1117
|
+
|
1118
|
+
|
1119
|
+
## etfs_holdings
|
1120
|
+
|
1121
|
+
> ETFsHoldings etfs_holdings(symbol)
|
1122
|
+
|
1123
|
+
ETFs Holdings
|
1124
|
+
|
1125
|
+
Get current ETF holdings.
|
1126
|
+
|
1127
|
+
### Example
|
1128
|
+
|
1129
|
+
```ruby
|
1130
|
+
# load the gem
|
1131
|
+
require 'finnhub_ruby'
|
1132
|
+
# setup authorization
|
1133
|
+
FinnhubRuby.configure do |config|
|
1134
|
+
# Configure API key authorization: api_key
|
1135
|
+
config.api_key['token'] = 'YOUR API KEY'
|
1136
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1137
|
+
#config.api_key_prefix['token'] = 'Bearer'
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
1141
|
+
symbol = 'symbol_example' # String | ETF symbol.
|
1142
|
+
|
1143
|
+
begin
|
1144
|
+
#ETFs Holdings
|
1145
|
+
result = api_instance.etfs_holdings(symbol)
|
1146
|
+
p result
|
1147
|
+
rescue FinnhubRuby::ApiError => e
|
1148
|
+
puts "Exception when calling DefaultApi->etfs_holdings: #{e}"
|
1149
|
+
end
|
1150
|
+
```
|
1151
|
+
|
1152
|
+
### Parameters
|
1153
|
+
|
1154
|
+
|
1155
|
+
Name | Type | Description | Notes
|
1156
|
+
------------- | ------------- | ------------- | -------------
|
1157
|
+
**symbol** | **String**| ETF symbol. |
|
1158
|
+
|
1159
|
+
### Return type
|
1160
|
+
|
1161
|
+
[**ETFsHoldings**](ETFsHoldings.md)
|
1162
|
+
|
1163
|
+
### Authorization
|
1164
|
+
|
1165
|
+
[api_key](../README.md#api_key)
|
1166
|
+
|
1167
|
+
### HTTP request headers
|
1168
|
+
|
1169
|
+
- **Content-Type**: Not defined
|
1170
|
+
- **Accept**: application/json
|
1171
|
+
|
1172
|
+
|
1173
|
+
## etfs_industry_exposure
|
1174
|
+
|
1175
|
+
> ETFsIndustryExposure etfs_industry_exposure(symbol)
|
1176
|
+
|
1177
|
+
ETFs Industry Exposure
|
1178
|
+
|
1179
|
+
Get ETF industry exposure data.
|
1180
|
+
|
1181
|
+
### Example
|
1182
|
+
|
1183
|
+
```ruby
|
1184
|
+
# load the gem
|
1185
|
+
require 'finnhub_ruby'
|
1186
|
+
# setup authorization
|
1187
|
+
FinnhubRuby.configure do |config|
|
1188
|
+
# Configure API key authorization: api_key
|
1189
|
+
config.api_key['token'] = 'YOUR API KEY'
|
1190
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1191
|
+
#config.api_key_prefix['token'] = 'Bearer'
|
1192
|
+
end
|
1193
|
+
|
1194
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
1195
|
+
symbol = 'symbol_example' # String | ETF symbol.
|
1196
|
+
|
1197
|
+
begin
|
1198
|
+
#ETFs Industry Exposure
|
1199
|
+
result = api_instance.etfs_industry_exposure(symbol)
|
1200
|
+
p result
|
1201
|
+
rescue FinnhubRuby::ApiError => e
|
1202
|
+
puts "Exception when calling DefaultApi->etfs_industry_exposure: #{e}"
|
1203
|
+
end
|
1204
|
+
```
|
1205
|
+
|
1206
|
+
### Parameters
|
1207
|
+
|
1208
|
+
|
1209
|
+
Name | Type | Description | Notes
|
1210
|
+
------------- | ------------- | ------------- | -------------
|
1211
|
+
**symbol** | **String**| ETF symbol. |
|
1212
|
+
|
1213
|
+
### Return type
|
1214
|
+
|
1215
|
+
[**ETFsIndustryExposure**](ETFsIndustryExposure.md)
|
1216
|
+
|
1217
|
+
### Authorization
|
1218
|
+
|
1219
|
+
[api_key](../README.md#api_key)
|
1220
|
+
|
1221
|
+
### HTTP request headers
|
1222
|
+
|
1223
|
+
- **Content-Type**: Not defined
|
1224
|
+
- **Accept**: application/json
|
1225
|
+
|
1226
|
+
|
1227
|
+
## etfs_profile
|
1228
|
+
|
1229
|
+
> ETFsProfile etfs_profile(symbol)
|
1230
|
+
|
1231
|
+
ETFs Profile
|
1232
|
+
|
1233
|
+
Get ETF profile information. Currently support all US ETFs.
|
1234
|
+
|
1235
|
+
### Example
|
1236
|
+
|
1237
|
+
```ruby
|
1238
|
+
# load the gem
|
1239
|
+
require 'finnhub_ruby'
|
1240
|
+
# setup authorization
|
1241
|
+
FinnhubRuby.configure do |config|
|
1242
|
+
# Configure API key authorization: api_key
|
1243
|
+
config.api_key['token'] = 'YOUR API KEY'
|
1244
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1245
|
+
#config.api_key_prefix['token'] = 'Bearer'
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
1249
|
+
symbol = 'symbol_example' # String | ETF symbol.
|
1250
|
+
|
1251
|
+
begin
|
1252
|
+
#ETFs Profile
|
1253
|
+
result = api_instance.etfs_profile(symbol)
|
1254
|
+
p result
|
1255
|
+
rescue FinnhubRuby::ApiError => e
|
1256
|
+
puts "Exception when calling DefaultApi->etfs_profile: #{e}"
|
1257
|
+
end
|
1258
|
+
```
|
1259
|
+
|
1260
|
+
### Parameters
|
1261
|
+
|
1262
|
+
|
1263
|
+
Name | Type | Description | Notes
|
1264
|
+
------------- | ------------- | ------------- | -------------
|
1265
|
+
**symbol** | **String**| ETF symbol. |
|
1266
|
+
|
1267
|
+
### Return type
|
1268
|
+
|
1269
|
+
[**ETFsProfile**](ETFsProfile.md)
|
1270
|
+
|
1271
|
+
### Authorization
|
1272
|
+
|
1273
|
+
[api_key](../README.md#api_key)
|
1274
|
+
|
1275
|
+
### HTTP request headers
|
1276
|
+
|
1277
|
+
- **Content-Type**: Not defined
|
1278
|
+
- **Accept**: application/json
|
1279
|
+
|
1280
|
+
|
1058
1281
|
## filings
|
1059
1282
|
|
1060
1283
|
> Array<Filing> filings(opts)
|
@@ -1577,6 +1800,114 @@ Name | Type | Description | Notes
|
|
1577
1800
|
- **Accept**: application/json
|
1578
1801
|
|
1579
1802
|
|
1803
|
+
## indices_constituents
|
1804
|
+
|
1805
|
+
> IndicesConstituents indices_constituents(symbol)
|
1806
|
+
|
1807
|
+
Indices Constituents
|
1808
|
+
|
1809
|
+
Get a list of index's constituents. Currently support <code>^GSPC (S&P 500)</code>, <code>^NDX (Nasdaq 100)</code>, <code>^DJI (Dow Jones)</code>
|
1810
|
+
|
1811
|
+
### Example
|
1812
|
+
|
1813
|
+
```ruby
|
1814
|
+
# load the gem
|
1815
|
+
require 'finnhub_ruby'
|
1816
|
+
# setup authorization
|
1817
|
+
FinnhubRuby.configure do |config|
|
1818
|
+
# Configure API key authorization: api_key
|
1819
|
+
config.api_key['token'] = 'YOUR API KEY'
|
1820
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1821
|
+
#config.api_key_prefix['token'] = 'Bearer'
|
1822
|
+
end
|
1823
|
+
|
1824
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
1825
|
+
symbol = 'symbol_example' # String | symbol
|
1826
|
+
|
1827
|
+
begin
|
1828
|
+
#Indices Constituents
|
1829
|
+
result = api_instance.indices_constituents(symbol)
|
1830
|
+
p result
|
1831
|
+
rescue FinnhubRuby::ApiError => e
|
1832
|
+
puts "Exception when calling DefaultApi->indices_constituents: #{e}"
|
1833
|
+
end
|
1834
|
+
```
|
1835
|
+
|
1836
|
+
### Parameters
|
1837
|
+
|
1838
|
+
|
1839
|
+
Name | Type | Description | Notes
|
1840
|
+
------------- | ------------- | ------------- | -------------
|
1841
|
+
**symbol** | **String**| symbol |
|
1842
|
+
|
1843
|
+
### Return type
|
1844
|
+
|
1845
|
+
[**IndicesConstituents**](IndicesConstituents.md)
|
1846
|
+
|
1847
|
+
### Authorization
|
1848
|
+
|
1849
|
+
[api_key](../README.md#api_key)
|
1850
|
+
|
1851
|
+
### HTTP request headers
|
1852
|
+
|
1853
|
+
- **Content-Type**: Not defined
|
1854
|
+
- **Accept**: application/json
|
1855
|
+
|
1856
|
+
|
1857
|
+
## indices_historical_constituents
|
1858
|
+
|
1859
|
+
> IndicesHistoricalConstituents indices_historical_constituents(symbol)
|
1860
|
+
|
1861
|
+
Indices Historical Constituents
|
1862
|
+
|
1863
|
+
Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC (S&P 500)</code>, <code>^NDX (Nasdaq 100)</code>, <code>^DJI (Dow Jones)</code>
|
1864
|
+
|
1865
|
+
### Example
|
1866
|
+
|
1867
|
+
```ruby
|
1868
|
+
# load the gem
|
1869
|
+
require 'finnhub_ruby'
|
1870
|
+
# setup authorization
|
1871
|
+
FinnhubRuby.configure do |config|
|
1872
|
+
# Configure API key authorization: api_key
|
1873
|
+
config.api_key['token'] = 'YOUR API KEY'
|
1874
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1875
|
+
#config.api_key_prefix['token'] = 'Bearer'
|
1876
|
+
end
|
1877
|
+
|
1878
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
1879
|
+
symbol = 'symbol_example' # String | symbol
|
1880
|
+
|
1881
|
+
begin
|
1882
|
+
#Indices Historical Constituents
|
1883
|
+
result = api_instance.indices_historical_constituents(symbol)
|
1884
|
+
p result
|
1885
|
+
rescue FinnhubRuby::ApiError => e
|
1886
|
+
puts "Exception when calling DefaultApi->indices_historical_constituents: #{e}"
|
1887
|
+
end
|
1888
|
+
```
|
1889
|
+
|
1890
|
+
### Parameters
|
1891
|
+
|
1892
|
+
|
1893
|
+
Name | Type | Description | Notes
|
1894
|
+
------------- | ------------- | ------------- | -------------
|
1895
|
+
**symbol** | **String**| symbol |
|
1896
|
+
|
1897
|
+
### Return type
|
1898
|
+
|
1899
|
+
[**IndicesHistoricalConstituents**](IndicesHistoricalConstituents.md)
|
1900
|
+
|
1901
|
+
### Authorization
|
1902
|
+
|
1903
|
+
[api_key](../README.md#api_key)
|
1904
|
+
|
1905
|
+
### HTTP request headers
|
1906
|
+
|
1907
|
+
- **Content-Type**: Not defined
|
1908
|
+
- **Accept**: application/json
|
1909
|
+
|
1910
|
+
|
1580
1911
|
## investors_ownership
|
1581
1912
|
|
1582
1913
|
> InvestorsOwnership investors_ownership(symbol, opts)
|
@@ -2023,6 +2354,66 @@ Name | Type | Description | Notes
|
|
2023
2354
|
- **Accept**: application/json
|
2024
2355
|
|
2025
2356
|
|
2357
|
+
## similarity_index
|
2358
|
+
|
2359
|
+
> SimilarityIndex similarity_index(opts)
|
2360
|
+
|
2361
|
+
Similarity Index
|
2362
|
+
|
2363
|
+
<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>
|
2364
|
+
|
2365
|
+
### Example
|
2366
|
+
|
2367
|
+
```ruby
|
2368
|
+
# load the gem
|
2369
|
+
require 'finnhub_ruby'
|
2370
|
+
# setup authorization
|
2371
|
+
FinnhubRuby.configure do |config|
|
2372
|
+
# Configure API key authorization: api_key
|
2373
|
+
config.api_key['token'] = 'YOUR API KEY'
|
2374
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
2375
|
+
#config.api_key_prefix['token'] = 'Bearer'
|
2376
|
+
end
|
2377
|
+
|
2378
|
+
api_instance = FinnhubRuby::DefaultApi.new
|
2379
|
+
opts = {
|
2380
|
+
symbol: 'symbol_example', # String | Symbol. Required if cik is empty
|
2381
|
+
cik: 'cik_example', # String | CIK. Required if symbol is empty
|
2382
|
+
freq: 'freq_example' # String | <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>
|
2383
|
+
}
|
2384
|
+
|
2385
|
+
begin
|
2386
|
+
#Similarity Index
|
2387
|
+
result = api_instance.similarity_index(opts)
|
2388
|
+
p result
|
2389
|
+
rescue FinnhubRuby::ApiError => e
|
2390
|
+
puts "Exception when calling DefaultApi->similarity_index: #{e}"
|
2391
|
+
end
|
2392
|
+
```
|
2393
|
+
|
2394
|
+
### Parameters
|
2395
|
+
|
2396
|
+
|
2397
|
+
Name | Type | Description | Notes
|
2398
|
+
------------- | ------------- | ------------- | -------------
|
2399
|
+
**symbol** | **String**| Symbol. Required if cik is empty | [optional]
|
2400
|
+
**cik** | **String**| CIK. Required if symbol is empty | [optional]
|
2401
|
+
**freq** | **String**| <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code> | [optional]
|
2402
|
+
|
2403
|
+
### Return type
|
2404
|
+
|
2405
|
+
[**SimilarityIndex**](SimilarityIndex.md)
|
2406
|
+
|
2407
|
+
### Authorization
|
2408
|
+
|
2409
|
+
[api_key](../README.md#api_key)
|
2410
|
+
|
2411
|
+
### HTTP request headers
|
2412
|
+
|
2413
|
+
- **Content-Type**: Not defined
|
2414
|
+
- **Accept**: application/json
|
2415
|
+
|
2416
|
+
|
2026
2417
|
## stock_bidask
|
2027
2418
|
|
2028
2419
|
> LastBidAsk stock_bidask(symbol)
|
@@ -2263,7 +2654,7 @@ Name | Type | Description | Notes
|
|
2263
2654
|
|
2264
2655
|
Stock Symbol
|
2265
2656
|
|
2266
|
-
List supported stocks.
|
2657
|
+
List supported stocks. A list of supported CFD Indices can be found <a href=\"https://docs.google.com/spreadsheets/d/1BAbIXBgl405fj0oHeEyRFEu8mW4QD1PhvtaBATLoR14/edit?usp=sharing\" target=\"_blank\">here</a>.
|
2267
2658
|
|
2268
2659
|
### Example
|
2269
2660
|
|