cryptum 0.0.342 → 0.0.343

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: db5e1c987c7141702b6339e049b643f5b1db8c26e1f980324e88d553232ba7e3
4
- data.tar.gz: cb490c80378fb97909a1546adad4916c9223cf84c9601b742611c97eeb3957c9
3
+ metadata.gz: 02c2b62902a2b501d2c85af3dd61def11d0b1e28e89787a4da96540323f6b32d
4
+ data.tar.gz: 32db0b748869532f2e7a5662cec1c9eaa3d5dcdd3d2db57ea50468056669a769
5
5
  SHA512:
6
- metadata.gz: ce8189f0d68456ea0ee95fa9989d3666de19e2c4651bb53a64402d305042e37ac69f1042598db1d12d84ce76d33ad4de2183a691cae02f193a5cbba8557d6577
7
- data.tar.gz: 64172f28596d4caf9d3dfd5a13be6c78181f6ea5bcf8e4649661e4ddb85f55723a97a5e312d3e199e1771ab286e3b6cda0325fbd2a45c082e4bb0ba2c4adff2c
6
+ metadata.gz: 170b724a61be52c129c3b37a54e193ed166e83c19511197acede93898cc7597f4fb13a1e49501a562f3b9b84000b982c990f0b41831fc28ab3b3a6111fd1da6d
7
+ data.tar.gz: 6f404de1535cebc08cbea75d9a0f32b402e8814b4ebe2aa0bf4b7470705ceb87560259396c42057a4624a5022191b1ea498a5c8ff9baef37e62c92e62b77e602
@@ -26,17 +26,10 @@ module Cryptum
26
26
  # end
27
27
 
28
28
  # Compatible w/ l2update_batch websocket channel
29
- event[:changes].each do |change|
30
- buy_or_sell = change.first.to_s.to_sym
31
- case buy_or_sell
32
- when :buy
33
- event_history.order_book[:market_trend][:buy] += 1
34
- when :sell
35
- event_history.order_book[:market_trend][:sell] += 1
36
- else
37
- raise "UNKNOWN Value in event[:changes] => #{buy_or_sell}"
38
- end
39
- end
29
+ buy_count = event[:changes].select { |change| change.first == 'buy' }.length
30
+ sell_count = event[:changes].select { |change| change.first == 'sell' }.length
31
+ event_history.order_book[:market_trend][:buy] += buy_count
32
+ event_history.order_book[:market_trend][:sell] += sell_count
40
33
 
41
34
  indicator_hash = {}
42
35
  buy_total = event_history.order_book[:market_trend][:buy].to_i
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.342'
4
+ VERSION = '0.0.343'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.342
4
+ version: 0.0.343
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.