cryptum 0.0.457 → 0.0.459

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7dda352965440c606383099a1ad8affc595e83b3126b1d9a17a5a9e80ea93f8
4
- data.tar.gz: 9680be3d642bdbf69833c3e61d1d25aa908a2259f421138106c42a554de7069e
3
+ metadata.gz: 8f3b6200242a459e04498dab907ff8783a894ff294fa4b6b29a9df2c36b9075c
4
+ data.tar.gz: 21e6dfd76ef7972d8b4a1c237b71bc9fa29453cc3aae489bb0b38f1276e6de89
5
5
  SHA512:
6
- metadata.gz: fb4e777ff41816b922ce7a98323c4ea33142abb623cd3e9bab90433e7436fdcf06d538c8794c7c3360234494ae6a062ddaa67a701ae718f8628767232c129b5f
7
- data.tar.gz: 4cbf5bb9dd5c144b92b8165e65fd830d6c84e9cd479e3e65ebae6c1dc4d10c4b675609fb8d292dd706e79398d9f59aa15e906ad78de416eb6d2d8a1bddc4dcf9
6
+ metadata.gz: cdd2b25fe0661067796f1ac6ef882a1fbb85fda5e31e5855f682d871fdf03a37567e83875810c80d12070b893f4bfc8c8c91d5a94c06b6e0a999fa002362cc1a
7
+ data.tar.gz: 84647d1b24aee7bd44989410974ea78f7f8e2e3bf629077d0e4e57bc7820bcdac7dac9b9d0112e60486933077db5140b77c549e14c4748d67704fb5d3d2ed786
@@ -255,6 +255,8 @@ module Cryptum
255
255
  oh.key?(:done_at) &&
256
256
  Time.now.strftime('%Y') == Time.parse(oh[:done_at]).strftime('%Y')
257
257
  end
258
+ # TODO: ensure oh_buy_ytd_arr && oh_sold_ytd_arr are same length
259
+ # otherwise it throws off the profit calculations
258
260
  order_hist_sold_ytd = oh_sold_ytd_arr.length
259
261
  order_hist_sold_usd_tot = oh_sold_ytd_arr.map do |oh|
260
262
  oh[:executed_value].to_f
@@ -641,10 +643,9 @@ module Cryptum
641
643
  string: ''.ljust(col_just1, ' ')
642
644
  )
643
645
 
644
- tot_header_str = "TOTAL OPEN: #{total_to_sell} TPMD: $TBD | "
646
+ tot_header_str = "TOTAL OPEN: #{total_to_sell} | "
645
647
  tot_header_str += "SOLD 24h: #{order_hist_sold_twenty_four} YTD: #{order_hist_sold_ytd} | "
646
- tot_header_str += "PROF 24h: $#{order_hist_profit_usd_24h_out} YTD: $#{order_hist_profit_usd_ytd_out} | "
647
- tot_header_str += 'AvgRndT DAYS: TBD'
648
+ tot_header_str += "PROF 24h: $#{order_hist_profit_usd_24h_out} YTD: $#{order_hist_profit_usd_ytd_out}"
648
649
  order_execute_win.setpos(
649
650
  out_line_no,
650
651
  Cryptum::UI.col_center(str: tot_header_str)
@@ -114,7 +114,7 @@ module Cryptum
114
114
  details_ln3 = "- Executed Value: $#{executed_value} | Market Type: #{market_type} | Settled: #{settled}"
115
115
 
116
116
  # UI
117
- col_just1 = (Curses.cols - Cryptum::UI.col_first) - 1
117
+ col_just1 = (Curses.cols - Cryptum::UI.col_first)
118
118
 
119
119
  # ROW 1
120
120
  out_line_no = 0
@@ -238,6 +238,14 @@ module Cryptum
238
238
  string: details_ln3.ljust(col_just1, ' ')
239
239
  )
240
240
 
241
+ # ROW 10
242
+ out_line_no += 1
243
+ Cryptum::UI.line(
244
+ ui_win: order_execute_details_win,
245
+ out_line_no: out_line_no,
246
+ color: line_color
247
+ )
248
+
241
249
  # Clear to OK ROW
242
250
  ok_row = 10
243
251
  out_line_no += 1
@@ -53,11 +53,10 @@ module Cryptum
53
53
  slice_alloc_ln2_details = " slice of $#{previous_slice_invest_out} results in $#{invest_out} being allocated for this slice."
54
54
  end
55
55
  profit_ln1_details = "3. With a slice allocation of $#{invest_out}, plus a TPM equal to #{tpm_out}%, $#{return_out} will be returned"
56
- profit_ln2_details = " once sold. With $#{invest_out} invested, the gross profit equals $#{profit_out}, minus any Maker &"
57
- profit_ln3_details = ' Taker (transaction) fees.'
56
+ profit_ln2_details = " once sold. With $#{invest_out} invested, the gross profit equals $#{profit_out}, minus any fess."
58
57
 
59
58
  # UI
60
- col_just1 = (Curses.cols - Cryptum::UI.col_first) - 1
59
+ col_just1 = (Curses.cols - Cryptum::UI.col_first)
61
60
 
62
61
  # ROW 1
63
62
  out_line_no = 0
@@ -171,14 +170,10 @@ module Cryptum
171
170
 
172
171
  # ROW 9
173
172
  out_line_no += 1
174
- order_plan_details_win.setpos(out_line_no, Cryptum::UI.col_first)
175
- order_plan_details_win.clrtoeol
176
-
177
- Cryptum::UI.colorize(
173
+ Cryptum::UI.line(
178
174
  ui_win: order_plan_details_win,
179
- color: order_color,
180
- style: style,
181
- string: profit_ln3_details.ljust(col_just1, ' ')
175
+ out_line_no: out_line_no,
176
+ color: line_color
182
177
  )
183
178
 
184
179
  # Clear to OK ROW
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.457'
4
+ VERSION = '0.0.459'
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.457
4
+ version: 0.0.459
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.