cryptum 0.0.342 → 0.0.344
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/cryptum/order_book/market_trend.rb +4 -11
- data/lib/cryptum/ui/order_plan.rb +1 -1
- data/lib/cryptum/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af839b30214ff1f113a0079db70bb6a5965c5836753da812b1d62876668a64de
|
4
|
+
data.tar.gz: 4fb5d3994323c64f31eb2cd3667bf37a32441d976be614e980254d1250bc7b27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 702094f2a21b50f6c829a106bc487f5cc1375a4dfa7d890369e33a0ed2d8dacbf0bd286201001b31127488844f7d9c977c7c842822a572fe1e2d22ab7f95b689
|
7
|
+
data.tar.gz: 0f9d8e746d200cfca372519ebcc95f4a8db93991caddbce0512079abda9175ae2be822185599332ab759424807fcdb063aa00bba7d45946992cced98cf0b8a4b
|
data/Gemfile
CHANGED
@@ -26,17 +26,10 @@ module Cryptum
|
|
26
26
|
# end
|
27
27
|
|
28
28
|
# Compatible w/ l2update_batch websocket channel
|
29
|
-
event[:changes].
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
@@ -166,7 +166,7 @@ module Cryptum
|
|
166
166
|
plan_no_slice += 1
|
167
167
|
end
|
168
168
|
order_plan.last[:last_slice] = true if order_plan.any?
|
169
|
-
op_last_slice_invest = order_plan.last[:invest].to_f
|
169
|
+
op_last_slice_invest = order_plan.last[:invest].to_f if order_plan.any?
|
170
170
|
order_plan.last[:invest] = fiat_budget if order_plan.any? &&
|
171
171
|
op_last_slice_invest > fiat_budget &&
|
172
172
|
fiat_budget > min_market_funds.to_f
|
data/lib/cryptum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.344
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -296,14 +296,14 @@ dependencies:
|
|
296
296
|
requirements:
|
297
297
|
- - '='
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version: 3.0.
|
299
|
+
version: 3.0.5
|
300
300
|
type: :runtime
|
301
301
|
prerelease: false
|
302
302
|
version_requirements: !ruby/object:Gem::Requirement
|
303
303
|
requirements:
|
304
304
|
- - '='
|
305
305
|
- !ruby/object:Gem::Version
|
306
|
-
version: 3.0.
|
306
|
+
version: 3.0.5
|
307
307
|
- !ruby/object:Gem::Dependency
|
308
308
|
name: thin
|
309
309
|
requirement: !ruby/object:Gem::Requirement
|