cryptum 0.0.341 → 0.0.342

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: bad3d8b138eecbde91088b1feb705b0002df2f8b29bd9b1f232eec1001fa1d03
4
- data.tar.gz: 9f0b981a0aeb0a369634a6866cef17a4085a5b8aadcac4ddc180f86096f7a553
3
+ metadata.gz: db5e1c987c7141702b6339e049b643f5b1db8c26e1f980324e88d553232ba7e3
4
+ data.tar.gz: cb490c80378fb97909a1546adad4916c9223cf84c9601b742611c97eeb3957c9
5
5
  SHA512:
6
- metadata.gz: 8c52440f76f5a2f92fd5a7aa4cfe4fd70177a09286c8d8b807233b4a221c6c24dd2e165a5ab023ceba51d267e03218b170445590ec9685d800f5a6ddbe17cb5f
7
- data.tar.gz: f3934b02ab277516fd147b797a22a5f3e653f61ccdbaf91c229b00f2881e99d6f31f379d34f05d115eafc61987faed2fd03d31992aa0ecf0e5e3b1f1c906acac
6
+ metadata.gz: ce8189f0d68456ea0ee95fa9989d3666de19e2c4651bb53a64402d305042e37ac69f1042598db1d12d84ce76d33ad4de2183a691cae02f193a5cbba8557d6577
7
+ data.tar.gz: 64172f28596d4caf9d3dfd5a13be6c78181f6ea5bcf8e4649661e4ddb85f55723a97a5e312d3e199e1771ab286e3b6cda0325fbd2a45c082e4bb0ba2c4adff2c
@@ -14,14 +14,28 @@ module Cryptum
14
14
  event = opts[:event]
15
15
  indicator_status = opts[:indicator_status]
16
16
 
17
- buy_or_sell = event[:changes].first[0].to_s.to_sym
18
- case buy_or_sell
19
- when :buy
20
- event_history.order_book[:market_trend][:buy] += 1
21
- when :sell
22
- event_history.order_book[:market_trend][:sell] += 1
23
- else
24
- raise "UNKNOWN Value in event[:changes] => #{buy_or_sell}"
17
+ # Compatible w/ l2update websocket channel
18
+ # buy_or_sell = event[:changes].first[0].to_s.to_sym
19
+ # case buy_or_sell
20
+ # when :buy
21
+ # event_history.order_book[:market_trend][:buy] += 1
22
+ # when :sell
23
+ # event_history.order_book[:market_trend][:sell] += 1
24
+ # else
25
+ # raise "UNKNOWN Value in event[:changes] => #{buy_or_sell}"
26
+ # end
27
+
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
25
39
  end
26
40
 
27
41
  indicator_hash = {}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.341'
4
+ VERSION = '0.0.342'
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.341
4
+ version: 0.0.342
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.