cryptum 0.0.323 → 0.0.324

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: e522f21a65cef1a50c40d23d8a8414bb497a0205e0bf146e74d9179c56a81ef0
4
- data.tar.gz: 02a029b2056b507ce6d9aca8538a6697e7d12208b0f7d66fc35babdb9ea27cc3
3
+ metadata.gz: c774da7badbde7fb89a23ba8a814b0768da0dcf1dd228d55d2374468ee34d4fd
4
+ data.tar.gz: ec3b10b645e5ba30218bff23422c2f5865c348c07f6750c8e70e5d3530051add
5
5
  SHA512:
6
- metadata.gz: f3973aa9521539f46d831cc0677dce3684b76c5012670c0ea68b0348f1fd4729a823883f275d6ce35a241584c2d2704169c97b3eb87737c47bf5393a0a842343
7
- data.tar.gz: c82fc92fa7f30b95220d032ebf5c64f1b475711cd94d5d2341eec49636576ef4e187ed231cd9a30e93cdd1adf5b5ec30ff111839c07cba481d0f687ae7f111a1
6
+ metadata.gz: 667ce8246ffef0626d6f9a791baf6043a400bfb797c2d1769260426528d8b06eff638dbeffdbfe89961b8e3bbd20fa1e9643d3676aa65fe2f1e8b1f627927a6d
7
+ data.tar.gz: 4eb2a28dec69b4c57d2c9c44211e1b599ef4bf7e9e955243ae55c59ab204cd916243808df1e2242e95a9c6b433b9045d99f4776817ed6bf1dae33a94dc6498f8
@@ -77,6 +77,12 @@ module Cryptum
77
77
  self.recalculate_order_plan = false
78
78
  self.start_time = start_time
79
79
 
80
+ # -------------------------------------------------- #
81
+ # SAUCE 4
82
+ # TODO: develop algorithm to calculate
83
+ # FAST BUY && SLOW BUY values taking
84
+ # market_trend_reset values into account
85
+
80
86
  # FAST BUY = 10 minutes
81
87
  self.time_between_orders = 600
82
88
  self.time_between_orders_reset = time_between_orders
@@ -86,6 +92,7 @@ module Cryptum
86
92
 
87
93
  # 5 seconds
88
94
  self.time_between_orders_min = 5
95
+ # -------------------------------------------------- #
89
96
  end
90
97
  rescue Interrupt
91
98
  # Exit Gracefully if CTRL+C is Pressed During Session
@@ -148,7 +148,6 @@ module Cryptum
148
148
  option_choice = opts[:option_choice]
149
149
  env = opts[:env]
150
150
 
151
- puts `#{option_choice.driver_name} --help`
152
151
  puts "\n#{option_choice.driver_name} Supports the Following Products:"
153
152
  products = Cryptum::API.get_products(
154
153
  option_choice: option_choice,
@@ -72,7 +72,7 @@ module Cryptum
72
72
  ui_win: order_timer_win,
73
73
  color: :white,
74
74
  style: :bold,
75
- string: "#{option_choice.market_trend_reset_label} Market Trend Reset: #{trend_countdown}"
75
+ string: "#{option_choice.market_trend_reset_label} M. Trend Rst: #{trend_countdown}"
76
76
  )
77
77
 
78
78
  # COLUMN 2
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.323'
4
+ VERSION = '0.0.324'
5
5
  end
@@ -216,7 +216,13 @@ module Cryptum
216
216
  end
217
217
 
218
218
  EM.add_periodic_timer(option_choice.market_trend_reset) do
219
- Cryptum::OrderBook::MarketTrend.reset(event_history: event_history)
219
+ # NOTE: To ensure the integrity of event_history is maintained,
220
+ # changes to its contenta _MUST_ stay in thos block.
221
+ event_history.order_book[:market_trend][:buy] = 0
222
+ event_history.order_book[:market_trend][:sell] = 0
223
+ event_history.order_book[:last_trend_reset] = Time.now.strftime(
224
+ '%Y-%m-%d %H:%M:%S.%N%z'
225
+ )
220
226
 
221
227
  # Reload Bot Conf (i.e. Risk Allocation)
222
228
  # Recalculate Order Plan, and Write to File
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.323
4
+ version: 0.0.324
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-13 00:00:00.000000000 Z
11
+ date: 2022-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable