cryptum 0.0.330 → 0.0.331

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: d3a2741d859d2027bad2166baa33bf51cf3110e1926378dcd1a3280a95fd4a97
4
- data.tar.gz: e611c452d7016a663b098f24ebfc66d163649cf6c8968362aa71b39a0700486d
3
+ metadata.gz: 2bc7b6990410f2f5c42f379118c90b162834aed78d4a67c14eb26fa043caa71e
4
+ data.tar.gz: 2295d95f989f1e843424637e61cdf859c2f95caa71a3bd14d1bcf5956d76a74e
5
5
  SHA512:
6
- metadata.gz: 116600bd6e3e8ed4f4f6da284cc1e29d8b55a891d64aaa47a7e9fed1e32343ae6aa2b99f2badee7e32b06e6117ee5b8201312ddaaeaf300f97f88042cfdfeef0
7
- data.tar.gz: 93ae969032e900b3acfad8964f11c5dde7694e83ae692fc699822e844b3101eada07386f0dd8453ee7580ccd84de3d9fdb34d2a7749d41e802a65406578373f6
6
+ metadata.gz: a916eae1f779fb87d360c28385041f9ab3f5078eacecdb48640a8544047591804a66ebab65c62e98c12ba2f845fc67212dd464e0efe4dde17df5b72d5b4cdff7
7
+ data.tar.gz: b3109886785fd6847ec477c5bcadaf1c8d63d8bd238178476f06ef20d6aec79ae2f5668886b4f251d4b1bf4560d403fd8d81ed75cc6f706b12e5ade538e5cbef
data/lib/cryptum/event.rb CHANGED
@@ -18,19 +18,6 @@ module Cryptum
18
18
  require 'cryptum/event/scroll'
19
19
  require 'cryptum/event/sell'
20
20
 
21
- # autoload :BotConf, 'cryptum/event/bot_conf'
22
- # autoload :Buy, 'cryptum/event/buy'
23
- # autoload :Cancel, 'cryptum/event/cancel'
24
- # autoload :Exit, 'cryptum/event/exit'
25
- # autoload :GTFO, 'cryptum/event/gtfo'
26
- # autoload :History, 'cryptum/event/history'
27
- # autoload :KeyPress, 'cryptum/event/key_press'
28
- # autoload :OrderBook, 'cryptum/event/order_book'
29
- # autoload :Pane, 'cryptum/event/pane'
30
- # autoload :Parse, 'cryptum/event/parse'
31
- # autoload :Scroll, 'cryptum/event/scroll'
32
- # autoload :Sell, 'cryptum/event/sell'
33
-
34
21
  # Display Usage for this Module
35
22
 
36
23
  public_class_method def self.help
@@ -8,7 +8,6 @@ module Cryptum
8
8
  # Cryptum Curses Interface
9
9
  module Option
10
10
  require 'cryptum/option/choice'
11
- # autoload :Choice, 'cryptum/option/choice'
12
11
 
13
12
  # Options for cryptum Driver
14
13
  public_class_method def self.parser(opts = {})
@@ -11,11 +11,6 @@ module Cryptum
11
11
  require 'cryptum/order_book/market_trend'
12
12
  require 'cryptum/order_book/profit_margin'
13
13
 
14
- # autoload :Generate, 'cryptum/order_book/generate'
15
- # autoload :Indicator, 'cryptum/order_book/indicator'
16
- # autoload :MarketTrend, 'cryptum/order_book/market_trend'
17
- # autoload :ProfitMargin, 'cryptum/order_book/profit_margin'
18
-
19
14
  # Display Usage for this Module
20
15
  public_class_method def self.help
21
16
  constants.sort
@@ -6,7 +6,6 @@ module Cryptum
6
6
  # This plugin is used to instantiate a Cryptum logger with a custom message format
7
7
  module Portfolio
8
8
  require 'cryptum/portfolio/balance'
9
- # autoload :Balance, 'cryptum/portfolio/balance'
10
9
 
11
10
  # Display Usage for this Module
12
11
  public_class_method def self.help
@@ -485,17 +485,20 @@ module Cryptum
485
485
  # Clear to SUMMARY
486
486
  # (Only Applicable if order_book[:order_history_meta] < max_rows_to_display)
487
487
  # out_line_no += 1
488
- rows_to_blank = out_line_no + remaining_blank_rows - 1
489
- (out_line_no..rows_to_blank).each do |clr_line|
490
- out_line_no = clr_line
491
- order_execute_win.setpos(clr_line, Cryptum::UI.col_first)
492
- order_execute_win.clrtoeol
493
- Cryptum::UI.colorize(
494
- ui_win: order_execute_win,
495
- color: :white,
496
- style: :normal,
497
- string: ''.ljust(col_just1, ' ')
498
- )
488
+ if remaining_blank_rows.positive?
489
+ rows_to_blank = out_line_no + remaining_blank_rows
490
+ out_line_no += 1
491
+ (out_line_no..rows_to_blank).each do |clr_line|
492
+ out_line_no = clr_line
493
+ order_execute_win.setpos(clr_line, Cryptum::UI.col_first)
494
+ order_execute_win.clrtoeol
495
+ Cryptum::UI.colorize(
496
+ ui_win: order_execute_win,
497
+ color: :white,
498
+ style: :normal,
499
+ string: ''.ljust(col_just1, ' ')
500
+ )
501
+ end
499
502
  end
500
503
 
501
504
  # ROW 10
@@ -174,7 +174,7 @@ module Cryptum
174
174
 
175
175
  if event_history.red_pill
176
176
  order_plan_prefix = '--'
177
- max_order_plan_slices = '0'
177
+ # max_order_plan_slices = '0'
178
178
  order_plan_volume_out = '0.00'
179
179
  order_plan_profit_sum_out = '0.00'
180
180
  order_plan_exec_percent = '0.00'
@@ -353,7 +353,6 @@ module Cryptum
353
353
  first_row = last_row - event_history.order_plan_max_records_available_to_display
354
354
  event_history.order_plan_index_offset = first_row
355
355
  remaining_blank_rows = max_rows_to_display - last_row
356
- remaining_blank_rows = max_rows_to_display - last_row - 1 if last_row < max_rows_to_display
357
356
  end
358
357
 
359
358
  selected_order = event_history.order_plan_selected_data
@@ -421,29 +420,32 @@ module Cryptum
421
420
  end
422
421
  event_history.order_plan_selected_data = selected_order
423
422
 
424
- if order_plan.length < 9
425
- lines_to_clear = 9 - order_plan.length
426
- (1..lines_to_clear).each do |_line|
427
- out_line_no += 1
428
- order_plan_win.setpos(out_line_no, Cryptum::UI.col_first)
429
- order_plan_win.clrtoeol
430
- end
431
- end
423
+ # if order_plan.length < 9
424
+ # lines_to_clear = 9 - order_plan.length
425
+ # (1..lines_to_clear).each do |_line|
426
+ # out_line_no += 1
427
+ # order_plan_win.setpos(out_line_no, Cryptum::UI.col_first)
428
+ # order_plan_win.clrtoeol
429
+ # end
430
+ # end
432
431
 
433
432
  # Clear to SUMMARY
434
433
  # (Only Applicable if order_book[:order_plan] < max_rows_to_display)
435
434
  # out_line_no += 1
436
- rows_to_blank = (out_line_no + remaining_blank_rows) - 1
437
- (out_line_no..rows_to_blank).each do |clr_line|
438
- out_line_no = clr_line
439
- order_plan_win.setpos(clr_line, Cryptum::UI.col_first)
440
- order_plan_win.clrtoeol
441
- Cryptum::UI.colorize(
442
- ui_win: order_plan_win,
443
- color: :white,
444
- style: :normal,
445
- string: ''.ljust(col_just1, ' ')
446
- )
435
+ if remaining_blank_rows.positive?
436
+ rows_to_blank = (out_line_no + remaining_blank_rows)
437
+ out_line_no += 1
438
+ (out_line_no..rows_to_blank).each do |clr_line|
439
+ out_line_no = clr_line
440
+ order_plan_win.setpos(clr_line, Cryptum::UI.col_first)
441
+ order_plan_win.clrtoeol
442
+ Cryptum::UI.colorize(
443
+ ui_win: order_plan_win,
444
+ color: :white,
445
+ style: :normal,
446
+ string: ''.ljust(col_just1, ' ')
447
+ )
448
+ end
447
449
  end
448
450
 
449
451
  # ROW 10
@@ -457,7 +459,7 @@ module Cryptum
457
459
  string: ''.ljust(col_just1, ' ')
458
460
  )
459
461
 
460
- header_str = "CYCLE SUMMARY | Slices: #{max_order_plan_slices} | Risk Allocated: $#{order_plan_volume_out} | Profit: $#{order_plan_profit_sum_out} | #{order_plan_exec_percent}% Done"
462
+ header_str = "CYCLE SUMMARY | Risk Allocated: $#{order_plan_volume_out} | Profit: $#{order_plan_profit_sum_out} | #{order_plan_exec_percent}% Done"
461
463
  order_plan_win.setpos(
462
464
  out_line_no,
463
465
  Cryptum::UI.col_center(str: header_str)
data/lib/cryptum/ui.rb CHANGED
@@ -20,19 +20,6 @@ module Cryptum
20
20
  require 'cryptum/ui/order_execute_details'
21
21
  require 'cryptum/ui/command'
22
22
 
23
- # autoload :KeyPressEvent, 'cryptum/ui/key_press_event'
24
- # autoload :TerminalWindow, 'cryptum/ui/terminal_window'
25
- # autoload :Ticker, 'cryptum/ui/ticker'
26
- # autoload :Portfolio, 'cryptum/ui/portfolio'
27
- # autoload :OrderPlan, 'cryptum/ui/order_plan'
28
- # autoload :OrderPlanDetails, 'cryptum/ui/order_plan_details'
29
- # autoload :OrderTimer, 'cryptum/ui/order_timer'
30
- # autoload :MarketTrend, 'cryptum/ui/market_trend'
31
- # autoload :SignalEngine, 'cryptum/ui/signal_engine'
32
- # autoload :OrderExecution, 'cryptum/ui/order_execution'
33
- # autoload :OrderExecuteDetails, 'cryptum/ui/order_execute_details'
34
- # autoload :Command, 'cryptum/ui/command'
35
-
36
23
  # Initialize the UI
37
24
  public_class_method def self.init
38
25
  # Initialize curses Screen
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.330'
4
+ VERSION = '0.0.331'
5
5
  end
@@ -7,9 +7,6 @@ module Cryptum
7
7
  require 'cryptum/web_sock/coinbase'
8
8
  require 'cryptum/web_sock/event_machine'
9
9
 
10
- # autoload :Coinbase, 'cryptum/web_sock/coinbase'
11
- # autoload :EventMachine, 'cryptum/web_sock/event_machine'
12
-
13
10
  # Display Usage for this Module
14
11
 
15
12
  public_class_method def self.help
data/lib/cryptum.rb CHANGED
@@ -22,19 +22,6 @@ module Cryptum
22
22
  require 'cryptum/version'
23
23
  require 'cryptum/web_sock'
24
24
 
25
- # autoload :API, 'cryptum/api'
26
- # autoload :BotConf, 'cryptum/bot_conf'
27
- # autoload :Event, 'cryptum/event'
28
- # autoload :Indicator, 'cryptum/indicator'
29
- # autoload :Log, 'cryptum/log'
30
- # autoload :Matrix, 'cryptum/matrix'
31
- # autoload :Option, 'cryptum/option'
32
- # autoload :OrderBook, 'cryptum/order_book'
33
- # autoload :Portfolio, 'cryptum/portfolio'
34
- # autoload :ProbabilityEngine, 'cryptum/probability_engine'
35
- # autoload :UI, 'cryptum/ui'
36
- # autoload :WebSock, 'cryptum/web_sock'
37
-
38
25
  public_class_method def self.bin
39
26
  File.join root, 'bin'
40
27
  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.330
4
+ version: 0.0.331
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.