alphavantagerb 1.2.0 → 1.3.0
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/AlphavantageRB.gemspec +1 -1
- data/README.md +111 -56
- data/lib/Client.rb +19 -4
- data/lib/Crypto_Timeseries.rb +7 -18
- data/lib/Exchange.rb +22 -10
- data/lib/Exchange_Timeseries.rb +63 -0
- data/lib/Indicator.rb +5 -5
- data/lib/Sector.rb +4 -4
- data/lib/Stock.rb +8 -2
- data/lib/Timeseries.rb +8 -19
- data/lib/alphavantagerb.rb +2 -1
- data/lib/helper_function.rb +27 -0
- data/spec/lib/1.0.0/client.rb +7 -2
- data/spec/lib/1.0.0/crypto_timeseries.rb +6 -6
- data/spec/lib/1.0.0/exchange.rb +8 -6
- data/spec/lib/1.0.0/exchange_timeseries.rb +73 -0
- data/spec/lib/1.0.0/indicator.rb +54 -54
- data/spec/lib/1.0.0/sector.rb +5 -5
- data/spec/lib/1.0.0/stock.rb +2 -2
- data/spec/lib/1.0.0/timeseries.rb +10 -10
- data/spec/test_all.rb +1 -1
- metadata +4 -4
- data/lib/Batch.rb +0 -52
- data/spec/lib/1.1.0/batch.rb +0 -45
data/lib/Indicator.rb
CHANGED
@@ -94,8 +94,8 @@ module Alphavantage
|
|
94
94
|
url += return_int_val(maximum, "maximum", "float")
|
95
95
|
end
|
96
96
|
|
97
|
-
@
|
98
|
-
metadata = @
|
97
|
+
@output = @client.request(url)
|
98
|
+
metadata = @output.dig("Meta Data") || {}
|
99
99
|
metadata.each do |key, val|
|
100
100
|
key_sym = recreate_metadata_key(key)
|
101
101
|
define_singleton_method(key_sym) do
|
@@ -104,10 +104,10 @@ module Alphavantage
|
|
104
104
|
end
|
105
105
|
|
106
106
|
begin
|
107
|
-
time_series = @
|
107
|
+
time_series = @output.find{|key, val| key.include?("Technical Analysis")}[1]
|
108
108
|
rescue Exception => e
|
109
109
|
raise Alphavantage::Error.new message: "No Time Series found: #{e.message}",
|
110
|
-
data: @
|
110
|
+
data: @output
|
111
111
|
end
|
112
112
|
|
113
113
|
series = {}
|
@@ -130,6 +130,6 @@ module Alphavantage
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
-
attr_reader :
|
133
|
+
attr_reader :output
|
134
134
|
end
|
135
135
|
end
|
data/lib/Sector.rb
CHANGED
@@ -5,15 +5,15 @@ module Alphavantage
|
|
5
5
|
def initialize key:, verbose: false
|
6
6
|
check_argument([true, false], verbose, "verbose")
|
7
7
|
@client = return_client(key, verbose)
|
8
|
-
@
|
9
|
-
metadata = @
|
8
|
+
@output = @client.request("function=SECTOR")
|
9
|
+
metadata = @output.dig("Meta Data") || {}
|
10
10
|
metadata.each do |key, val|
|
11
11
|
key_sym = key.downcase.gsub(/[0-9.]/, "").lstrip.gsub(" ", "_").to_sym
|
12
12
|
define_singleton_method(key_sym) do
|
13
13
|
return val
|
14
14
|
end
|
15
15
|
end
|
16
|
-
@
|
16
|
+
@output.each do |key, val|
|
17
17
|
next if key == "Meta Data"
|
18
18
|
key = key.split(":")[1].lstrip
|
19
19
|
key = key.split(" ")
|
@@ -29,6 +29,6 @@ module Alphavantage
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
attr_reader :
|
32
|
+
attr_reader :output
|
33
33
|
end
|
34
34
|
end
|
data/lib/Stock.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
module Alphavantage
|
2
2
|
class Stock
|
3
3
|
include HelperFunctions
|
4
|
-
|
5
|
-
def initialize symbol:, datatype: "json", key:, verbose: false
|
4
|
+
def initialize symbol:, datatype: "json", key:, verbose: false
|
6
5
|
check_argument([true, false], verbose, "verbose")
|
7
6
|
@client = return_client(key, verbose)
|
8
7
|
@symbol = symbol
|
@@ -17,6 +16,13 @@ module Alphavantage
|
|
17
16
|
@datatype = datatype
|
18
17
|
end
|
19
18
|
|
19
|
+
def quote file: nil, datatype: @datatype
|
20
|
+
check_datatype(datatype, file)
|
21
|
+
url = "function=GLOBAL_QUOTE&symbol=#{symbol}"
|
22
|
+
return @client.download(url, file) if datatype == "csv"
|
23
|
+
return open_struct(url, "Global Quote")
|
24
|
+
end
|
25
|
+
|
20
26
|
def timeseries type: "daily", interval: nil, outputsize: "compact",
|
21
27
|
file: nil, datatype: @datatype, adjusted: false
|
22
28
|
Alphavantage::Timeseries.new type: type, interval: interval,
|
data/lib/Timeseries.rb
CHANGED
@@ -18,17 +18,14 @@ module Alphavantage
|
|
18
18
|
end
|
19
19
|
check_argument(["compact", "full"], outputsize, "outputsize")
|
20
20
|
check_argument(["json", "csv"], datatype, "datatype")
|
21
|
-
|
22
|
-
raise Alphavantage::Error.new message: "No file specified where to save the CSV ata"
|
23
|
-
elsif datatype != "csv" && !file.nil?
|
24
|
-
raise Alphavantage::Error.new message: "Hash error: No file necessary"
|
25
|
-
end
|
21
|
+
check_datatype(datatype, file)
|
26
22
|
|
27
|
-
@selected_time_series = which_series(type,
|
23
|
+
@selected_time_series = which_series(type, "TIME_SERIES",
|
24
|
+
adjusted: adjusted)
|
28
25
|
url = "function=#{@selected_time_series}&symbol=#{symbol}#{interval}&outputsize=#{outputsize}"
|
29
26
|
return @client.download(url, file) if datatype == "csv"
|
30
|
-
@
|
31
|
-
metadata = @
|
27
|
+
@output = @client.request(url)
|
28
|
+
metadata = @output.dig("Meta Data") || {}
|
32
29
|
metadata.each do |key, val|
|
33
30
|
key_sym = recreate_metadata_key(key)
|
34
31
|
define_singleton_method(key_sym) do
|
@@ -37,10 +34,10 @@ module Alphavantage
|
|
37
34
|
end
|
38
35
|
|
39
36
|
begin
|
40
|
-
time_series = @
|
37
|
+
time_series = @output.find{|key, val| key.include?("Time Series")}[1]
|
41
38
|
rescue Exception => e
|
42
39
|
raise Alphavantage::Error.new message: "No Time Series found: #{e.message}",
|
43
|
-
data: @
|
40
|
+
data: @output
|
44
41
|
end
|
45
42
|
|
46
43
|
series = {}
|
@@ -63,14 +60,6 @@ module Alphavantage
|
|
63
60
|
end
|
64
61
|
end
|
65
62
|
|
66
|
-
attr_reader :
|
67
|
-
|
68
|
-
def which_series(type, adjusted)
|
69
|
-
check_argument(["intraday", "daily", "weekly", "monthly"], type, "type")
|
70
|
-
series = "TIME_SERIES_"
|
71
|
-
series += type.upcase
|
72
|
-
series += "_ADJUSTED" if adjusted
|
73
|
-
return series
|
74
|
-
end
|
63
|
+
attr_reader :output
|
75
64
|
end
|
76
65
|
end
|
data/lib/alphavantagerb.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
require "httparty"
|
2
2
|
require "humanize"
|
3
3
|
require "open-uri"
|
4
|
+
require "ostruct"
|
4
5
|
require_relative "helper_function"
|
5
6
|
require_relative "Timeseries"
|
6
7
|
require_relative "Indicator"
|
7
8
|
require_relative "Stock"
|
8
9
|
require_relative "Errors"
|
9
10
|
require_relative "Exchange"
|
11
|
+
require_relative "Exchange_Timeseries"
|
10
12
|
require_relative "Crypto"
|
11
13
|
require_relative "Crypto_Timeseries"
|
12
14
|
require_relative "Sector"
|
13
15
|
require_relative "Client"
|
14
|
-
require_relative "Batch"
|
data/lib/helper_function.rb
CHANGED
@@ -11,6 +11,25 @@ module HelperFunctions
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
+
def check_datatype(datatype, file)
|
15
|
+
if datatype == "csv" && file.nil?
|
16
|
+
raise Alphavantage::Error.new message: "No file specified where to save the CSV ata"
|
17
|
+
elsif datatype != "csv" && !file.nil?
|
18
|
+
raise Alphavantage::Error.new message: "Hash error: No file necessary"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def open_struct(url, type)
|
23
|
+
output = OpenStruct.new
|
24
|
+
output.output = @client.request(url)
|
25
|
+
global_quote = output.output.dig(type) || {}
|
26
|
+
global_quote.each do |key, val|
|
27
|
+
key_sym = recreate_metadata_key(key)
|
28
|
+
output[key_sym] = val
|
29
|
+
end
|
30
|
+
return output
|
31
|
+
end
|
32
|
+
|
14
33
|
def return_matype(val, val_string)
|
15
34
|
check_argument(["0", "1", "2", "3", "4", "5", "6", "7", "8", "SMA", "EMA", "WMA", "DEMA", "TEMA", "TRIMA", "T3", "KAMA", "MAMA"], val, "ma_type")
|
16
35
|
hash = {"SMA" => "0", "EMA" => "1", "WMA" => "2", "DEMA" => "3",
|
@@ -69,4 +88,12 @@ module HelperFunctions
|
|
69
88
|
key_sym = key_sym.to_sym
|
70
89
|
return key_sym
|
71
90
|
end
|
91
|
+
|
92
|
+
def which_series(type, name_series, adjusted: false)
|
93
|
+
check_argument(["intraday", "daily", "weekly", "monthly"], type, "type")
|
94
|
+
series = "#{name_series}_"
|
95
|
+
series += type.upcase
|
96
|
+
series += "_ADJUSTED" if adjusted
|
97
|
+
return series
|
98
|
+
end
|
72
99
|
end
|
data/spec/lib/1.0.0/client.rb
CHANGED
@@ -26,8 +26,13 @@ describe Alphavantage::Client do
|
|
26
26
|
expect(stock.class).to eq Alphavantage::Stock
|
27
27
|
end
|
28
28
|
|
29
|
+
it "can search a new stock from client" do
|
30
|
+
search = @client.search keywords: "MSFT"
|
31
|
+
expect(search.stocks[0].stock.class).to eq Alphavantage::Stock
|
32
|
+
end
|
33
|
+
|
29
34
|
it "can create a new exchange from client" do
|
30
|
-
|
35
|
+
exchange = @client.exchange from: "USD", to: "DKK"
|
31
36
|
expect(exchange.class).to eq Alphavantage::Exchange
|
32
37
|
end
|
33
38
|
|
@@ -37,7 +42,7 @@ describe Alphavantage::Client do
|
|
37
42
|
end
|
38
43
|
|
39
44
|
it "can create a new sector from client" do
|
40
|
-
|
45
|
+
sector = @client.sector
|
41
46
|
expect(sector.class).to eq Alphavantage::Sector
|
42
47
|
end
|
43
48
|
end
|
@@ -3,17 +3,17 @@ require_relative './../../spec_helper'
|
|
3
3
|
describe Alphavantage::Crypto_Timeseries do
|
4
4
|
context "#new" do
|
5
5
|
it "create a new timeseries without stock" do
|
6
|
-
|
6
|
+
stock = Alphavantage::Crypto_Timeseries.new symbol: "BTC", key: @config["key"], verbose: false, market: "DKK", type: "daily"
|
7
7
|
expect(stock.class).to eq Alphavantage::Crypto_Timeseries
|
8
8
|
end
|
9
9
|
|
10
10
|
it "create a new stock from stock" do
|
11
|
-
|
11
|
+
timeseries = @client.crypto(symbol: "BTC", market: "DKK").timeseries(type: "monthly")
|
12
12
|
expect(timeseries.class).to eq Alphavantage::Crypto_Timeseries
|
13
13
|
end
|
14
14
|
|
15
15
|
it "own multiple data" do
|
16
|
-
|
16
|
+
timeseries = @client.crypto(symbol: "BTC", market: "DKK").timeseries(type: "monthly")
|
17
17
|
bool = []
|
18
18
|
bool << timeseries.information.is_a?(String)
|
19
19
|
bool << (timeseries.digital_currency_code == "BTC")
|
@@ -22,7 +22,7 @@ describe Alphavantage::Crypto_Timeseries do
|
|
22
22
|
bool << timeseries.market_name.is_a?(String)
|
23
23
|
bool << timeseries.last_refreshed.is_a?(String)
|
24
24
|
bool << timeseries.time_zone.is_a?(String)
|
25
|
-
bool << timeseries.
|
25
|
+
bool << timeseries.output.is_a?(Hash)
|
26
26
|
bool << timeseries.open.is_a?(Array)
|
27
27
|
bool << timeseries.high.is_a?(Array)
|
28
28
|
bool << timeseries.low.is_a?(Array)
|
@@ -39,7 +39,7 @@ describe Alphavantage::Crypto_Timeseries do
|
|
39
39
|
# it "cannot retrieve with wrong key" do
|
40
40
|
# error = false
|
41
41
|
# begin
|
42
|
-
#
|
42
|
+
# stock = Alphavantage::Crypto_Timeseries.new symbol: "BTC", key: "wrong_key", market: "DKK"
|
43
43
|
# rescue Alphavantage::Error => e
|
44
44
|
# error = true
|
45
45
|
# end
|
@@ -49,7 +49,7 @@ describe Alphavantage::Crypto_Timeseries do
|
|
49
49
|
it "cannot retrieve with wrong symbol" do
|
50
50
|
error = false
|
51
51
|
begin
|
52
|
-
|
52
|
+
stock = Alphavantage::Crypto_Timeseries.new symbol: "wrong_symbol", key: @config["key"], market: "DKK", type: "daily"
|
53
53
|
rescue Alphavantage::Error => e
|
54
54
|
error = true
|
55
55
|
end
|
data/spec/lib/1.0.0/exchange.rb
CHANGED
@@ -3,17 +3,17 @@ require_relative './../../spec_helper'
|
|
3
3
|
describe Alphavantage::Exchange do
|
4
4
|
context "#new" do
|
5
5
|
it "create a new exchange without client" do
|
6
|
-
|
6
|
+
exchange = Alphavantage::Exchange.new from: "USD", to: "DKK", key: @config["key"]
|
7
7
|
expect(exchange.class).to eq Alphavantage::Exchange
|
8
8
|
end
|
9
9
|
|
10
10
|
it "create a new exchange with client" do
|
11
|
-
|
11
|
+
exchange = @client.exchange from: "USD", to: "DKK"
|
12
12
|
expect(exchange.class).to eq Alphavantage::Exchange
|
13
13
|
end
|
14
14
|
|
15
15
|
it "has several parameters" do
|
16
|
-
|
16
|
+
exchange = @client.exchange(from: "USD", to: "DKK").now
|
17
17
|
bool = []
|
18
18
|
bool << (exchange.from_currency_code == "USD")
|
19
19
|
bool << exchange.from_currency_name.is_a?(String)
|
@@ -22,14 +22,14 @@ describe Alphavantage::Exchange do
|
|
22
22
|
bool << exchange.exchange_rate.is_a?(String)
|
23
23
|
bool << exchange.last_refreshed.is_a?(String)
|
24
24
|
bool << exchange.time_zone.is_a?(String)
|
25
|
-
bool << exchange.
|
25
|
+
bool << exchange.output.is_a?(Hash)
|
26
26
|
expect(bool.all?{|e| e}).to eq true
|
27
27
|
end
|
28
28
|
|
29
29
|
# it "cannot retrieve with wrong key" do
|
30
30
|
# error = false
|
31
31
|
# begin
|
32
|
-
#
|
32
|
+
# stock = Alphavantage::Exchange.new from: "USD", to: "DKK", key:"wrong_key"
|
33
33
|
# rescue Alphavantage::Error => e
|
34
34
|
# error = true
|
35
35
|
# end
|
@@ -39,7 +39,9 @@ describe Alphavantage::Exchange do
|
|
39
39
|
it "cannot retrieve with wrong symbol" do
|
40
40
|
error = false
|
41
41
|
begin
|
42
|
-
|
42
|
+
stock = Alphavantage::Exchange.new from: "wrong_from",
|
43
|
+
to: "DKK", key: @config["key"]
|
44
|
+
stock.now
|
43
45
|
rescue Alphavantage::Error => e
|
44
46
|
error = true
|
45
47
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require_relative './../../spec_helper'
|
2
|
+
|
3
|
+
describe Alphavantage::Stock do
|
4
|
+
context "#new" do
|
5
|
+
it "create a new timeseries without stock" do
|
6
|
+
stock = Alphavantage::Exchange_Timeseries.new from: "USD", to: "DKK", key: @config["key"], verbose: false
|
7
|
+
expect(stock.class).to eq Alphavantage::Exchange_Timeseries
|
8
|
+
end
|
9
|
+
|
10
|
+
it "create a new stock from stock" do
|
11
|
+
timeseries = @client.exchange(from: "USD", to: "DKK").timeseries(type: "daily", outputsize: "compact")
|
12
|
+
expect(timeseries.class).to eq Alphavantage::Exchange_Timeseries
|
13
|
+
end
|
14
|
+
|
15
|
+
it "own multiple data" do
|
16
|
+
timeseries = @client.exchange(from: "USD", to: "DKK").timeseries(type: "daily", outputsize: "full")
|
17
|
+
bool = []
|
18
|
+
bool << timeseries.information.is_a?(String)
|
19
|
+
bool << (timeseries.from_symbol == "USD")
|
20
|
+
bool << (timeseries.to_symbol == "DKK")
|
21
|
+
bool << timeseries.last_refreshed.is_a?(String)
|
22
|
+
bool << (timeseries.output_size == "Full size")
|
23
|
+
bool << timeseries.time_zone.is_a?(String)
|
24
|
+
bool << timeseries.output.is_a?(Hash)
|
25
|
+
bool << timeseries.open.is_a?(Array)
|
26
|
+
bool << timeseries.high.is_a?(Array)
|
27
|
+
bool << timeseries.low.is_a?(Array)
|
28
|
+
bool << timeseries.close.is_a?(Array)
|
29
|
+
expect(bool.all?{|e| e}).to eq true
|
30
|
+
end
|
31
|
+
|
32
|
+
it "can retrieve intraday" do
|
33
|
+
timeseries = @client.exchange(from: "USD", to: "DKK").timeseries(type: "intraday", interval: "30min")
|
34
|
+
bool = []
|
35
|
+
bool << timeseries.information.is_a?(String)
|
36
|
+
bool << (timeseries.from_symbol == "USD")
|
37
|
+
bool << (timeseries.to_symbol == "DKK")
|
38
|
+
bool << timeseries.last_refreshed.is_a?(String)
|
39
|
+
bool << (timeseries.interval == "30min")
|
40
|
+
bool << (timeseries.output_size == "Compact")
|
41
|
+
bool << timeseries.time_zone.is_a?(String)
|
42
|
+
bool << timeseries.output.is_a?(Hash)
|
43
|
+
bool << timeseries.open.is_a?(Array)
|
44
|
+
bool << timeseries.high.is_a?(Array)
|
45
|
+
bool << timeseries.low.is_a?(Array)
|
46
|
+
bool << timeseries.close.is_a?(Array)
|
47
|
+
expect(bool.all?{|e| e}).to eq true
|
48
|
+
end
|
49
|
+
|
50
|
+
it "can retrieve csv files" do
|
51
|
+
bool = []
|
52
|
+
directory = "#{__dir__}/test.csv"
|
53
|
+
bool << File.exists?(directory)
|
54
|
+
sleep(1);
|
55
|
+
@client.exchange(from: "USD", to: "DKK").timeseries(type: "intraday", interval: "30min",
|
56
|
+
datatype: "csv", file: directory)
|
57
|
+
bool << File.exists?(directory)
|
58
|
+
File.delete(directory)
|
59
|
+
expect(bool).to eq [false, true]
|
60
|
+
end
|
61
|
+
|
62
|
+
it "cannot retrieve with wrong symbol" do
|
63
|
+
error = false
|
64
|
+
begin
|
65
|
+
stock = Alphavantage::Exchange_Timeseries.new from: "wrong_symbol",
|
66
|
+
to: "USD", key: @config["key"]
|
67
|
+
rescue Alphavantage::Error => e
|
68
|
+
error = true
|
69
|
+
end
|
70
|
+
expect(error).to eq true
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/spec/lib/1.0.0/indicator.rb
CHANGED
@@ -3,18 +3,18 @@
|
|
3
3
|
describe Alphavantage::Indicator do
|
4
4
|
context "#new" do
|
5
5
|
it "create a new indicator without stock" do
|
6
|
-
|
6
|
+
indicator = Alphavantage::Indicator.new function: "SMA", symbol: "MSFT", key: @config["key"], verbose: false
|
7
7
|
expect(indicator.class).to eq Alphavantage::Indicator
|
8
8
|
end
|
9
9
|
|
10
10
|
it "create a new stock from stock" do
|
11
|
-
|
11
|
+
indicator = @client.stock(symbol: "MSFT").indicator(function: "SMA")
|
12
12
|
expect(indicator.class).to eq Alphavantage::Indicator
|
13
13
|
end
|
14
14
|
|
15
15
|
it "can be indicator SMA" do
|
16
16
|
bool = []
|
17
|
-
|
17
|
+
indicator = @stock.indicator(function: "SMA", interval: "weekly", time_period: "60", series_type: "close")
|
18
18
|
bool << (indicator.symbol == "MSFT")
|
19
19
|
bool << indicator.indicator.is_a?(String)
|
20
20
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -28,7 +28,7 @@ describe Alphavantage::Indicator do
|
|
28
28
|
|
29
29
|
it "can be indicator EMA" do
|
30
30
|
bool = []
|
31
|
-
|
31
|
+
indicator = @stock.indicator(function: "EMA", interval: "weekly", time_period: "60", series_type: "close")
|
32
32
|
bool << (indicator.symbol == "MSFT")
|
33
33
|
bool << indicator.indicator.is_a?(String)
|
34
34
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -41,7 +41,7 @@ describe Alphavantage::Indicator do
|
|
41
41
|
|
42
42
|
it "can be indicator WMA" do
|
43
43
|
bool = []
|
44
|
-
|
44
|
+
indicator = @stock.indicator(function: "WMA", interval: "weekly", time_period: "60", series_type: "close")
|
45
45
|
bool << (indicator.symbol == "MSFT")
|
46
46
|
bool << indicator.indicator.is_a?(String)
|
47
47
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -54,7 +54,7 @@ describe Alphavantage::Indicator do
|
|
54
54
|
|
55
55
|
it "can be indicator DEMA" do
|
56
56
|
bool = []
|
57
|
-
|
57
|
+
indicator = @stock.indicator(function: "DEMA", interval: "weekly", time_period: "60", series_type: "close")
|
58
58
|
bool << (indicator.symbol == "MSFT")
|
59
59
|
bool << indicator.indicator.is_a?(String)
|
60
60
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -67,7 +67,7 @@ describe Alphavantage::Indicator do
|
|
67
67
|
|
68
68
|
it "can be indicator TEMA" do
|
69
69
|
bool = []
|
70
|
-
|
70
|
+
indicator = @stock.indicator(function: "TEMA", interval: "weekly", time_period: "60", series_type: "close")
|
71
71
|
bool << (indicator.symbol == "MSFT")
|
72
72
|
bool << indicator.indicator.is_a?(String)
|
73
73
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -80,7 +80,7 @@ describe Alphavantage::Indicator do
|
|
80
80
|
|
81
81
|
it "can be indicator TRIMA" do
|
82
82
|
bool = []
|
83
|
-
|
83
|
+
indicator = @stock.indicator(function: "TRIMA", interval: "weekly", time_period: "60", series_type: "close")
|
84
84
|
bool << (indicator.symbol == "MSFT")
|
85
85
|
bool << indicator.indicator.is_a?(String)
|
86
86
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -93,7 +93,7 @@ describe Alphavantage::Indicator do
|
|
93
93
|
|
94
94
|
it "can be indicator KAMA" do
|
95
95
|
bool = []
|
96
|
-
|
96
|
+
indicator = @stock.indicator(function: "KAMA", interval: "weekly", time_period: "60", series_type: "close")
|
97
97
|
bool << (indicator.symbol == "MSFT")
|
98
98
|
bool << indicator.indicator.is_a?(String)
|
99
99
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -106,7 +106,7 @@ describe Alphavantage::Indicator do
|
|
106
106
|
|
107
107
|
it "can be indicator MAMA" do
|
108
108
|
bool = []
|
109
|
-
|
109
|
+
indicator = @stock.indicator(function: "MAMA", interval: "weekly", series_type: "close", fastlimit: "0.02", slowlimit: "0.01")
|
110
110
|
bool << (indicator.symbol == "MSFT")
|
111
111
|
bool << indicator.indicator.is_a?(String)
|
112
112
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -122,7 +122,7 @@ describe Alphavantage::Indicator do
|
|
122
122
|
|
123
123
|
it "can be indicator T3" do
|
124
124
|
bool = []
|
125
|
-
|
125
|
+
indicator = @stock.indicator(function: "T3", interval: "weekly", time_period: "60", series_type: "close")
|
126
126
|
bool << (indicator.symbol == "MSFT")
|
127
127
|
bool << indicator.indicator.is_a?(String)
|
128
128
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -136,7 +136,7 @@ describe Alphavantage::Indicator do
|
|
136
136
|
|
137
137
|
it "can be indicator MACD" do
|
138
138
|
bool = []
|
139
|
-
|
139
|
+
indicator = @stock.indicator(function: "MACD", interval: "weekly", time_period: "60", series_type: "close", fastperiod: "12", slowperiod: "26", signalperiod: "9")
|
140
140
|
bool << (indicator.symbol == "MSFT")
|
141
141
|
bool << indicator.indicator.is_a?(String)
|
142
142
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -154,7 +154,7 @@ describe Alphavantage::Indicator do
|
|
154
154
|
|
155
155
|
it "can be indicator MACDEXT" do
|
156
156
|
bool = []
|
157
|
-
|
157
|
+
indicator = @stock.indicator(function: "MACDEXT", interval: "weekly", time_period: "60", series_type: "close", fastperiod: "12", slowperiod: "26", signalperiod: "9", fastmatype: "0", slowmatype: "0", signalmatype: "0")
|
158
158
|
bool << (indicator.symbol == "MSFT")
|
159
159
|
bool << indicator.indicator.is_a?(String)
|
160
160
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -175,7 +175,7 @@ describe Alphavantage::Indicator do
|
|
175
175
|
|
176
176
|
it "can be indicator STOCH" do
|
177
177
|
bool = []
|
178
|
-
|
178
|
+
indicator = @stock.indicator(function: "STOCH", interval: "weekly", fastkperiod: "5", slowkperiod: "3", slowdperiod: "3", slowkmatype: "0", slowdmatype: "0")
|
179
179
|
bool << (indicator.symbol == "MSFT")
|
180
180
|
bool << indicator.indicator.is_a?(String)
|
181
181
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -193,7 +193,7 @@ describe Alphavantage::Indicator do
|
|
193
193
|
|
194
194
|
it "can be indicator STOCHF" do
|
195
195
|
bool = []
|
196
|
-
|
196
|
+
indicator = @stock.indicator(function: "STOCHF", interval: "weekly", fastkperiod: "5", fastdperiod: "3", fastdmatype: "0")
|
197
197
|
bool << (indicator.symbol == "MSFT")
|
198
198
|
bool << indicator.indicator.is_a?(String)
|
199
199
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -209,7 +209,7 @@ describe Alphavantage::Indicator do
|
|
209
209
|
|
210
210
|
it "can be indicator RSI" do
|
211
211
|
bool = []
|
212
|
-
|
212
|
+
indicator = @stock.indicator(function: "RSI", interval: "weekly", time_period: "60", series_type: "close")
|
213
213
|
bool << (indicator.symbol == "MSFT")
|
214
214
|
bool << indicator.indicator.is_a?(String)
|
215
215
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -222,7 +222,7 @@ describe Alphavantage::Indicator do
|
|
222
222
|
|
223
223
|
it "can be indicator STOCHRSI" do
|
224
224
|
bool = []
|
225
|
-
|
225
|
+
indicator = @stock.indicator(function: "STOCHRSI", interval: "weekly", time_period: "60", fastkperiod: "5", fastdperiod: "3", fastdmatype: "0")
|
226
226
|
bool << (indicator.symbol == "MSFT")
|
227
227
|
bool << indicator.indicator.is_a?(String)
|
228
228
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -238,7 +238,7 @@ describe Alphavantage::Indicator do
|
|
238
238
|
|
239
239
|
it "can be indicator WILLR" do
|
240
240
|
bool = []
|
241
|
-
|
241
|
+
indicator = @stock.indicator(function: "WILLR", interval: "weekly", time_period: "60")
|
242
242
|
bool << (indicator.symbol == "MSFT")
|
243
243
|
bool << indicator.indicator.is_a?(String)
|
244
244
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -250,7 +250,7 @@ describe Alphavantage::Indicator do
|
|
250
250
|
|
251
251
|
it "can be indicator ADX" do
|
252
252
|
bool = []
|
253
|
-
|
253
|
+
indicator = @stock.indicator(function: "ADX", interval: "weekly", time_period: "60")
|
254
254
|
bool << (indicator.symbol == "MSFT")
|
255
255
|
bool << indicator.indicator.is_a?(String)
|
256
256
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -262,7 +262,7 @@ describe Alphavantage::Indicator do
|
|
262
262
|
|
263
263
|
it "can be indicator ADXR" do
|
264
264
|
bool = []
|
265
|
-
|
265
|
+
indicator = @stock.indicator(function: "ADXR", interval: "weekly", time_period: "60")
|
266
266
|
bool << (indicator.symbol == "MSFT")
|
267
267
|
bool << indicator.indicator.is_a?(String)
|
268
268
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -274,7 +274,7 @@ describe Alphavantage::Indicator do
|
|
274
274
|
|
275
275
|
it "can be indicator APO" do
|
276
276
|
bool = []
|
277
|
-
|
277
|
+
indicator = @stock.indicator(function: "APO", interval: "weekly", series_type: "close", fastperiod: "12", slowperiod: "26", signalperiod: "9", matype: "0")
|
278
278
|
bool << (indicator.symbol == "MSFT")
|
279
279
|
bool << indicator.indicator.is_a?(String)
|
280
280
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -290,7 +290,7 @@ describe Alphavantage::Indicator do
|
|
290
290
|
|
291
291
|
it "can be indicator PPO" do
|
292
292
|
bool = []
|
293
|
-
|
293
|
+
indicator = @stock.indicator(function: "PPO", interval: "weekly", series_type: "close", fastperiod: "12", slowperiod: "26", signalperiod: "9", matype: "0")
|
294
294
|
bool << (indicator.symbol == "MSFT")
|
295
295
|
bool << indicator.indicator.is_a?(String)
|
296
296
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -306,7 +306,7 @@ describe Alphavantage::Indicator do
|
|
306
306
|
|
307
307
|
it "can be indicator MOM" do
|
308
308
|
bool = []
|
309
|
-
|
309
|
+
indicator = @stock.indicator(function: "MOM", interval: "weekly", time_period: "60", series_type: "close")
|
310
310
|
bool << (indicator.symbol == "MSFT")
|
311
311
|
bool << indicator.indicator.is_a?(String)
|
312
312
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -319,7 +319,7 @@ describe Alphavantage::Indicator do
|
|
319
319
|
|
320
320
|
it "can be indicator BOP" do
|
321
321
|
bool = []
|
322
|
-
|
322
|
+
indicator = @stock.indicator(function: "BOP", interval: "weekly")
|
323
323
|
bool << (indicator.symbol == "MSFT")
|
324
324
|
bool << indicator.indicator.is_a?(String)
|
325
325
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -331,7 +331,7 @@ describe Alphavantage::Indicator do
|
|
331
331
|
|
332
332
|
it "can be indicator CCI" do
|
333
333
|
bool = []
|
334
|
-
|
334
|
+
indicator = @stock.indicator(function: "CCI", interval: "weekly", time_period: "60")
|
335
335
|
bool << (indicator.symbol == "MSFT")
|
336
336
|
bool << indicator.indicator.is_a?(String)
|
337
337
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -343,7 +343,7 @@ describe Alphavantage::Indicator do
|
|
343
343
|
|
344
344
|
it "can be indicator CMO" do
|
345
345
|
bool = []
|
346
|
-
|
346
|
+
indicator = @stock.indicator(function: "CMO", interval: "weekly", time_period: "60", series_type: "close")
|
347
347
|
bool << (indicator.symbol == "MSFT")
|
348
348
|
bool << indicator.indicator.is_a?(String)
|
349
349
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -356,7 +356,7 @@ describe Alphavantage::Indicator do
|
|
356
356
|
|
357
357
|
it "can be indicator ROC" do
|
358
358
|
bool = []
|
359
|
-
|
359
|
+
indicator = @stock.indicator(function: "ROC", interval: "weekly", time_period: "60", series_type: "close")
|
360
360
|
bool << (indicator.symbol == "MSFT")
|
361
361
|
bool << indicator.indicator.is_a?(String)
|
362
362
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -369,7 +369,7 @@ describe Alphavantage::Indicator do
|
|
369
369
|
|
370
370
|
it "can be indicator ROCR" do
|
371
371
|
bool = []
|
372
|
-
|
372
|
+
indicator = @stock.indicator(function: "ROCR", interval: "weekly", time_period: "60", series_type: "close")
|
373
373
|
bool << (indicator.symbol == "MSFT")
|
374
374
|
bool << indicator.indicator.is_a?(String)
|
375
375
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -382,7 +382,7 @@ describe Alphavantage::Indicator do
|
|
382
382
|
|
383
383
|
it "can be indicator AROON" do
|
384
384
|
bool = []
|
385
|
-
|
385
|
+
indicator = @stock.indicator(function: "AROON", interval: "weekly", time_period: "60")
|
386
386
|
bool << (indicator.symbol == "MSFT")
|
387
387
|
bool << indicator.indicator.is_a?(String)
|
388
388
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -395,7 +395,7 @@ describe Alphavantage::Indicator do
|
|
395
395
|
|
396
396
|
it "can be indicator AROONOSC" do
|
397
397
|
bool = []
|
398
|
-
|
398
|
+
indicator = @stock.indicator(function: "AROONOSC", interval: "weekly", time_period: "60")
|
399
399
|
bool << (indicator.symbol == "MSFT")
|
400
400
|
bool << indicator.indicator.is_a?(String)
|
401
401
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -407,7 +407,7 @@ describe Alphavantage::Indicator do
|
|
407
407
|
|
408
408
|
it "can be indicator MFI" do
|
409
409
|
bool = []
|
410
|
-
|
410
|
+
indicator = @stock.indicator(function: "MFI", interval: "weekly", time_period: "60")
|
411
411
|
bool << (indicator.symbol == "MSFT")
|
412
412
|
bool << indicator.indicator.is_a?(String)
|
413
413
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -419,7 +419,7 @@ describe Alphavantage::Indicator do
|
|
419
419
|
|
420
420
|
it "can be indicator TRIX" do
|
421
421
|
bool = []
|
422
|
-
|
422
|
+
indicator = @stock.indicator(function: "TRIX", interval: "weekly", time_period: "60", series_type: "close")
|
423
423
|
bool << (indicator.symbol == "MSFT")
|
424
424
|
bool << indicator.indicator.is_a?(String)
|
425
425
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -432,7 +432,7 @@ describe Alphavantage::Indicator do
|
|
432
432
|
|
433
433
|
it "can be indicator ULTOSC" do
|
434
434
|
bool = []
|
435
|
-
|
435
|
+
indicator = @stock.indicator(function: "ULTOSC", interval: "weekly", timeperiod1: "7", timeperiod2: "14", timeperiod3: "28")
|
436
436
|
bool << (indicator.symbol == "MSFT")
|
437
437
|
bool << indicator.indicator.is_a?(String)
|
438
438
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -447,7 +447,7 @@ describe Alphavantage::Indicator do
|
|
447
447
|
|
448
448
|
it "can be indicator DX" do
|
449
449
|
bool = []
|
450
|
-
|
450
|
+
indicator = @stock.indicator(function: "DX", interval: "weekly", time_period: "60")
|
451
451
|
bool << (indicator.symbol == "MSFT")
|
452
452
|
bool << indicator.indicator.is_a?(String)
|
453
453
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -459,7 +459,7 @@ describe Alphavantage::Indicator do
|
|
459
459
|
|
460
460
|
it "can be indicator MINUS_DI" do
|
461
461
|
bool = []
|
462
|
-
|
462
|
+
indicator = @stock.indicator(function: "MINUS_DI", interval: "weekly", time_period: "60")
|
463
463
|
bool << (indicator.symbol == "MSFT")
|
464
464
|
bool << indicator.indicator.is_a?(String)
|
465
465
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -471,7 +471,7 @@ describe Alphavantage::Indicator do
|
|
471
471
|
|
472
472
|
it "can be indicator PLUS_DI" do
|
473
473
|
bool = []
|
474
|
-
|
474
|
+
indicator = @stock.indicator(function: "PLUS_DI", interval: "weekly", time_period: "60")
|
475
475
|
bool << (indicator.symbol == "MSFT")
|
476
476
|
bool << indicator.indicator.is_a?(String)
|
477
477
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -483,7 +483,7 @@ describe Alphavantage::Indicator do
|
|
483
483
|
|
484
484
|
it "can be indicator MINUS_DM" do
|
485
485
|
bool = []
|
486
|
-
|
486
|
+
indicator = @stock.indicator(function: "MINUS_DM", interval: "weekly", time_period: "60")
|
487
487
|
bool << (indicator.symbol == "MSFT")
|
488
488
|
bool << indicator.indicator.is_a?(String)
|
489
489
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -495,7 +495,7 @@ describe Alphavantage::Indicator do
|
|
495
495
|
|
496
496
|
it "can be indicator PLUS_DM" do
|
497
497
|
bool = []
|
498
|
-
|
498
|
+
indicator = @stock.indicator(function: "PLUS_DM", interval: "weekly", time_period: "60")
|
499
499
|
bool << (indicator.symbol == "MSFT")
|
500
500
|
bool << indicator.indicator.is_a?(String)
|
501
501
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -507,7 +507,7 @@ describe Alphavantage::Indicator do
|
|
507
507
|
|
508
508
|
it "can be indicator BBANDS" do
|
509
509
|
bool = []
|
510
|
-
|
510
|
+
indicator = @stock.indicator(function: "BBANDS", interval: "weekly", time_period: "60", series_type: "close", matype: "0", nbdevup: "2", nbdevdn: "2")
|
511
511
|
bool << (indicator.symbol == "MSFT")
|
512
512
|
bool << indicator.indicator.is_a?(String)
|
513
513
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -525,7 +525,7 @@ describe Alphavantage::Indicator do
|
|
525
525
|
|
526
526
|
it "can be indicator MIDPOINT" do
|
527
527
|
bool = []
|
528
|
-
|
528
|
+
indicator = @stock.indicator(function: "MIDPOINT", interval: "weekly", time_period: "60", series_type: "close")
|
529
529
|
bool << (indicator.symbol == "MSFT")
|
530
530
|
bool << indicator.indicator.is_a?(String)
|
531
531
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -538,7 +538,7 @@ describe Alphavantage::Indicator do
|
|
538
538
|
|
539
539
|
it "can be indicator MIDPRICE" do
|
540
540
|
bool = []
|
541
|
-
|
541
|
+
indicator = @stock.indicator(function: "MIDPRICE", interval: "weekly", time_period: "60")
|
542
542
|
bool << (indicator.symbol == "MSFT")
|
543
543
|
bool << indicator.indicator.is_a?(String)
|
544
544
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -550,7 +550,7 @@ describe Alphavantage::Indicator do
|
|
550
550
|
|
551
551
|
it "can be indicator SAR" do
|
552
552
|
bool = []
|
553
|
-
|
553
|
+
indicator = @stock.indicator(function: "SAR", interval: "weekly", acceleration: "0.01", maximum: "0.20")
|
554
554
|
bool << (indicator.symbol == "MSFT")
|
555
555
|
bool << indicator.indicator.is_a?(String)
|
556
556
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -564,7 +564,7 @@ describe Alphavantage::Indicator do
|
|
564
564
|
|
565
565
|
it "can be indicator TRANGE" do
|
566
566
|
bool = []
|
567
|
-
|
567
|
+
indicator = @stock.indicator(function: "TRANGE", interval: "weekly")
|
568
568
|
bool << (indicator.symbol == "MSFT")
|
569
569
|
bool << indicator.indicator.is_a?(String)
|
570
570
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -576,7 +576,7 @@ describe Alphavantage::Indicator do
|
|
576
576
|
|
577
577
|
it "can be indicator ATR" do
|
578
578
|
bool = []
|
579
|
-
|
579
|
+
indicator = @stock.indicator(function: "ATR", interval: "weekly", time_period: "60")
|
580
580
|
bool << (indicator.symbol == "MSFT")
|
581
581
|
bool << indicator.indicator.is_a?(String)
|
582
582
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -588,7 +588,7 @@ describe Alphavantage::Indicator do
|
|
588
588
|
|
589
589
|
it "can be indicator NATR" do
|
590
590
|
bool = []
|
591
|
-
|
591
|
+
indicator = @stock.indicator(function: "NATR", interval: "weekly", time_period: "60")
|
592
592
|
bool << (indicator.symbol == "MSFT")
|
593
593
|
bool << indicator.indicator.is_a?(String)
|
594
594
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -600,7 +600,7 @@ describe Alphavantage::Indicator do
|
|
600
600
|
|
601
601
|
it "can be indicator AD" do
|
602
602
|
bool = []
|
603
|
-
|
603
|
+
indicator = @stock.indicator(function: "AD", interval: "weekly")
|
604
604
|
bool << (indicator.symbol == "MSFT")
|
605
605
|
bool << indicator.indicator.is_a?(String)
|
606
606
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -612,7 +612,7 @@ describe Alphavantage::Indicator do
|
|
612
612
|
|
613
613
|
it "can be indicator ADOSC" do
|
614
614
|
bool = []
|
615
|
-
|
615
|
+
indicator = @stock.indicator(function: "ADOSC", interval: "weekly", fastperiod: "12", slowperiod: "26")
|
616
616
|
bool << (indicator.symbol == "MSFT")
|
617
617
|
bool << indicator.indicator.is_a?(String)
|
618
618
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -626,7 +626,7 @@ describe Alphavantage::Indicator do
|
|
626
626
|
|
627
627
|
it "can be indicator OBV" do
|
628
628
|
bool = []
|
629
|
-
|
629
|
+
indicator = @stock.indicator(function: "OBV", interval: "weekly")
|
630
630
|
bool << (indicator.symbol == "MSFT")
|
631
631
|
bool << indicator.indicator.is_a?(String)
|
632
632
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -638,7 +638,7 @@ describe Alphavantage::Indicator do
|
|
638
638
|
|
639
639
|
it "can be indicator HT_TRENDLINE" do
|
640
640
|
bool = []
|
641
|
-
|
641
|
+
indicator = @stock.indicator(function: "HT_TRENDLINE", interval: "weekly", series_type: "close")
|
642
642
|
bool << (indicator.symbol == "MSFT")
|
643
643
|
bool << indicator.indicator.is_a?(String)
|
644
644
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -651,7 +651,7 @@ describe Alphavantage::Indicator do
|
|
651
651
|
|
652
652
|
it "can be indicator HT_SINE" do
|
653
653
|
bool = []
|
654
|
-
|
654
|
+
indicator = @stock.indicator(function: "HT_SINE", interval: "weekly", series_type: "close")
|
655
655
|
bool << (indicator.symbol == "MSFT")
|
656
656
|
bool << indicator.indicator.is_a?(String)
|
657
657
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -665,7 +665,7 @@ describe Alphavantage::Indicator do
|
|
665
665
|
|
666
666
|
it "can be indicator HT_TRENDMODE" do
|
667
667
|
bool = []
|
668
|
-
|
668
|
+
indicator = @stock.indicator(function: "HT_TRENDMODE", interval: "weekly", series_type: "close")
|
669
669
|
bool << (indicator.symbol == "MSFT")
|
670
670
|
bool << indicator.indicator.is_a?(String)
|
671
671
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -678,7 +678,7 @@ describe Alphavantage::Indicator do
|
|
678
678
|
|
679
679
|
it "can be indicator HT_DCPERIOD" do
|
680
680
|
bool = []
|
681
|
-
|
681
|
+
indicator = @stock.indicator(function: "HT_DCPERIOD", interval: "weekly", series_type: "close")
|
682
682
|
bool << (indicator.symbol == "MSFT")
|
683
683
|
bool << indicator.indicator.is_a?(String)
|
684
684
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -691,7 +691,7 @@ describe Alphavantage::Indicator do
|
|
691
691
|
|
692
692
|
it "can be indicator HT_DCPHASE" do
|
693
693
|
bool = []
|
694
|
-
|
694
|
+
indicator = @stock.indicator(function: "HT_DCPHASE", interval: "weekly", series_type: "close")
|
695
695
|
bool << (indicator.symbol == "MSFT")
|
696
696
|
bool << indicator.indicator.is_a?(String)
|
697
697
|
bool << indicator.last_refreshed.is_a?(String)
|
@@ -704,7 +704,7 @@ describe Alphavantage::Indicator do
|
|
704
704
|
|
705
705
|
it "can be indicator HT_PHASOR" do
|
706
706
|
bool = []
|
707
|
-
|
707
|
+
indicator = @stock.indicator(function: "HT_PHASOR", interval: "weekly", series_type: "close")
|
708
708
|
bool << (indicator.symbol == "MSFT")
|
709
709
|
bool << indicator.indicator.is_a?(String)
|
710
710
|
bool << indicator.last_refreshed.is_a?(String)
|