ish_models 0.0.33.151 → 0.0.33.152
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/warbler/ameritrade.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eda424943e1eef920292be882d4c3d0f4de268fb556d4e85b0f099c793a577e2
|
4
|
+
data.tar.gz: 5c74167f789c8ac201c90a01c3f4c4a16bfd2ea965b2191990ab6c57daae7717
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f98bc72d8dc91b8061b28bfeec8954d283c3e811c6dc7a6e7cb2e574818417232f154c9d5271cf28a25e76f500dc637454c77c9bcb9fe43e86bb8f6a3f789fd
|
7
|
+
data.tar.gz: 5a6858c1ca87bf1c3d3dc293a01263682f5dede179c1bb07380eb70c7f1a0a4451106419263b1f9c421895a49d2307a7224ad9bed0773629e05c22e24152adab
|
data/lib/warbler/ameritrade.rb
CHANGED
@@ -60,18 +60,23 @@ class ::Warbler::Ameritrade::Api
|
|
60
60
|
opts = {}
|
61
61
|
|
62
62
|
# validate input
|
63
|
-
validOpts = %i| contractType strike
|
63
|
+
validOpts = %i| contractType strike |
|
64
64
|
validOpts.each do |s|
|
65
65
|
if _opts[s]
|
66
66
|
opts[s] = _opts[s]
|
67
67
|
else
|
68
|
-
raise Ish::InputError.new("
|
68
|
+
raise Ish::InputError.new("Invalid input, missing '#{s}'.")
|
69
69
|
end
|
70
70
|
end
|
71
71
|
if _opts[:date]
|
72
72
|
opts[:fromDate] = opts[:toDate] = _opts[:date]
|
73
73
|
else
|
74
|
-
raise Ish::InputError.new("
|
74
|
+
raise Ish::InputError.new("Invalid input, missing 'date'.")
|
75
|
+
end
|
76
|
+
if _opts[:ticker]
|
77
|
+
opts[:symbol] = _opts[:ticker].upcase
|
78
|
+
else
|
79
|
+
raise Ish::InputError.new("Invalid input, missing 'ticker'.")
|
75
80
|
end
|
76
81
|
|
77
82
|
query = { apikey: ::TD_AME[:apiKey], strikeCount: 1 }.merge opts
|