cryptum 0.0.445 → 0.0.447
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -3
- data/lib/cryptum/ui/order/execute.rb +10 -6
- data/lib/cryptum/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eeaa176f04f89b6a39a50b69d9e6bdac80e58965ceb7ed83c6974839184ee653
|
4
|
+
data.tar.gz: a3a1435caa2c02517007dd0ce2fef695319546a67e6a079de5aed93648f67d49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a7f3d9237d12824ff2d0b29237146ca0f9f1d53a5e340efb69e279ae366d2ae103561d5c4fb4ff9bb1dfc3eff0fcd3b9e02b89e3162e36c7ea96f2d859a44e8
|
7
|
+
data.tar.gz: 182f2f09e2aae04692f328a32051f5594200f438b05522c5d02d08b9b3fb51f14fdd5028da4faef8b049d787198a62012199cbf349a7aef9418fe4b2c3749bc8
|
data/.rubocop.yml
CHANGED
@@ -6,7 +6,7 @@ Layout/LineLength:
|
|
6
6
|
Lint/UselessRescue:
|
7
7
|
Enabled: false
|
8
8
|
Metrics/AbcSize:
|
9
|
-
Max:
|
9
|
+
Max: 447.2
|
10
10
|
Metrics/BlockLength:
|
11
11
|
Max: 138
|
12
12
|
Metrics/BlockNesting:
|
@@ -14,13 +14,13 @@ Metrics/BlockNesting:
|
|
14
14
|
Metrics/ClassLength:
|
15
15
|
Max: 134
|
16
16
|
Metrics/CyclomaticComplexity:
|
17
|
-
Max:
|
17
|
+
Max: 89
|
18
18
|
Metrics/MethodLength:
|
19
19
|
Max: 418
|
20
20
|
Metrics/ModuleLength:
|
21
21
|
Max: 428
|
22
22
|
Metrics/PerceivedComplexity:
|
23
|
-
Max:
|
23
|
+
Max: 87
|
24
24
|
Style/HashSyntax:
|
25
25
|
EnforcedShorthandSyntax: never
|
26
26
|
|
@@ -239,9 +239,11 @@ module Cryptum
|
|
239
239
|
end
|
240
240
|
end
|
241
241
|
|
242
|
-
# Snag all sold orders
|
242
|
+
# Snag all sold orders YTD
|
243
243
|
oh_meta_sold_arr = order_history_meta.select do |ohm|
|
244
|
-
ohm[:color].to_sym == :green &&
|
244
|
+
ohm[:color].to_sym == :green &&
|
245
|
+
ohm.key?(:done_at) &&
|
246
|
+
Time.now.strftime('%Y') == Time.parse(ohm[:done_at]).strftime('%Y')
|
245
247
|
end
|
246
248
|
order_hist_meta_sold = oh_meta_sold_arr.length
|
247
249
|
|
@@ -269,7 +271,8 @@ module Cryptum
|
|
269
271
|
|
270
272
|
oh_sold = order_history.find { |oh| oh[:id] == sell_order_id }
|
271
273
|
meta[:done_at] = Time.parse(oh_sold[:done_at]).strftime('%Y-%m-%d %H:%M:%S%z') unless oh_sold.nil?
|
272
|
-
meta[:done_at] ||=
|
274
|
+
meta[:done_at] ||= '____-__-__ __:__:__-____'
|
275
|
+
# meta[:done_at] ||= Time.now.strftime('%Y-%m-%d %H:%M:%S%z')
|
273
276
|
meta[:color] = :green
|
274
277
|
|
275
278
|
# Obtain buy && sell order details from order history
|
@@ -319,7 +322,8 @@ module Cryptum
|
|
319
322
|
end
|
320
323
|
order_hist_meta_24h_expired = ohm_expire_twenty_four_arr.length
|
321
324
|
|
322
|
-
# Calculate
|
325
|
+
# Calculate gains within past 24 hrs
|
326
|
+
# && Calculate gains YTD
|
323
327
|
gains_sum = oh_meta_sold_arr.map do |ohms|
|
324
328
|
ohms[:profit].to_f
|
325
329
|
end.sum
|
@@ -537,8 +541,8 @@ module Cryptum
|
|
537
541
|
)
|
538
542
|
|
539
543
|
header_str = "SELLING: #{total_to_sell} w tProf: $#{total_selling_profit_out} | "
|
540
|
-
header_str += "SOLD 24h: #{order_hist_meta_sold_twenty_four}
|
541
|
-
header_str += "GAINS 24h: $#{gains_24h_out}
|
544
|
+
header_str += "SOLD 24h: #{order_hist_meta_sold_twenty_four} YTD: #{order_hist_meta_sold} | "
|
545
|
+
header_str += "GAINS 24h: $#{gains_24h_out} YTD: $#{gains_out} | "
|
542
546
|
header_str += "EXPIRED 24h: #{order_hist_meta_24h_expired} Tot: #{order_hist_meta_expired}"
|
543
547
|
order_execute_win.setpos(
|
544
548
|
out_line_no,
|
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.447
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|