cryptum 0.0.398 → 0.0.399

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf83992e0e95b37febd02252408c8737787b96c391c29c8ba884a576e78930d3
4
- data.tar.gz: 919eb5b669e93ce91ccded4adc5dfd73e8821be72b73c66b2bfe8f846034cd28
3
+ metadata.gz: f571b7426e0de56f7674b3735c661cf48516c4b0b90079c68e0282e67a10c0e2
4
+ data.tar.gz: 6a2ae463a62d3f5422031af86133d71d55b046c9e5f1408c40fe7daaa31c2d71
5
5
  SHA512:
6
- metadata.gz: 2b6c1423945dd56b5dd1138be8d59ab41fa2296d936d5811537c86ac92f694c1c63d3683fe09ca630e2d0bb67b3bf48cad2d39b425f811c310a9a4fd3496b542
7
- data.tar.gz: 60f3a01446ed7a1cc973f1c99776af09c61b18b026fbf5c30b357af2e3359737a0e2acdb024266b0105a143cd6ead9235e6eeadd23674113ee34904ac4f1f3ff
6
+ metadata.gz: c9c95206532fc6b6cd7f8ff1f0f76433999e51bad199f040d837fb99313d16d36534cdd6cde3f4b55eaaa909caf0e0ddb0ac829a6ff03ebc00ce79ea6ad02df6
7
+ data.tar.gz: 6ed967babd35a1fe97703aadc70a0262c5c780f04d719ac44d299fc08abdaa27b705d522d8526e80d3b4e30343c72e5c5d9d7e2e2e38fa978da75d6b51cf25bf
@@ -159,7 +159,7 @@ module Cryptum
159
159
  crypto_smallest_decimal = base_increment.to_s.split('.')[-1].length
160
160
  fiat_smallest_decimal = quote_increment.to_s.split('.')[-1].length
161
161
 
162
- # TODO: Calculate / Price / Size
162
+ # Calculate / Price / Size
163
163
  last_three_prices_arr = []
164
164
  last_ticker_price = event_history.order_book[:ticker_price].to_f
165
165
  second_to_last_ticker_price = event_history.order_book[:ticker_price_second_to_last].to_f
data/lib/cryptum/log.rb CHANGED
@@ -61,7 +61,7 @@ module Cryptum
61
61
  logger.level = Logger::WARN
62
62
  exit_gracefully = true
63
63
  else
64
- log_event += "=> #{msg}"
64
+ log_event += " => #{msg}"
65
65
  end
66
66
 
67
67
  logger.add(logger.level, log_event, which_self)
@@ -225,8 +225,6 @@ module Cryptum
225
225
 
226
226
  meta[:done_at] = Time.now.strftime('%Y-%m-%d %H:%M:%S.%N%z')
227
227
 
228
- # TODO: Retry sell order if the original sell order expires.
229
-
230
228
  # Reinitiate GTFO if the previous GTFO Order Expires.
231
229
  terminal_win.key_press_event.key_g = true if meta[:color] == :magenta
232
230
  meta[:color] = :white
@@ -104,7 +104,6 @@ module Cryptum
104
104
  risk_target = fiat_budget * autotrade_cast_as_decimal
105
105
  risk_alloc = risk_target
106
106
 
107
- # TODO: Order Plan <= event_history.max_open_sell_orders
108
107
  previous_slice_fiat_investing = 0.00
109
108
  last_slice_detected = false
110
109
  loop do
@@ -64,9 +64,6 @@ module Cryptum
64
64
  color = indicator_status.market_trend[:color] if indicator_status.market_trend
65
65
  case color
66
66
  when :green
67
- # TODO: add condition to check if open sell orders exist.
68
- # If so intent should be something like, "- SEE ORDER HISTORY -"
69
- # Otherwise, intent should be something like, "- WAIT FOR MARKET TREND SHIFT -"
70
67
  intent = "- #{Cryptum.down_arrow} SEE ORDER HISTORY #{Cryptum.down_arrow} -"
71
68
  else
72
69
  speed = 'FAST'
@@ -83,9 +83,6 @@ module Cryptum
83
83
  value: volume_30d
84
84
  )
85
85
 
86
- # TODO: Potential for RACE CONDITIONS - MIGRATE TO
87
- # Cryptum::Event.parse
88
- # Indicate if 24 Hour High is Reached During Sesssion
89
86
  high_24h = format(
90
87
  "%0.#{fiat_smallest_decimal}f",
91
88
  event[:high_24h]
data/lib/cryptum/ui.rb CHANGED
@@ -249,12 +249,9 @@ module Cryptum
249
249
  key_press = ui_win.get_char
250
250
 
251
251
  # Useful for detecting and logging actual key presses to file
252
- # unless key_press.nil?
253
- # File.open('/tmp/detect_key_press_in_ui-cryptum.txt', 'a') do |f|
254
- # f.puts key_press.class
255
- # f.print key_press.inspect
256
- # f.puts "\n\n\n"
257
- # end
252
+ # if key_press
253
+ # debug_keys = "#{key_press.class} => key_press.inspect\n\n\n"
254
+ # Cryptum::Log.append(level: :debug, msg: debug_keys, which_self: self)
258
255
  # end
259
256
 
260
257
  case key_press
@@ -278,6 +275,7 @@ module Cryptum
278
275
  key_press_event.key_tab = true
279
276
  end
280
277
 
278
+ # TODO: Fix this - sometimes this results in unintended behavior.
281
279
  # What a hack to detect special keys (-.-)
282
280
  if key_press_event.key_esc
283
281
  key_press_event.key_ansi = true if key_press == '['
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.398'
4
+ VERSION = '0.0.399'
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.398
4
+ version: 0.0.399
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.