cryptum 0.0.396 → 0.0.398

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +9 -17
  3. data/.rubocop_todo.yml +0 -22
  4. data/Gemfile +1 -1
  5. data/lib/cryptum/api/orders.rb +2 -1
  6. data/lib/cryptum/event/bot_conf.rb +2 -1
  7. data/lib/cryptum/event/buy.rb +2 -3
  8. data/lib/cryptum/event/cancel.rb +2 -1
  9. data/lib/cryptum/event/exit.rb +2 -1
  10. data/lib/cryptum/event/gtfo.rb +2 -1
  11. data/lib/cryptum/event/history.rb +2 -2
  12. data/lib/cryptum/event/key_press.rb +2 -1
  13. data/lib/cryptum/event/order_book.rb +3 -2
  14. data/lib/cryptum/event/pane.rb +7 -12
  15. data/lib/cryptum/event/parse.rb +2 -1
  16. data/lib/cryptum/event/scroll.rb +3 -3
  17. data/lib/cryptum/event/sell.rb +2 -3
  18. data/lib/cryptum/log.rb +5 -1
  19. data/lib/cryptum/order_book/generate.rb +2 -1
  20. data/lib/cryptum/order_book/indicator.rb +2 -3
  21. data/lib/cryptum/order_book/market_trend.rb +2 -2
  22. data/lib/cryptum/order_book/profit_margin.rb +5 -5
  23. data/lib/cryptum/portfolio/balance.rb +1 -0
  24. data/lib/cryptum/ui/command.rb +3 -1
  25. data/lib/cryptum/ui/exit.rb +12 -2
  26. data/lib/cryptum/ui/key_press_event.rb +2 -0
  27. data/lib/cryptum/ui/market_trend.rb +3 -2
  28. data/lib/cryptum/ui/matrix.rb +2 -1
  29. data/lib/cryptum/ui/order/execute.rb +4 -1
  30. data/lib/cryptum/ui/order/execute_details.rb +23 -21
  31. data/lib/cryptum/ui/order/plan.rb +4 -1
  32. data/lib/cryptum/ui/order/plan_details.rb +4 -2
  33. data/lib/cryptum/ui/order/timer.rb +4 -1
  34. data/lib/cryptum/ui/order.rb +1 -0
  35. data/lib/cryptum/ui/portfolio.rb +3 -1
  36. data/lib/cryptum/ui/signal_engine.rb +3 -1
  37. data/lib/cryptum/ui/terminal_window.rb +2 -0
  38. data/lib/cryptum/ui/ticker.rb +3 -1
  39. data/lib/cryptum/ui.rb +5 -1
  40. data/lib/cryptum/version.rb +1 -1
  41. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a21ea8b0f9da95a25846e0e0a094a2b2c086913d326630302c921cb7d72c2bac
4
- data.tar.gz: 908dafab6273bc68045a98e351cfee9f2ce8972086e7d76f5d04a3e00f9dd967
3
+ metadata.gz: bf83992e0e95b37febd02252408c8737787b96c391c29c8ba884a576e78930d3
4
+ data.tar.gz: 919eb5b669e93ce91ccded4adc5dfd73e8821be72b73c66b2bfe8f846034cd28
5
5
  SHA512:
6
- metadata.gz: 79fd6205efdcd1b3ad7110ec0fc8f91ebb97d0d4d1ca141b64c1d43897bed17d09b4a72211e3d8fe0e4a3d894c24a2871c6a295423d79545a2b616f42e4e36a9
7
- data.tar.gz: 72976317bcc3a5f9f5a338aedc3490fb6d743cd74f873d4818a277cdd83cc16dbb5847ba427e199307eb052cd3b94199dc036896e6a86b2e159b47fb932af120
6
+ metadata.gz: 2b6c1423945dd56b5dd1138be8d59ab41fa2296d936d5811537c86ac92f694c1c63d3683fe09ca630e2d0bb67b3bf48cad2d39b425f811c310a9a4fd3496b542
7
+ data.tar.gz: 60f3a01446ed7a1cc973f1c99776af09c61b18b026fbf5c30b357af2e3359737a0e2acdb024266b0105a143cd6ead9235e6eeadd23674113ee34904ac4f1f3ff
data/.rubocop.yml CHANGED
@@ -1,35 +1,27 @@
1
1
  AllCops:
2
2
  UseCache: false
3
3
  NewCops: enable
4
- Layout:
5
- Max: 3000
6
4
  Layout/LineLength:
7
- Max: 256
5
+ Max: 250
8
6
  Lint/UselessRescue:
9
7
  Enabled: false
10
8
  Metrics/AbcSize:
11
- Max: 512
9
+ Max: 393
12
10
  Metrics/BlockLength:
13
- Max: 256
11
+ Max: 138
14
12
  Metrics/BlockNesting:
15
- Max: 4
13
+ Max: 3
16
14
  Metrics/ClassLength:
17
- Max: 512
18
- Metrics/CyclomaticComplexity:
19
15
  Max: 128
16
+ Metrics/CyclomaticComplexity:
17
+ Max: 75
20
18
  Metrics/MethodLength:
21
- Max: 512
19
+ Max: 397
22
20
  Metrics/ModuleLength:
23
- Max: 1024
21
+ Max: 407
24
22
  Metrics/PerceivedComplexity:
25
- Max: 128
26
- Style/HashEachMethods:
27
- Enabled: true
23
+ Max: 75
28
24
  Style/HashSyntax:
29
25
  EnforcedShorthandSyntax: never
30
- Style/HashTransformKeys:
31
- Enabled: true
32
- Style/HashTransformValues:
33
- Enabled: true
34
26
 
35
27
  inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml CHANGED
@@ -1,22 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2023-04-03 22:26:52 UTC using RuboCop version 1.49.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 5
10
- # This cop supports safe autocorrection (--autocorrect).
11
- # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
12
- # SupportedStyles: assign_to_condition, assign_inside_condition
13
- Style/ConditionalAssignment:
14
- Exclude:
15
- - 'lib/cryptum/event/pane.rb'
16
- - 'lib/cryptum/log.rb'
17
- - 'lib/cryptum/ui/order/execute_details.rb'
18
-
19
- # Offense count: 28
20
- # Configuration parameters: AllowedConstants.
21
- Style/Documentation:
22
- Enabled: false
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ gem 'bundler', '>=2.4.10'
16
16
  gem 'bundler-audit', '0.9.1'
17
17
  gem 'curses', '1.4.4'
18
18
  gem 'eventmachine', '1.2.7'
19
- gem 'faye-websocket', '0.11.1'
19
+ gem 'faye-websocket', '0.11.2'
20
20
  gem 'permessage_deflate', '0.1.4'
21
21
  gem 'pry', '0.14.2'
22
22
  gem 'pry-doc', '1.4.0'
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to interact withbtje Coinbase REST API
4
+ # Cryptum::API Namespace
5
5
  module API
6
+ # This Module is used to interact with the Order APIs
6
7
  module Orders
7
8
  public_class_method def self.submit_limit(opts = {})
8
9
  option_choice = opts[:option_choice]
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Reload the Bot Conf When the "r" Key is Pressed
4
+ # Cryptum::Event Namespace
5
5
  module Event
6
+ # This Module is used to Reload the Bot Conf When the "r" Key is Pressed
6
7
  module BotConf
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::Event::BotConf.reload(
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Submit a Limit Order
5
- # to Buy Crypto Currency
6
-
4
+ # Cryptum::Event Namespace
7
5
  module Event
6
+ # This Module is used to Submit Limit Buy Orders
8
7
  module Buy
9
8
  # Supported Method Parameters::
10
9
  # Cryptum::Event::Buy.crypto(
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Reload the Bot Conf When the "C" Key is Pressed
4
+ # Cryptum::Event Namespace
5
5
  module Event
6
+ # This Module is used to Cancel Open Orders When the "C" Key is Pressed
6
7
  module Cancel
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::Event::Cancel.open_orders(
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Exit Cryptum Gracefully When the "x" Key is Pressed
4
+ # Cryptum::Event Namespace
5
5
  module Event
6
+ # This Module is used to Exit Cryptum Gracefully When the "x" Key is Pressed
6
7
  module Exit
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::Event::Exit.gracefully(
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Get the F* Out (GTFO) when the "G" Key is Pressed
4
+ # Cryptum::Event Namespace
5
5
  module Event
6
+ # This Modules is used to Get the F* Out (GTFO) when the "G" Key is Pressed
6
7
  module GTFO
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::Event::GTFO.now(
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Track Event History
4
+ # Cryptum::Event Namespace
5
5
  module Event
6
- # Keep Last Event History When Terminal Resize Occuers
6
+ # Class to Keep Track of Event History
7
7
  class History
8
8
  attr_accessor :bullish_trend,
9
9
  :event,
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Detect if any Keys were Pressed on the Keyboard
4
+ # Cryptum::Event Namespace
5
5
  module Event
6
+ # This Module is used to Detect when Keys are Pressed on the Keyboard
6
7
  module KeyPress
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::Event::KeyPress.detect(
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Write the Order Book from Memory
5
- # to File When the "w" Key is Pressed
4
+ # Cryptum::Event Namespace
6
5
  module Event
6
+ # This Module is used to Write the Order Book from Memory
7
+ # to File When the "w" Key is Pressed
7
8
  module OrderBook
8
9
  # Supported Method Parameters::
9
10
  # Cryptum::Event::OrderBook.write(
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Switch through Order Plan / Order History
5
- # Window Panes when the TAB Key is Pressed.
4
+ # Cryptum::Event Namespace
6
5
  module Event
6
+ # This Module is used to Switch through Order Plan / Order History
7
+ # Window Panes when the TAB Key is Pressed.
7
8
  module Pane
8
9
  # Supported Method Parameters::
9
10
  # Cryptum::Event::Pane.switch(
@@ -36,18 +37,12 @@ module Cryptum
36
37
 
37
38
  if event_history.order_plan_win_active
38
39
  unless event_history.red_pill
39
- if event_history.order_plan_details_win_active
40
- event_history.order_plan_details_win_active = false
41
- else
42
- event_history.order_plan_details_win_active = true
43
- end
40
+ event_history.order_plan_details_win_active = true
41
+ event_history.order_plan_details_win_active = false if event_history.order_plan_details_win_active
44
42
  end
45
43
  elsif event_history.order_execute_win_active
46
- if event_history.order_execute_details_win_active
47
- event_history.order_execute_details_win_active = false
48
- else
49
- event_history.order_execute_details_win_active = true
50
- end
44
+ event_history.order_execute_details_win_active = true
45
+ event_history.order_execute_details_win_active = false if event_history.order_execute_details_win_active
51
46
  end
52
47
  rescue Interrupt, StandardError => e
53
48
  Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history)
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to parse Coinbase Pro Web Socket Events in the HTTP Response
4
+ # Cryptum::Event Namespace
5
5
  module Event
6
+ # This Module is used to parse message received by the Web Socket
6
7
  module Parse
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::Event::Parse.websocket_msg(
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Scroll through Order Plan
5
- # Order Plan and Order History Window Panes
6
- # to File When the "w" Key is Pressed
4
+ # Cryptum::Event Namespace
7
5
  module Event
6
+ # This Module is used to Scroll through
7
+ # Order Plan and Order History Window Panes
8
8
  module Scroll
9
9
  # Supported Method Parameters::
10
10
  # Cryptum::Event::Scroll.up(
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Submit a Limit Order
5
- # to Sell Crypto Currency
6
-
4
+ # Crytpum::Event Namespace
7
5
  module Event
6
+ # This Module is used to Submit Limit Sell Orders
8
7
  module Sell
9
8
  # Supported Method Parameters::
10
9
  # Cryptum::Event::Sell.crypto(
data/lib/cryptum/log.rb CHANGED
@@ -51,7 +51,11 @@ module Cryptum
51
51
 
52
52
  logger.datetime_format = '%Y-%m-%d %H:%M:%S.%N'
53
53
  log_event = ''
54
- log_event = event_history.order_book[:path] if event_history.respond_to?('order_book')
54
+ if event_history.respond_to?('order_book')
55
+ log_event = "session: #{event_history.order_book[:path].split('/').first}, "
56
+ log_event += "symbol: #{event_history.order_book[:symbol]}"
57
+ end
58
+
55
59
  if msg.instance_of?(Interrupt)
56
60
  log_event += ' => CTRL+C Detected...Exiting Session.'
57
61
  logger.level = Logger::WARN
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This module is used to define the Order Book Data Structure
4
+ # Cryptum::OrderBook Namespace
5
5
  module OrderBook
6
+ # Load in Existing Order Book from File or Generate a New Order Book
6
7
  module Generate
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::OrderBook::Generate.new(
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to calculate Exponential Moving Average
5
- # Price of a Symbol over time.
6
-
4
+ # Cryptum::OrderBook Namespace
7
5
  module OrderBook
6
+ # This class is used to track market indicators to drive decision making.
8
7
  class Indicator
9
8
  attr_accessor :market_trend,
10
9
  :profit_margin,
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to indicate if the order trend
5
-
4
+ # Cryptum::OrderBook Namespace
6
5
  module OrderBook
6
+ # This Module is used for Market Trend Analysis
7
7
  module MarketTrend
8
8
  # Supported Method Parameters::
9
9
  # Cryptum::OrderBook::OrderTrend.status(
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to indicate if the
5
- # Projected Profit Margin is greater than
6
- # the Target Profit Margin Outlined in the
7
- # Respective Bot Conf
8
-
4
+ # Cryptum::OrderBook Namespace
9
5
  module OrderBook
6
+ # This module is used to indicate if the
7
+ # Projected Profit Margin is greater than
8
+ # the Target Profit Margin Outlined in the
9
+ # Respective Bot Conf
10
10
  module ProfitMargin
11
11
  # Supported Method Parameters::
12
12
  # Cryptum::OrderBook::ProfitMargin.status(
@@ -3,6 +3,7 @@
3
3
  module Cryptum
4
4
  # This plugin is used to instantiate a Cryptum logger with a custom message format
5
5
  module Portfolio
6
+ # Track Portfolio Balances
6
7
  module Balance
7
8
  # Supported Method Parameters::
8
9
  # Cryptum::Event::Update.summary(
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
4
6
  module UI
5
- # This plugin is used to Refresh the Cryptum Command Section UI
7
+ # Update the Cryptum Command Section UI
6
8
  module Command
7
9
  # Supported Method Parameters::
8
10
  # Cryptum::UI::Command.refresh(
@@ -1,14 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
4
6
  module UI
5
- # This Class is Used to Detect Key Press Events
7
+ # Gracefully Exit the UI and Attempt to Save event_history to Order Book Session File.
6
8
  module Exit
9
+ # Supported Method Parameters::
10
+ # Cryptum::UI::Exit.gracefully(
11
+ # event_history: 'optional - Pass in the event_history if available to save to order book'
12
+ # )
7
13
  public_class_method def self.gracefully(opts = {})
8
14
  event_history = opts[:event_history]
9
15
 
10
16
  Curses.close_screen
11
- msg = event_history.order_book[:path] if event_history.respond_to?('order_book')
17
+ msg = ''
18
+ if event_history.respond_to?('order_book')
19
+ msg = "session: #{event_history.order_book[:path].split('/').first}, "
20
+ msg += "symbol: #{event_history.order_book[:symbol]}"
21
+ end
12
22
  msg += ' => Session Gracefully Terminated.'
13
23
  Cryptum::Log.append(level: :info, msg: msg, which_self: self)
14
24
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
4
6
  module UI
5
7
  # This Class is Used to Detect Key Press Events
6
8
  class KeyPressEvent
@@ -1,15 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Refresh the Cryptum console UI
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
5
6
  module UI
7
+ # Update the Cryptum MarketTrend Section UI
6
8
  module MarketTrend
7
9
  # Supported Method Parameters::
8
10
  # Cryptum::UI::Candle.refresh(
9
11
  # order_book: 'required - Order Book Data Structure',
10
12
  # event: 'required - Event from Coinbase Web Socket'
11
13
  # )
12
-
13
14
  public_class_method def self.refresh(opts = {})
14
15
  market_trend_win = opts[:market_trend_win]
15
16
  event_history = opts[:event_history]
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Refresh the Cryptum console UI
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
5
6
  module UI
6
7
  # This plugin is used as a visual representation of being in a, "Red Pill" state
7
8
  module Matrix
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Refresh the Cryptum console UI
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
5
6
  module UI
7
+ # Cryptum::UI::Order Namespace
6
8
  module Order
9
+ # Update the Execute Section of the UI (When Active)
7
10
  module Execute
8
11
  # Supported Method Parameters::
9
12
  # Cryptum::UI::Order::Execute.refresh(
@@ -1,10 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
4
6
  module UI
5
- # This plugin is used to Display Order Execute Details
6
- # selected from the Order Execute Window Pane.
7
+ # Cryptum::UI::Order Namespace
7
8
  module Order
9
+ # Update the ExecuteDetails Section of the UI (When Active)
8
10
  module ExecuteDetails
9
11
  # Supported Method Parameters::
10
12
  # Cryptum::UI::Order::ExecuteDetails.refresh(
@@ -17,16 +19,16 @@ module Cryptum
17
19
  order_meta_data = event_history.order_execute_selected_data
18
20
 
19
21
  order_color = order_meta_data[:color].to_sym
20
- case order_color
21
- when :cyan, :red
22
- order_id = order_meta_data[:buy_order_id]
23
- when :green, :magenta, :yellow
24
- order_id = order_meta_data[:sell_order_id]
25
- when :white
26
- order_id = 'Expired'
27
- else
28
- order_id = 'N/A'
29
- end
22
+ order_id = case order_color
23
+ when :cyan, :red
24
+ order_meta_data[:buy_order_id]
25
+ when :green, :magenta, :yellow
26
+ order_meta_data[:sell_order_id]
27
+ when :white
28
+ 'Expired'
29
+ else
30
+ 'N/A'
31
+ end
30
32
 
31
33
  order_id_details = "- ID: #{order_id}"
32
34
 
@@ -77,15 +79,15 @@ module Cryptum
77
79
  order_status_ln = "- Status: #{order_status}"
78
80
  end
79
81
 
80
- if created_at && (!expire_time || !done_at)
81
- order_hist_created_finished_ln = "- Creation Date: #{created_at} | Finished Date: N/A"
82
- elsif created_at && expire_time && !done_at
83
- order_hist_created_finished_ln = "- Creation Date: #{created_at} | Expiring Date: #{expire_time}"
84
- elsif created_at && done_at
85
- order_hist_created_finished_ln = "- Creation Date: #{created_at} | Finished Date: #{done_at}"
86
- else
87
- order_hist_created_finished_ln = '- Creation Date: N/A | Finished Date: N/A'
88
- end
82
+ order_hist_created_finished_ln = if created_at && (!expire_time || !done_at)
83
+ "- Creation Date: #{created_at} | Finished Date: N/A"
84
+ elsif created_at && expire_time && !done_at
85
+ "- Creation Date: #{created_at} | Expiring Date: #{expire_time}"
86
+ elsif created_at && done_at
87
+ "- Creation Date: #{created_at} | Finished Date: #{done_at}"
88
+ else
89
+ '- Creation Date: N/A | Finished Date: N/A'
90
+ end
89
91
 
90
92
  invest_out = Cryptum.beautify_large_number(
91
93
  value: order_meta_data[:invest]
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Refresh the Cryptum console UI
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
5
6
  module UI
7
+ # Cryptum::UI::Order Namespace
6
8
  module Order
9
+ # Update the Plan Section of the UI (When Active)
7
10
  module Plan
8
11
  # Supported Method Parameters::
9
12
  # Cryptum::UI::Order::Plan.refresh(
@@ -1,10 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
4
6
  module UI
5
- # This plugin is used to Display Order Plan Details
6
- # selected from the Order Plan Window Pane.
7
+ # Cryptum::UI::Order Namespace
7
8
  module Order
9
+ # Update the PlanDetails Section of the UI (When Active)
8
10
  module PlanDetails
9
11
  # Supported Method Parameters::
10
12
  # Cryptum::UI::Order::PlanDetails.refresh(
@@ -1,9 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
4
6
  module UI
5
- # This plugin is used to Refresh the Cryptum Status Section UI
7
+ # Cryptum::UI::Order Namespace
6
8
  module Order
9
+ # Update the Timer Section of the UI
7
10
  module Timer
8
11
  # Supported Method Parameters::
9
12
  # Cryptum::UI::Timer.refresh(
@@ -4,6 +4,7 @@ module Cryptum
4
4
  # Cryptum::UI Module used for Presenting the
5
5
  # Cryptum Curses Interface
6
6
  module UI
7
+ # Include Modules Related to Order
7
8
  module Order
8
9
  require 'cryptum/ui/order/execute'
9
10
  require 'cryptum/ui/order/execute_details'
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Refresh the Cryptum console UI
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
5
6
  module UI
7
+ # Update the Portfolio Section of the UI
6
8
  module Portfolio
7
9
  # Supported Method Parameters::
8
10
  # Cryptum::UI::Candle.refresh(
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Refresh the Cryptum console UI
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
5
6
  module UI
7
+ # Update the SignalEngine Section of the UI
6
8
  module SignalEngine
7
9
  # Supported Method Parameters::
8
10
  # Cryptum::UI::Candle.refresh(
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
4
6
  module UI
5
7
  # This Class is Used by Cryptum::Event to
6
8
  # Detect when the Terminal Window is Resized
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- # This plugin is used to Refresh the Cryptum console UI
4
+ # Cryptum::UI Module used for Presenting the
5
+ # Cryptum Curses Interface
5
6
  module UI
7
+ # Update the Ticker section of the UI
6
8
  module Ticker
7
9
  public_class_method def self.refresh(opts = {})
8
10
  start_time = opts[:start_time]
data/lib/cryptum/ui.rb CHANGED
@@ -18,7 +18,11 @@ module Cryptum
18
18
  # Initialize the UI
19
19
  public_class_method def self.init(opts = {})
20
20
  event_history = opts[:event_history]
21
- msg = event_history.order_book[:path] if event_history.respond_to?('order_book')
21
+ msg = ''
22
+ if event_history.respond_to?('order_book')
23
+ msg = "session: #{event_history.order_book[:path].split('/').first}, "
24
+ msg += "symbol: #{event_history.order_book[:symbol]}"
25
+ end
22
26
  msg += ' => Session Started.'
23
27
  Cryptum::Log.append(level: :info, msg: msg, which_self: self)
24
28
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.396'
4
+ VERSION = '0.0.398'
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.396
4
+ version: 0.0.398
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.11.1
89
+ version: 0.11.2
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.11.1
96
+ version: 0.11.2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: permessage_deflate
99
99
  requirement: !ruby/object:Gem::Requirement