alphavantagerb 1.3.2 → 1.3.3
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 +5 -5
- data/AlphavantageRB.gemspec +4 -5
- data/Gemfile +3 -3
- data/README.md +6 -2
- data/lib/Client.rb +7 -7
- data/lib/Crypto.rb +1 -1
- data/lib/Crypto_Timeseries.rb +10 -10
- data/lib/Exchange_Timeseries.rb +1 -1
- data/lib/Indicator.rb +1 -1
- data/lib/Timeseries.rb +1 -1
- data/spec/lib/1.0.0/indicator.rb +35 -35
- metadata +11 -27
- data/spec/config.yml +0 -2
- data/spec/spec_helper.rb +0 -16
- data/spec/test_all.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 413b5364ea4c510277f0860e14584c0a81b38652d7c5125989ea0bf145635277
|
|
4
|
+
data.tar.gz: 5154246e8578dac151eaabfa4426725712fc35a7fb68208108ff4f241625da5e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f26adab0cd5024c4e9eaa187882f61112a8b3e1d825eddd11f9ef153e75c07451d0f992bc95c1fec8dabdc9062369d643e70bad114dab9ff9e7defc182edd7bf
|
|
7
|
+
data.tar.gz: 3001c51e62647cd3bb3b50a0cf78fa0a2277bd6c2058a572adb38a6ce0b9a1bd3575527bc6878d2ac8d68f023edb35ba803f360101471ac6bb66e06712ff503b
|
data/AlphavantageRB.gemspec
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# lib = File.expand_path("../lib", __FILE__)
|
|
2
2
|
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require "rake"
|
|
4
3
|
|
|
5
4
|
Gem::Specification.new do |s|
|
|
6
5
|
s.name = "alphavantagerb"
|
|
7
|
-
s.version = "1.3.
|
|
6
|
+
s.version = "1.3.3"
|
|
8
7
|
s.authors = ["Stefano Martin"]
|
|
9
8
|
s.email = ["stefano.martin87@gmail.com"]
|
|
10
9
|
s.homepage = "https://github.com/StefanoMartin/AlphaVantageRB"
|
|
@@ -13,9 +12,9 @@ Gem::Specification.new do |s|
|
|
|
13
12
|
s.description = "A ruby wrapper for Alpha Vantage's HTTP API"
|
|
14
13
|
s.platform = Gem::Platform::RUBY
|
|
15
14
|
s.require_paths = ["lib"]
|
|
16
|
-
s.files =
|
|
17
|
-
s.add_runtime_dependency "httparty", "
|
|
18
|
-
s.add_runtime_dependency "humanize", "
|
|
15
|
+
s.files = ["lib/*", "spec/**/*", "AlphavantageRB.gemspec", "Gemfile", "LICENSE.md", "README.md"].map {|f| `git ls-files #{f}`.split("\n") }.to_a.flatten
|
|
16
|
+
s.add_runtime_dependency "httparty", ">= 0.15.6"
|
|
17
|
+
s.add_runtime_dependency "humanize", ">= 1.7.0"
|
|
19
18
|
s.add_development_dependency "pry-byebug", '~> 0'
|
|
20
19
|
s.add_development_dependency "rspec", "~>3.5", ">=3.5"
|
|
21
20
|
s.add_development_dependency "awesome_print", "~>1.7", ">= 1.7"
|
data/Gemfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
source "https://rubygems.org"
|
|
2
2
|
|
|
3
|
-
gem "httparty", ">= 0.
|
|
3
|
+
gem "httparty", ">= 0.17.0"
|
|
4
4
|
gem "humanize", ">= 1.7.0"
|
|
5
5
|
|
|
6
6
|
group :development, :test do
|
|
7
7
|
gem "pry-byebug"
|
|
8
|
-
gem "rspec", ">=3.5"
|
|
9
|
-
gem "awesome_print", "
|
|
8
|
+
gem "rspec", ">= 3.5"
|
|
9
|
+
gem "awesome_print", ">= 1.7"
|
|
10
10
|
end
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
AlphavantageRB [](https://badge.fury.io/rb/alphavantagerb)
|
|
2
2
|
=========================================================
|
|
3
3
|
|
|
4
|
-
Last update:
|
|
4
|
+
Last update: 7/4/2020
|
|
5
5
|
|
|
6
6
|
[Alpha Vantage](https://www.alphavantage.co/) is a great API for retrieving Stock
|
|
7
7
|
market data in JSON or CSV format.
|
|
@@ -23,11 +23,15 @@ key: [YOUR KEY]
|
|
|
23
23
|
Then run "rspec spec/test_all.rb".
|
|
24
24
|
Since AlphaVantage does not permit more than 5 request for minutes, many of your tests will fail. I advice either having a premium account or, like me, trying each file of test from the folder "spec/lib/1.0.0".
|
|
25
25
|
|
|
26
|
-
## Support
|
|
26
|
+
## Support
|
|
27
27
|
|
|
28
28
|
* Without a premium account, testing is hard and I could have missed something. Any bug, suggestions and improvements are more than welcome. Please do not be shy to create issues or pull requests.
|
|
29
29
|
* This is a personal project, any stars for giving your support will make a man happy.
|
|
30
30
|
|
|
31
|
+
## Thanks
|
|
32
|
+
|
|
33
|
+
Thank you to mruegenberg for his pull request.
|
|
34
|
+
|
|
31
35
|
## Classes
|
|
32
36
|
|
|
33
37
|
AlphavantateRB has the following classes:
|
data/lib/Client.rb
CHANGED
|
@@ -21,20 +21,20 @@ module Alphavantage
|
|
|
21
21
|
puts "\n#{send_url}\n" if @verbose
|
|
22
22
|
begin
|
|
23
23
|
response = HTTParty.get(send_url)
|
|
24
|
-
rescue
|
|
24
|
+
rescue StandardError => e
|
|
25
25
|
raise Alphavantage::Error.new message: "Failed request: #{e.message}"
|
|
26
26
|
end
|
|
27
27
|
data = response.body
|
|
28
28
|
begin
|
|
29
29
|
data = JSON.parse(data)
|
|
30
|
-
rescue
|
|
30
|
+
rescue StandardError => e
|
|
31
31
|
raise Alphavantage::Error.new message: "Parsing failed",
|
|
32
32
|
data: data
|
|
33
33
|
end
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
raise Alphavantage::Error.new message:
|
|
34
|
+
|
|
35
|
+
error = data["Error Message"] || data["Information"] || data["Note"]
|
|
36
|
+
unless error.nil?
|
|
37
|
+
raise Alphavantage::Error.new message: error, data: data
|
|
38
38
|
end
|
|
39
39
|
return data
|
|
40
40
|
end
|
|
@@ -45,7 +45,7 @@ module Alphavantage
|
|
|
45
45
|
puts send_url if @verbose
|
|
46
46
|
uri = URI.parse(send_url)
|
|
47
47
|
uri.open{|csv| IO.copy_stream(csv, file)}
|
|
48
|
-
rescue
|
|
48
|
+
rescue StandardError => e
|
|
49
49
|
raise Alphavantage::Error.new message: "Failed to save the CSV file: #{e.message}"
|
|
50
50
|
end
|
|
51
51
|
return "CSV saved in #{file}"
|
data/lib/Crypto.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Alphavantage
|
|
|
18
18
|
@datatype = datatype
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def timeseries type: "
|
|
21
|
+
def timeseries type: "daily", market: @market, file: nil, datatype: @datatype
|
|
22
22
|
Alphavantage::Crypto_Timeseries.new type: type, market: market,
|
|
23
23
|
symbol: @symbol, datatype: datatype, file: file, key: @client
|
|
24
24
|
end
|
data/lib/Crypto_Timeseries.rb
CHANGED
|
@@ -2,7 +2,7 @@ module Alphavantage
|
|
|
2
2
|
class Crypto_Timeseries
|
|
3
3
|
include HelperFunctions
|
|
4
4
|
|
|
5
|
-
def initialize type: "
|
|
5
|
+
def initialize type: "daily", market:, symbol:, datatype: "json", file: nil,
|
|
6
6
|
key:, verbose: false
|
|
7
7
|
check_argument([true, false], verbose, "verbose")
|
|
8
8
|
@client = return_client(key, verbose)
|
|
@@ -14,8 +14,8 @@ module Alphavantage
|
|
|
14
14
|
return @client.download(url, file) if datatype == "csv"
|
|
15
15
|
@output = @client.request(url)
|
|
16
16
|
metadata = @output.dig("Meta Data") || {}
|
|
17
|
-
metadata.each do |
|
|
18
|
-
key_sym =
|
|
17
|
+
metadata.each do |keyt, val|
|
|
18
|
+
key_sym = keyt.downcase.gsub(/[0-9.]/, "").lstrip.gsub(" ", "_").to_sym
|
|
19
19
|
define_singleton_method(key_sym) do
|
|
20
20
|
return val
|
|
21
21
|
end
|
|
@@ -25,22 +25,22 @@ module Alphavantage
|
|
|
25
25
|
@market_cap_usd = [];
|
|
26
26
|
|
|
27
27
|
begin
|
|
28
|
-
time_series = @output.find{|
|
|
29
|
-
rescue
|
|
28
|
+
time_series = @output.find{|k, val| k.include?("Time Series")}[1]
|
|
29
|
+
rescue StandardError => e
|
|
30
30
|
raise Alphavantage::Error.new message: "No Time Series found: #{e.message}",
|
|
31
31
|
data: @output
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
series = {}
|
|
35
35
|
convert_key = {}
|
|
36
|
-
time_series.values[0].keys.each do |
|
|
37
|
-
key_sym = recreate_metadata_key(
|
|
36
|
+
time_series.values[0].keys.each do |k|
|
|
37
|
+
key_sym = recreate_metadata_key(k)
|
|
38
38
|
series[key_sym] = []
|
|
39
|
-
convert_key[
|
|
39
|
+
convert_key[k] = key_sym
|
|
40
40
|
end
|
|
41
41
|
time_series.each do |time, ts_hash|
|
|
42
|
-
ts_hash.each do |
|
|
43
|
-
series[convert_key[
|
|
42
|
+
ts_hash.each do |k, value|
|
|
43
|
+
series[convert_key[k]] << [time, value]
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
series.keys.each do |key_sym|
|
data/lib/Exchange_Timeseries.rb
CHANGED
|
@@ -33,7 +33,7 @@ module Alphavantage
|
|
|
33
33
|
|
|
34
34
|
begin
|
|
35
35
|
time_series = @output.find{|key, val| key.include?("Time Series")}[1]
|
|
36
|
-
rescue
|
|
36
|
+
rescue StandardError => e
|
|
37
37
|
raise Alphavantage::Error.new message: "No Time Series found: #{e.message}",
|
|
38
38
|
data: @output
|
|
39
39
|
end
|
data/lib/Indicator.rb
CHANGED
|
@@ -105,7 +105,7 @@ module Alphavantage
|
|
|
105
105
|
|
|
106
106
|
begin
|
|
107
107
|
time_series = @output.find{|key, val| key.include?("Technical Analysis")}[1]
|
|
108
|
-
rescue
|
|
108
|
+
rescue StandardError => e
|
|
109
109
|
raise Alphavantage::Error.new message: "No Time Series found: #{e.message}",
|
|
110
110
|
data: @output
|
|
111
111
|
end
|
data/lib/Timeseries.rb
CHANGED
|
@@ -35,7 +35,7 @@ module Alphavantage
|
|
|
35
35
|
|
|
36
36
|
begin
|
|
37
37
|
time_series = @output.find{|key, val| key.include?("Time Series")}[1]
|
|
38
|
-
rescue
|
|
38
|
+
rescue StandardError => e
|
|
39
39
|
raise Alphavantage::Error.new message: "No Time Series found: #{e.message}",
|
|
40
40
|
data: @output
|
|
41
41
|
end
|
data/spec/lib/1.0.0/indicator.rb
CHANGED
|
@@ -20,7 +20,7 @@ describe Alphavantage::Indicator do
|
|
|
20
20
|
bool << indicator.last_refreshed.is_a?(String)
|
|
21
21
|
bool << (indicator.interval == "weekly")
|
|
22
22
|
bool << indicator.series_type.is_a?(String)
|
|
23
|
-
bool << indicator.time_period.is_a?(
|
|
23
|
+
bool << indicator.time_period.is_a?(Numeric)
|
|
24
24
|
bool << indicator.time_zone.is_a?(String)
|
|
25
25
|
bool << indicator.sma.is_a?(Array)
|
|
26
26
|
expect(bool.all?{|e| e}).to eq true
|
|
@@ -141,9 +141,9 @@ describe Alphavantage::Indicator do
|
|
|
141
141
|
bool << indicator.indicator.is_a?(String)
|
|
142
142
|
bool << indicator.last_refreshed.is_a?(String)
|
|
143
143
|
bool << (indicator.interval == "weekly")
|
|
144
|
-
bool << indicator.fast_period.is_a?(
|
|
145
|
-
bool << indicator.slow_period.is_a?(
|
|
146
|
-
bool << indicator.signal_period.is_a?(
|
|
144
|
+
bool << indicator.fast_period.is_a?(Numeric)
|
|
145
|
+
bool << indicator.slow_period.is_a?(Numeric)
|
|
146
|
+
bool << indicator.signal_period.is_a?(Numeric)
|
|
147
147
|
bool << indicator.series_type.is_a?(String)
|
|
148
148
|
bool << indicator.time_zone.is_a?(String)
|
|
149
149
|
bool << indicator.macd_signal.is_a?(Array)
|
|
@@ -159,13 +159,13 @@ describe Alphavantage::Indicator do
|
|
|
159
159
|
bool << indicator.indicator.is_a?(String)
|
|
160
160
|
bool << indicator.last_refreshed.is_a?(String)
|
|
161
161
|
bool << (indicator.interval == "weekly")
|
|
162
|
-
bool << indicator.fast_period.is_a?(
|
|
163
|
-
bool << indicator.slow_period.is_a?(
|
|
164
|
-
bool << indicator.signal_period.is_a?(
|
|
162
|
+
bool << indicator.fast_period.is_a?(Numeric)
|
|
163
|
+
bool << indicator.slow_period.is_a?(Numeric)
|
|
164
|
+
bool << indicator.signal_period.is_a?(Numeric)
|
|
165
165
|
bool << indicator.series_type.is_a?(String)
|
|
166
|
-
bool << indicator.signal_ma_type.is_a?(
|
|
167
|
-
bool << indicator.fast_ma_type.is_a?(
|
|
168
|
-
bool << indicator.slow_ma_type.is_a?(
|
|
166
|
+
bool << indicator.signal_ma_type.is_a?(Numeric)
|
|
167
|
+
bool << indicator.fast_ma_type.is_a?(Numeric)
|
|
168
|
+
bool << indicator.slow_ma_type.is_a?(Numeric)
|
|
169
169
|
bool << indicator.time_zone.is_a?(String)
|
|
170
170
|
bool << indicator.macd_signal.is_a?(Array)
|
|
171
171
|
bool << indicator.macd_hist.is_a?(Array)
|
|
@@ -180,11 +180,11 @@ describe Alphavantage::Indicator do
|
|
|
180
180
|
bool << indicator.indicator.is_a?(String)
|
|
181
181
|
bool << indicator.last_refreshed.is_a?(String)
|
|
182
182
|
bool << (indicator.interval == "weekly")
|
|
183
|
-
bool << indicator.fastk_period.is_a?(
|
|
184
|
-
bool << indicator.slowk_period.is_a?(
|
|
185
|
-
bool << indicator.slowk_ma_type.is_a?(
|
|
186
|
-
bool << indicator.slowd_period.is_a?(
|
|
187
|
-
bool << indicator.slowd_ma_type.is_a?(
|
|
183
|
+
bool << indicator.fastk_period.is_a?(Numeric)
|
|
184
|
+
bool << indicator.slowk_period.is_a?(Numeric)
|
|
185
|
+
bool << indicator.slowk_ma_type.is_a?(Numeric)
|
|
186
|
+
bool << indicator.slowd_period.is_a?(Numeric)
|
|
187
|
+
bool << indicator.slowd_ma_type.is_a?(Numeric)
|
|
188
188
|
bool << indicator.time_zone.is_a?(String)
|
|
189
189
|
bool << indicator.slowk.is_a?(Array)
|
|
190
190
|
bool << indicator.slowd.is_a?(Array)
|
|
@@ -198,9 +198,9 @@ describe Alphavantage::Indicator do
|
|
|
198
198
|
bool << indicator.indicator.is_a?(String)
|
|
199
199
|
bool << indicator.last_refreshed.is_a?(String)
|
|
200
200
|
bool << (indicator.interval == "weekly")
|
|
201
|
-
bool << indicator.fastk_period.is_a?(
|
|
202
|
-
bool << indicator.fastd_period.is_a?(
|
|
203
|
-
bool << indicator.fastd_ma_type.is_a?(
|
|
201
|
+
bool << indicator.fastk_period.is_a?(Numeric)
|
|
202
|
+
bool << indicator.fastd_period.is_a?(Numeric)
|
|
203
|
+
bool << indicator.fastd_ma_type.is_a?(Numeric)
|
|
204
204
|
bool << indicator.time_zone.is_a?(String)
|
|
205
205
|
bool << indicator.fastk.is_a?(Array)
|
|
206
206
|
bool << indicator.fastd.is_a?(Array)
|
|
@@ -227,9 +227,9 @@ describe Alphavantage::Indicator do
|
|
|
227
227
|
bool << indicator.indicator.is_a?(String)
|
|
228
228
|
bool << indicator.last_refreshed.is_a?(String)
|
|
229
229
|
bool << (indicator.interval == "weekly")
|
|
230
|
-
bool << indicator.fastk_period.is_a?(
|
|
231
|
-
bool << indicator.fastd_period.is_a?(
|
|
232
|
-
bool << indicator.fastd_ma_type.is_a?(
|
|
230
|
+
bool << indicator.fastk_period.is_a?(Numeric)
|
|
231
|
+
bool << indicator.fastd_period.is_a?(Numeric)
|
|
232
|
+
bool << indicator.fastd_ma_type.is_a?(Numeric)
|
|
233
233
|
bool << indicator.time_zone.is_a?(String)
|
|
234
234
|
bool << indicator.fastk.is_a?(Array)
|
|
235
235
|
bool << indicator.fastd.is_a?(Array)
|
|
@@ -279,9 +279,9 @@ describe Alphavantage::Indicator do
|
|
|
279
279
|
bool << indicator.indicator.is_a?(String)
|
|
280
280
|
bool << indicator.last_refreshed.is_a?(String)
|
|
281
281
|
bool << (indicator.interval == "weekly")
|
|
282
|
-
bool << indicator.fast_period.is_a?(
|
|
283
|
-
bool << indicator.slow_period.is_a?(
|
|
284
|
-
bool << indicator.ma_type.is_a?(
|
|
282
|
+
bool << indicator.fast_period.is_a?(Numeric)
|
|
283
|
+
bool << indicator.slow_period.is_a?(Numeric)
|
|
284
|
+
bool << indicator.ma_type.is_a?(Numeric)
|
|
285
285
|
bool << indicator.series_type.is_a?(String)
|
|
286
286
|
bool << indicator.time_zone.is_a?(String)
|
|
287
287
|
bool << indicator.apo.is_a?(Array)
|
|
@@ -295,9 +295,9 @@ describe Alphavantage::Indicator do
|
|
|
295
295
|
bool << indicator.indicator.is_a?(String)
|
|
296
296
|
bool << indicator.last_refreshed.is_a?(String)
|
|
297
297
|
bool << (indicator.interval == "weekly")
|
|
298
|
-
bool << indicator.fast_period.is_a?(
|
|
299
|
-
bool << indicator.slow_period.is_a?(
|
|
300
|
-
bool << indicator.ma_type.is_a?(
|
|
298
|
+
bool << indicator.fast_period.is_a?(Numeric)
|
|
299
|
+
bool << indicator.slow_period.is_a?(Numeric)
|
|
300
|
+
bool << indicator.ma_type.is_a?(Numeric)
|
|
301
301
|
bool << indicator.series_type.is_a?(String)
|
|
302
302
|
bool << indicator.time_zone.is_a?(String)
|
|
303
303
|
bool << indicator.ppo.is_a?(Array)
|
|
@@ -438,9 +438,9 @@ describe Alphavantage::Indicator do
|
|
|
438
438
|
bool << indicator.last_refreshed.is_a?(String)
|
|
439
439
|
bool << (indicator.interval == "weekly")
|
|
440
440
|
bool << indicator.time_zone.is_a?(String)
|
|
441
|
-
bool << indicator.time_period_1.is_a?(
|
|
442
|
-
bool << indicator.time_period_2.is_a?(
|
|
443
|
-
bool << indicator.time_period_3.is_a?(
|
|
441
|
+
bool << indicator.time_period_1.is_a?(Numeric)
|
|
442
|
+
bool << indicator.time_period_2.is_a?(Numeric)
|
|
443
|
+
bool << indicator.time_period_3.is_a?(Numeric)
|
|
444
444
|
bool << indicator.ultosc.is_a?(Array)
|
|
445
445
|
expect(bool.all?{|e| e}).to eq true
|
|
446
446
|
end
|
|
@@ -514,9 +514,9 @@ describe Alphavantage::Indicator do
|
|
|
514
514
|
bool << (indicator.interval == "weekly")
|
|
515
515
|
bool << indicator.series_type.is_a?(String)
|
|
516
516
|
bool << indicator.time_zone.is_a?(String)
|
|
517
|
-
bool << indicator.deviation_multiplier_for_upper_band.is_a?(
|
|
518
|
-
bool << indicator.deviation_multiplier_for_lower_band.is_a?(
|
|
519
|
-
bool << indicator.ma_type.is_a?(
|
|
517
|
+
bool << indicator.deviation_multiplier_for_upper_band.is_a?(Numeric)
|
|
518
|
+
bool << indicator.deviation_multiplier_for_lower_band.is_a?(Numeric)
|
|
519
|
+
bool << indicator.ma_type.is_a?(Numeric)
|
|
520
520
|
bool << indicator.real_lower_band.is_a?(Array)
|
|
521
521
|
bool << indicator.real_middle_band.is_a?(Array)
|
|
522
522
|
bool << indicator.real_upper_band.is_a?(Array)
|
|
@@ -617,8 +617,8 @@ describe Alphavantage::Indicator do
|
|
|
617
617
|
bool << indicator.indicator.is_a?(String)
|
|
618
618
|
bool << indicator.last_refreshed.is_a?(String)
|
|
619
619
|
bool << (indicator.interval == "weekly")
|
|
620
|
-
bool << indicator.fastk_period.is_a?(
|
|
621
|
-
bool << indicator.slowk_period.is_a?(
|
|
620
|
+
bool << indicator.fastk_period.is_a?(Numeric)
|
|
621
|
+
bool << indicator.slowk_period.is_a?(Numeric)
|
|
622
622
|
bool << indicator.time_zone.is_a?(String)
|
|
623
623
|
bool << indicator.adosc.is_a?(Array)
|
|
624
624
|
expect(bool.all?{|e| e}).to eq true
|
metadata
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alphavantagerb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefano Martin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.15.6
|
|
20
17
|
- - ">="
|
|
21
18
|
- !ruby/object:Gem::Version
|
|
22
19
|
version: 0.15.6
|
|
@@ -24,9 +21,6 @@ dependencies:
|
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
|
-
- - "~>"
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.15.6
|
|
30
24
|
- - ">="
|
|
31
25
|
- !ruby/object:Gem::Version
|
|
32
26
|
version: 0.15.6
|
|
@@ -34,9 +28,6 @@ dependencies:
|
|
|
34
28
|
name: humanize
|
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
|
36
30
|
requirements:
|
|
37
|
-
- - "~>"
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: 1.7.0
|
|
40
31
|
- - ">="
|
|
41
32
|
- !ruby/object:Gem::Version
|
|
42
33
|
version: 1.7.0
|
|
@@ -44,9 +35,6 @@ dependencies:
|
|
|
44
35
|
prerelease: false
|
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
37
|
requirements:
|
|
47
|
-
- - "~>"
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: 1.7.0
|
|
50
38
|
- - ">="
|
|
51
39
|
- !ruby/object:Gem::Version
|
|
52
40
|
version: 1.7.0
|
|
@@ -68,40 +56,40 @@ dependencies:
|
|
|
68
56
|
name: rspec
|
|
69
57
|
requirement: !ruby/object:Gem::Requirement
|
|
70
58
|
requirements:
|
|
71
|
-
- - "
|
|
59
|
+
- - ">="
|
|
72
60
|
- !ruby/object:Gem::Version
|
|
73
61
|
version: '3.5'
|
|
74
|
-
- - "
|
|
62
|
+
- - "~>"
|
|
75
63
|
- !ruby/object:Gem::Version
|
|
76
64
|
version: '3.5'
|
|
77
65
|
type: :development
|
|
78
66
|
prerelease: false
|
|
79
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
80
68
|
requirements:
|
|
81
|
-
- - "
|
|
69
|
+
- - ">="
|
|
82
70
|
- !ruby/object:Gem::Version
|
|
83
71
|
version: '3.5'
|
|
84
|
-
- - "
|
|
72
|
+
- - "~>"
|
|
85
73
|
- !ruby/object:Gem::Version
|
|
86
74
|
version: '3.5'
|
|
87
75
|
- !ruby/object:Gem::Dependency
|
|
88
76
|
name: awesome_print
|
|
89
77
|
requirement: !ruby/object:Gem::Requirement
|
|
90
78
|
requirements:
|
|
91
|
-
- - "
|
|
79
|
+
- - ">="
|
|
92
80
|
- !ruby/object:Gem::Version
|
|
93
81
|
version: '1.7'
|
|
94
|
-
- - "
|
|
82
|
+
- - "~>"
|
|
95
83
|
- !ruby/object:Gem::Version
|
|
96
84
|
version: '1.7'
|
|
97
85
|
type: :development
|
|
98
86
|
prerelease: false
|
|
99
87
|
version_requirements: !ruby/object:Gem::Requirement
|
|
100
88
|
requirements:
|
|
101
|
-
- - "
|
|
89
|
+
- - ">="
|
|
102
90
|
- !ruby/object:Gem::Version
|
|
103
91
|
version: '1.7'
|
|
104
|
-
- - "
|
|
92
|
+
- - "~>"
|
|
105
93
|
- !ruby/object:Gem::Version
|
|
106
94
|
version: '1.7'
|
|
107
95
|
description: A ruby wrapper for Alpha Vantage's HTTP API
|
|
@@ -127,7 +115,6 @@ files:
|
|
|
127
115
|
- lib/Timeseries.rb
|
|
128
116
|
- lib/alphavantagerb.rb
|
|
129
117
|
- lib/helper_function.rb
|
|
130
|
-
- spec/config.yml
|
|
131
118
|
- spec/lib/1.0.0/client.rb
|
|
132
119
|
- spec/lib/1.0.0/crypto.rb
|
|
133
120
|
- spec/lib/1.0.0/crypto_timeseries.rb
|
|
@@ -137,8 +124,6 @@ files:
|
|
|
137
124
|
- spec/lib/1.0.0/sector.rb
|
|
138
125
|
- spec/lib/1.0.0/stock.rb
|
|
139
126
|
- spec/lib/1.0.0/timeseries.rb
|
|
140
|
-
- spec/spec_helper.rb
|
|
141
|
-
- spec/test_all.rb
|
|
142
127
|
homepage: https://github.com/StefanoMartin/AlphaVantageRB
|
|
143
128
|
licenses:
|
|
144
129
|
- MIT
|
|
@@ -158,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
143
|
- !ruby/object:Gem::Version
|
|
159
144
|
version: '0'
|
|
160
145
|
requirements: []
|
|
161
|
-
|
|
162
|
-
rubygems_version: 2.6.12
|
|
146
|
+
rubygems_version: 3.0.6
|
|
163
147
|
signing_key:
|
|
164
148
|
specification_version: 4
|
|
165
149
|
summary: A gem for Alpha Vantage
|
data/spec/config.yml
DELETED
data/spec/spec_helper.rb
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
require "rspec"
|
|
2
|
-
require "pry-byebug"
|
|
3
|
-
require "yaml"
|
|
4
|
-
require "openssl"
|
|
5
|
-
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
|
6
|
-
require "alphavantagerb"
|
|
7
|
-
# require_relative File.expand_path('../../lib/alphavantagerb', __FILE__)
|
|
8
|
-
|
|
9
|
-
RSpec.configure do |config|
|
|
10
|
-
config.color = true
|
|
11
|
-
config.before(:all) do
|
|
12
|
-
@config = YAML::load_file(File.join(__dir__, 'config.yml'))
|
|
13
|
-
@client = Alphavantage::Client.new key: @config["key"]
|
|
14
|
-
@stock = @client.stock(symbol: "MSFT")
|
|
15
|
-
end
|
|
16
|
-
end
|
data/spec/test_all.rb
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
require_relative "lib/1.0.0/client"
|
|
2
|
-
require_relative "lib/1.0.0/crypto_timeseries"
|
|
3
|
-
require_relative "lib/1.0.0/crypto"
|
|
4
|
-
require_relative "lib/1.0.0/exchange"
|
|
5
|
-
require_relative "lib/1.0.0/exchange_timeseries"
|
|
6
|
-
require_relative "lib/1.0.0/indicator"
|
|
7
|
-
require_relative "lib/1.0.0/sector"
|
|
8
|
-
require_relative "lib/1.0.0/stock"
|
|
9
|
-
require_relative "lib/1.0.0/timeseries"
|