iron_warbler 2.0.7.18 → 2.0.7.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6b3c19fdfe0c9cd47b253a92b6065f067d3004022865d700059ad3190287f35
4
- data.tar.gz: abd93b990583e6ab2c644b74647014767a43947d81fdf7f1b15abf198efad96c
3
+ metadata.gz: 3323961dddbc46a423f2f913a487c0944d1a39c88ace9517f42b02eb7e4951a9
4
+ data.tar.gz: 2f28158b88fe50b7d190c5151da808819c816de9abf773c70063e39b8ed6a8da
5
5
  SHA512:
6
- metadata.gz: 106e70eda991a01d9ce69a265958ea2dbe25fb27a0b316297b303ec97c5cffb6cb274b78a4ceb827d107f7644122947038c8cce696fcd8f8240cffb6cfe9e28f
7
- data.tar.gz: 3b51d655011169c98ef738174c054733aaa4ebe737ebd53b0725f4f062e7b939bc4d72e3561a8c12d309240b68ded7d311ac91819da0b74d21f411240a249987
6
+ metadata.gz: 509add67004fa9cda9757fc71bd3319db109acb0cb981a4ac265dc5777f39680bbcfb265a0685f357b0b073604087df756c084b98d333f0c21616d535d205a62
7
+ data.tar.gz: f1b24ce8505853cbc1723b5117ff3a3c79f85bf793f2f8aa00f7bdd4d57ae47e2a9014f0739920609595c16376b2b7c2e0b4a1c13822f4477455fec68aa55d74
@@ -35,7 +35,8 @@ class Iro::Alert
35
35
  def do_run
36
36
  alert = self
37
37
  begin
38
- price = Tda::Stock.get_quote( alert.symbol ).last
38
+ price = Tda::Stock.get_quote( alert.symbol )&.last
39
+ return if !price
39
40
 
40
41
  if ( alert.direction == alert.class::DIRECTION_ABOVE && price >= alert.strike ) ||
41
42
  ( alert.direction == alert.class::DIRECTION_BELOW && price <= alert.strike )
@@ -16,6 +16,9 @@ class Tda::Stock
16
16
  path = "/v1/marketdata/quotes"
17
17
  inns = self.get path, { query: { apikey: ::TD_AMERITRADE[:apiKey], symbol: tickers } }
18
18
  inns = inns.parsed_response
19
+ if [ NilClass, String ].include?( inns.class )
20
+ return []
21
+ end
19
22
  inns.each do |k, v|
20
23
  inns[k] = v.deep_symbolize_keys
21
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_warbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7.18
4
+ version: 2.0.7.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-07 00:00:00.000000000 Z
11
+ date: 2024-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: business_time