finnhub_ruby 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f5ca0c3eb663220b1ce26a51d7f0d73811ef76ed36d7fd8b6f0bdafb1aefe06
4
- data.tar.gz: cc715e395c7526aadbb094284c202a49d55b5855e4ec9f7e5ed98fa27b29de79
3
+ metadata.gz: a70ac55cf588637c512ec84fa7655dbf8e2e409c9f787e3f777d39cf12327a8c
4
+ data.tar.gz: 19d2e98d3e8c2723658aa573b4e5cc7517183fa23c925b3039978abb4cbd3bdc
5
5
  SHA512:
6
- metadata.gz: 491edeacc31ce9f52f1a4085ed1809922ef2bf5c7e0aa20a204f76d43c59ebabc49430e765130f53c81ca4ae67f15fff2033490c211f392dd536e914a5eb4b4d
7
- data.tar.gz: c23bb87082594740381e8b49ba33fa07997c845c8c962e2ac36cbc7c4d5bd37af9a4c89761b56d3c2c7646876ccba008747b680a6c388de9b037478bf6561053
6
+ metadata.gz: 5b7458c812f9d8276cb2e3120a01741b6c38a3e9e64843f0e8e6f2dab367e5c79ac0d4a581b04c9ba6086cee092d7d90cdcf04dc861854ee8725cdec6782b4b5
7
+ data.tar.gz: e8cdbf0da56e5a7a9f0911a00770bf24bec656957062bfde4b596a3e0a82e6d5bf723b6665a49774c90e9162e00a77e8239f4860948096cd55a49ac4dbe71da7
@@ -1,3 +1,3 @@
1
1
  module FinnhubRuby
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
data/lib/finnhub_ruby.rb CHANGED
@@ -54,7 +54,6 @@ module FinnhubRuby
54
54
  params = params.dup
55
55
  params['token'] = @config.api_key['api_key']
56
56
  uri.query = URI.encode_www_form(params)
57
- puts(uri)
58
57
 
59
58
  # Some endpoints redirect to another endpoint, so we need to handle that
60
59
  limit = 2
@@ -507,6 +506,10 @@ module FinnhubRuby
507
506
  get('/covid19/us')
508
507
  end
509
508
 
509
+ def bank_branch(symbol)
510
+ get('/bank-branch', { symbol: symbol })
511
+ end
512
+
510
513
  private
511
514
 
512
515
  def handle_response(res)
data/test.rb ADDED
@@ -0,0 +1,234 @@
1
+ require_relative 'lib/finnhub_ruby'
2
+
3
+ FinnhubRuby.configure do |config|
4
+ config.api_key['api_key'] = 'cvei43pr01ql1jnbj1dgcvei43pr01ql1jnbj1e0'
5
+ end
6
+
7
+ client = FinnhubRuby::DefaultApi.new
8
+
9
+ # Similarity Index
10
+ puts(client.similarity_index(symbol: 'AAPL'))
11
+
12
+ # Stock symbols
13
+ puts(client.stock_symbols('US'))
14
+
15
+ #Symbol search
16
+ puts(client.symbol_search('AAPL'))
17
+
18
+ # Tick Data
19
+ puts(client.stock_tick('NFLX', '2020-03-25', 500, 0))
20
+
21
+ # NBBO
22
+ puts(client.stock_nbbo('NFLX', '2020-03-25', 500, 0))
23
+
24
+ #Bid ask
25
+ puts(client.last_bid_ask('AAPL'))
26
+
27
+ # Forex all pairs
28
+ puts(client.forex_rates(base: 'USD'))
29
+
30
+ # Stock candles
31
+ puts(client.stock_candles('AAPL', 'D', 1590988249, 1591852249))
32
+
33
+ # Aggregate Indicators
34
+ puts(client.aggregate_indicator('AAPL', 'D'))
35
+
36
+ # Basic financials
37
+ puts(client.company_basic_financials('AAPL', 'all'))
38
+
39
+ # Earnings surprises
40
+ puts(client.company_earnings('TSLA', limit: 5))
41
+
42
+ # EPS estimates
43
+ puts(client.company_eps_estimates('AMZN', freq: 'quarterly'))
44
+
45
+ # Company Executives
46
+ puts(client.company_executive('AAPL'))
47
+
48
+ # Company News
49
+ puts(client.company_news('AAPL', "2020-06-01", "2020-06-10"))
50
+
51
+ # Company Peers
52
+ puts(client.company_peers('AAPL'))
53
+
54
+ # Company Profile
55
+ puts(client.company_profile({symbol: 'AAPL'}))
56
+ puts(client.company_profile({isin: 'US0378331005'}))
57
+ puts(client.company_profile({cusip: '037833100'}))
58
+
59
+ # Company Profile 2
60
+ puts(client.company_profile2({symbol: 'AAPL'}))
61
+
62
+ # Revenue Estimates
63
+ puts(client.company_revenue_estimates('TSLA', freq: 'quarterly'))
64
+
65
+ # List country
66
+ puts(client.country())
67
+
68
+ # Crypto Exchange
69
+ puts(client.crypto_exchanges())
70
+
71
+ # Crypto symbols
72
+ puts(client.crypto_symbols('BINANCE'))
73
+
74
+ # Economic code
75
+ puts(client.economic_code())
76
+
77
+ # Economic data
78
+ puts(client.economic_data('MA-USA-656880'))
79
+
80
+ # Economic calendar
81
+ puts(client.economic_calendar())
82
+
83
+ # Filings
84
+ puts(client.filings(symbol: 'AAPL', from: "2020-01-01", to: "2020-06-11"))
85
+
86
+ # International Filings
87
+ puts(client.international_filings(symbol: 'AC.TO'))
88
+
89
+ # Filings Sentiment
90
+ puts(client.sentiment_analysis('0000320193-20-000052'))
91
+
92
+ # Financials
93
+ puts(client.financials('AAPL', 'bs', 'annual'))
94
+
95
+ # Financials as reported
96
+ puts(client.financials_reported({symbol: 'AAPL', freq: 'annual'}))
97
+
98
+ # Forex exchanges
99
+ puts(client.forex_exchanges())
100
+
101
+ # Forex symbols
102
+ puts(client.forex_symbols('OANDA'))
103
+
104
+ # Fund Ownership
105
+ puts(client.fund_ownership('AMZN', limit: 5))
106
+
107
+ # General news
108
+ puts(client.general_news('forex', min_id: 0))
109
+
110
+ # IPO calendar
111
+ puts(client.ipo_calendar("2020-05-01", "2020-06-01"))
112
+
113
+ # Press Releases
114
+ puts(client.press_releases('AAPL', from: "2020-01-01", to: "2020-12-31"))
115
+
116
+ # News sentiment
117
+ puts(client.news_sentiment('AAPL'))
118
+
119
+ # Pattern recognition
120
+ puts(client.pattern_recognition('AAPL', 'D'))
121
+
122
+ # Price target
123
+ puts(client.price_target('AAPL'))
124
+
125
+ # Quote
126
+ puts(client.quote('AAPL'))
127
+
128
+ # Recommendation trends
129
+ puts(client.recommendation_trends('AAPL'))
130
+
131
+ # Stock dividends
132
+ puts(client.stock_dividends('KO', from: '2019-01-01', to: '2020-01-01'))
133
+
134
+ # Stock basic dividends
135
+ puts(client.stock_basic_dividends('KO'))
136
+
137
+ # Transcripts
138
+ puts(client.transcripts('AAPL_162777'))
139
+
140
+ # Transcripts list
141
+ puts(client.transcripts_list('AAPL'))
142
+
143
+ # Earnings Calendar
144
+ puts(client.earnings_calendar(from: "2020-06-10", to: "2020-06-30", symbol: "", international: false))
145
+
146
+ # Covid-19
147
+ puts(client.covid19())
148
+
149
+ # Upgrade downgrade
150
+ puts(client.upgrade_downgrade(symbol: 'AAPL', from: '2020-01-01', to: '2020-06-30'))
151
+
152
+ # Support resistance
153
+ puts(client.support_resistance('AAPL', 'D'))
154
+
155
+ # Stock splits
156
+ puts(client.stock_splits('AAPL', '2000-01-01', '2020-01-01'))
157
+
158
+ # Forex candles
159
+ puts(client.forex_candles('OANDA:EUR_USD', 'D', 1590988249, 1591852249))
160
+
161
+ # Crypto Candles
162
+ puts(client.crypto_candles('BINANCE:BTCUSDT', 'D', 1590988249, 1591852249))
163
+
164
+
165
+ # Indices Constituents
166
+ puts(client.indices_const({symbol: "^GSPC"}))
167
+
168
+ # Indices Historical Constituents
169
+ puts(client.indices_hist_const({symbol: "^GSPC"}))
170
+
171
+ # ETFs Profile
172
+ puts(client.etfs_profile(symbol:'SPY'))
173
+
174
+ # ETFs Holdings
175
+ puts(client.etfs_holdings(symbol:'SPY'))
176
+
177
+ # ETFs Industry Exposure
178
+ puts(client.etfs_sector_exp('SPY'))
179
+
180
+ # ETFs Country Exposure
181
+ puts(client.etfs_country_exp('SPY'))
182
+
183
+ # Mutual Fund Profile
184
+ puts(client.mutual_fund_profile(symbol:'VTSAX'))
185
+
186
+ # Mutual Fund Holdings
187
+ puts(client.mutual_fund_holdings(symbol:'VTSAX'))
188
+
189
+ # Mutual Fund Industry Exposure
190
+ puts(client.mutual_fund_sector_exp('VTSAX'))
191
+
192
+ # Mutual Fund Country Exposure
193
+ puts(client.mutual_fund_country_exp('VTSAX'))
194
+
195
+ # Insider Transactions
196
+ puts(client.stock_insider_transactions('AAPL'))
197
+
198
+
199
+ # Social Sentiment
200
+ puts(client.stock_social_sentiment('GME'))
201
+
202
+ # Investment theme
203
+ puts(client.stock_investment_theme('financialExchangesData'))
204
+
205
+ # Supply chain
206
+ puts(client.stock_supply_chain('AAPL'))
207
+
208
+ # FDA calendar
209
+ puts(client.fda_calendar())
210
+
211
+ # Company ESG
212
+ puts(client.company_esg_score('AAPL'))
213
+
214
+ # Company Earnings Quality
215
+ puts(client.company_earnings_quality_score('AAPL', 'quarterly'))
216
+
217
+ # Crypto Profile
218
+ puts(client.crypto_profile('BTC'))
219
+
220
+ # EBITDA Estimates
221
+ puts(client.company_ebitda_estimates('AAPL', freq: 'quarterly'))
222
+
223
+ # EBIT Estimates
224
+ puts(client.company_ebit_estimates('TSLA', freq: 'quarterly'))
225
+
226
+ # USPTO
227
+ puts(client.stock_uspto_patent('NVDA', from: "2020-06-01", to: "2021-06-10"))
228
+
229
+ # Visa Application
230
+ puts(client.stock_visa_application('AAPL', from: "2020-06-01", to: "2021-06-10"))
231
+ # Revenue breakdown
232
+ # puts(client.stock_revenue_breakdown(symbol:'AAPL'))
233
+ # # Technical Indicator
234
+ # # puts(client.technical_indicator("AAPL", 'D', 1583098857, 1584308457, 'rsi', indicator_fields:{'timeperiod': 3}))
data/test_release.rb ADDED
@@ -0,0 +1,235 @@
1
+ require 'finnhub_ruby'
2
+
3
+
4
+ FinnhubRuby.configure do |config|
5
+ config.api_key['api_key'] = 'cvei43pr01ql1jnbj1dgcvei43pr01ql1jnbj1e0'
6
+ end
7
+
8
+ client = FinnhubRuby::DefaultApi.new
9
+
10
+ # Similarity Index
11
+ puts(client.similarity_index(symbol: 'AAPL'))
12
+
13
+ # Stock symbols
14
+ puts(client.stock_symbols('US'))
15
+
16
+ #Symbol search
17
+ puts(client.symbol_search('AAPL'))
18
+
19
+ # Tick Data
20
+ puts(client.stock_tick('NFLX', '2020-03-25', 500, 0))
21
+
22
+ # NBBO
23
+ puts(client.stock_nbbo('NFLX', '2020-03-25', 500, 0))
24
+
25
+ #Bid ask
26
+ puts(client.last_bid_ask('AAPL'))
27
+
28
+ # Forex all pairs
29
+ puts(client.forex_rates(base: 'USD'))
30
+
31
+ # Stock candles
32
+ puts(client.stock_candles('AAPL', 'D', 1590988249, 1591852249))
33
+
34
+ # Aggregate Indicators
35
+ puts(client.aggregate_indicator('AAPL', 'D'))
36
+
37
+ # Basic financials
38
+ puts(client.company_basic_financials('AAPL', 'all'))
39
+
40
+ # Earnings surprises
41
+ puts(client.company_earnings('TSLA', limit: 5))
42
+
43
+ # EPS estimates
44
+ puts(client.company_eps_estimates('AMZN', freq: 'quarterly'))
45
+
46
+ # Company Executives
47
+ puts(client.company_executive('AAPL'))
48
+
49
+ # Company News
50
+ puts(client.company_news('AAPL', "2020-06-01", "2020-06-10"))
51
+
52
+ # Company Peers
53
+ puts(client.company_peers('AAPL'))
54
+
55
+ # Company Profile
56
+ puts(client.company_profile({symbol: 'AAPL'}))
57
+ puts(client.company_profile({isin: 'US0378331005'}))
58
+ puts(client.company_profile({cusip: '037833100'}))
59
+
60
+ # Company Profile 2
61
+ puts(client.company_profile2({symbol: 'AAPL'}))
62
+
63
+ # Revenue Estimates
64
+ puts(client.company_revenue_estimates('TSLA', freq: 'quarterly'))
65
+
66
+ # List country
67
+ puts(client.country())
68
+
69
+ # Crypto Exchange
70
+ puts(client.crypto_exchanges())
71
+
72
+ # Crypto symbols
73
+ puts(client.crypto_symbols('BINANCE'))
74
+
75
+ # Economic code
76
+ puts(client.economic_code())
77
+
78
+ # Economic data
79
+ puts(client.economic_data('MA-USA-656880'))
80
+
81
+ # Economic calendar
82
+ puts(client.economic_calendar())
83
+
84
+ # Filings
85
+ puts(client.filings(symbol: 'AAPL', from: "2020-01-01", to: "2020-06-11"))
86
+
87
+ # International Filings
88
+ puts(client.international_filings(symbol: 'AC.TO'))
89
+
90
+ # Filings Sentiment
91
+ puts(client.sentiment_analysis('0000320193-20-000052'))
92
+
93
+ # Financials
94
+ puts(client.financials('AAPL', 'bs', 'annual'))
95
+
96
+ # Financials as reported
97
+ puts(client.financials_reported({symbol: 'AAPL', freq: 'annual'}))
98
+
99
+ # Forex exchanges
100
+ puts(client.forex_exchanges())
101
+
102
+ # Forex symbols
103
+ puts(client.forex_symbols('OANDA'))
104
+
105
+ # Fund Ownership
106
+ puts(client.fund_ownership('AMZN', limit: 5))
107
+
108
+ # General news
109
+ puts(client.general_news('forex', min_id: 0))
110
+
111
+ # IPO calendar
112
+ puts(client.ipo_calendar("2020-05-01", "2020-06-01"))
113
+
114
+ # Press Releases
115
+ puts(client.press_releases('AAPL', from: "2020-01-01", to: "2020-12-31"))
116
+
117
+ # News sentiment
118
+ puts(client.news_sentiment('AAPL'))
119
+
120
+ # Pattern recognition
121
+ puts(client.pattern_recognition('AAPL', 'D'))
122
+
123
+ # Price target
124
+ puts(client.price_target('AAPL'))
125
+
126
+ # Quote
127
+ puts(client.quote('AAPL'))
128
+
129
+ # Recommendation trends
130
+ puts(client.recommendation_trends('AAPL'))
131
+
132
+ # Stock dividends
133
+ puts(client.stock_dividends('KO', from: '2019-01-01', to: '2020-01-01'))
134
+
135
+ # Stock basic dividends
136
+ puts(client.stock_basic_dividends('KO'))
137
+
138
+ # Transcripts
139
+ puts(client.transcripts('AAPL_162777'))
140
+
141
+ # Transcripts list
142
+ puts(client.transcripts_list('AAPL'))
143
+
144
+ # Earnings Calendar
145
+ puts(client.earnings_calendar(from: "2020-06-10", to: "2020-06-30", symbol: "", international: false))
146
+
147
+ # Covid-19
148
+ puts(client.covid19())
149
+
150
+ # Upgrade downgrade
151
+ puts(client.upgrade_downgrade(symbol: 'AAPL', from: '2020-01-01', to: '2020-06-30'))
152
+
153
+ # Support resistance
154
+ puts(client.support_resistance('AAPL', 'D'))
155
+
156
+ # Stock splits
157
+ puts(client.stock_splits('AAPL', '2000-01-01', '2020-01-01'))
158
+
159
+ # Forex candles
160
+ puts(client.forex_candles('OANDA:EUR_USD', 'D', 1590988249, 1591852249))
161
+
162
+ # Crypto Candles
163
+ puts(client.crypto_candles('BINANCE:BTCUSDT', 'D', 1590988249, 1591852249))
164
+
165
+
166
+ # Indices Constituents
167
+ puts(client.indices_const({symbol: "^GSPC"}))
168
+
169
+ # Indices Historical Constituents
170
+ puts(client.indices_hist_const({symbol: "^GSPC"}))
171
+
172
+ # ETFs Profile
173
+ puts(client.etfs_profile(symbol:'SPY'))
174
+
175
+ # ETFs Holdings
176
+ puts(client.etfs_holdings(symbol:'SPY'))
177
+
178
+ # ETFs Industry Exposure
179
+ puts(client.etfs_sector_exp('SPY'))
180
+
181
+ # ETFs Country Exposure
182
+ puts(client.etfs_country_exp('SPY'))
183
+
184
+ # Mutual Fund Profile
185
+ puts(client.mutual_fund_profile(symbol:'VTSAX'))
186
+
187
+ # Mutual Fund Holdings
188
+ puts(client.mutual_fund_holdings(symbol:'VTSAX'))
189
+
190
+ # Mutual Fund Industry Exposure
191
+ puts(client.mutual_fund_sector_exp('VTSAX'))
192
+
193
+ # Mutual Fund Country Exposure
194
+ puts(client.mutual_fund_country_exp('VTSAX'))
195
+
196
+ # Insider Transactions
197
+ puts(client.stock_insider_transactions('AAPL'))
198
+
199
+
200
+ # Social Sentiment
201
+ puts(client.stock_social_sentiment('GME'))
202
+
203
+ # Investment theme
204
+ puts(client.stock_investment_theme('financialExchangesData'))
205
+
206
+ # Supply chain
207
+ puts(client.stock_supply_chain('AAPL'))
208
+
209
+ # FDA calendar
210
+ puts(client.fda_calendar())
211
+
212
+ # Company ESG
213
+ puts(client.company_esg_score('AAPL'))
214
+
215
+ # Company Earnings Quality
216
+ puts(client.company_earnings_quality_score('AAPL', 'quarterly'))
217
+
218
+ # Crypto Profile
219
+ puts(client.crypto_profile('BTC'))
220
+
221
+ # EBITDA Estimates
222
+ puts(client.company_ebitda_estimates('AAPL', freq: 'quarterly'))
223
+
224
+ # EBIT Estimates
225
+ puts(client.company_ebit_estimates('TSLA', freq: 'quarterly'))
226
+
227
+ # USPTO
228
+ puts(client.stock_uspto_patent('NVDA', from: "2020-06-01", to: "2021-06-10"))
229
+
230
+ # Visa Application
231
+ puts(client.stock_visa_application('AAPL', from: "2020-06-01", to: "2021-06-10"))
232
+ # Revenue breakdown
233
+ # puts(client.stock_revenue_breakdown(symbol:'AAPL'))
234
+ # # Technical Indicator
235
+ # # puts(client.technical_indicator("AAPL", 'D', 1583098857, 1584308457, 'rsi', indicator_fields:{'timeperiod': 3}))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finnhub_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Finnhub
@@ -234,6 +234,8 @@ files:
234
234
  - lib/finnhub_ruby.rb
235
235
  - lib/finnhub_ruby/version.rb
236
236
  - release.sh
237
+ - test.rb
238
+ - test_release.rb
237
239
  homepage: https://github.com/Finnhub-Stock-API/finnhub-ruby
238
240
  licenses:
239
241
  - Apache-2.0