cryptum 0.0.324 → 0.0.325

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: c774da7badbde7fb89a23ba8a814b0768da0dcf1dd228d55d2374468ee34d4fd
4
- data.tar.gz: ec3b10b645e5ba30218bff23422c2f5865c348c07f6750c8e70e5d3530051add
3
+ metadata.gz: 10328af02cf519e0d0909c39eebeef68636167861ce9c29f853cf3226aa3fe5f
4
+ data.tar.gz: 8acc998468938e4b9b368ebb23dcfdbe50e1f2365095be73ba2b4f3b552e8ef9
5
5
  SHA512:
6
- metadata.gz: 667ce8246ffef0626d6f9a791baf6043a400bfb797c2d1769260426528d8b06eff638dbeffdbfe89961b8e3bbd20fa1e9643d3676aa65fe2f1e8b1f627927a6d
7
- data.tar.gz: 4eb2a28dec69b4c57d2c9c44211e1b599ef4bf7e9e955243ae55c59ab204cd916243808df1e2242e95a9c6b433b9045d99f4776817ed6bf1dae33a94dc6498f8
6
+ metadata.gz: 033467601d7fbfabb46747e51093f14c28320ad5cdb3fed2b35a5d75d0b576d7bb4d44de9b0239cba3a292b61fda8f99a1c1976e00225c46bae7cacfd677333f
7
+ data.tar.gz: bcaf51a3743fcabab91e43c539d558d9d281fbfc3e79bc1d7ff35b4ca46b44f754106e82f392ab27839f43915bdff1076c32ec0d2bdd18adb2db18c1acae93f4
@@ -62,57 +62,57 @@ module Cryptum
62
62
  raise e
63
63
  end
64
64
 
65
- public_class_method def self.reset(opts = {})
66
- # IT IS ABSOLUTELY CRITICAL THIS METHOD IS AS FAST AS POSSIBLE
67
- # TO AVOID TICKER PRICE SYNCING ISSUES.
68
- event_history = opts[:event_history]
69
-
70
- # order_history = event_history.order_book[:order_history]
71
- # order_history_meta = event_history.order_book[:order_history_meta]
72
-
73
- # Only retain past 24 hours of
74
- # order history meta for bought, sold, and expired
75
- # keep open limit sell orders indefintely
76
- # before_twenty_four_hrs_ago = Time.now - 86_400
77
- # order_history_meta.delete_if do |ohm|
78
- # order_history.find do |oh|
79
- # next unless oh[:done_at]
80
-
81
- # Time.parse(oh[:done_at]) < before_twenty_four_hrs_ago && (
82
- # oh[:id] == ohm[:buy_order_id] ||
83
- # oh[:id] == ohm[:sell_order_id]
84
- # ) && (
85
- # ohm[:color].to_sym == :white ||
86
- # ohm[:color].to_sym == :green ||
87
- # ohm[:color].to_sym == :cyan ||
88
- # ohm[:color].to_sym == :red
89
- # )
90
- # end
91
- # end
92
-
93
- # Only keep order history meta for those
94
- # hashes that exist in the last order history
95
- # response
96
- # order_history_meta.keep_if do |ohm|
97
- # order_history.find do |oh|
98
- # (oh[:id] == ohm[:buy_order_id] || oh[:id] == ohm[:sell_order_id]) && (
99
- # ohm[:color].to_sym == :white ||
100
- # ohm[:color].to_sym == :green ||
101
- # ohm[:color].to_sym == :yellow
102
- # )
103
- # end
104
- # end
105
- # event_history.order_book[:order_history_meta] = order_history_meta
106
-
107
- # Reset Market Trend Counter
108
- event_history.order_book[:market_trend][:buy] = 0
109
- event_history.order_book[:market_trend][:sell] = 0
110
- event_history.order_book[:last_trend_reset] = Time.now.strftime(
111
- '%Y-%m-%d %H:%M:%S.%N%z'
112
- )
113
- rescue StandardError => e
114
- raise e
115
- end
65
+ # public_class_method def self.reset(opts = {})
66
+ # # IT IS ABSOLUTELY CRITICAL THIS METHOD IS AS FAST AS POSSIBLE
67
+ # # TO AVOID TICKER PRICE SYNCING ISSUES.
68
+ # event_history = opts[:event_history]
69
+
70
+ # # order_history = event_history.order_book[:order_history]
71
+ # # order_history_meta = event_history.order_book[:order_history_meta]
72
+
73
+ # # Only retain past 24 hours of
74
+ # # order history meta for bought, sold, and expired
75
+ # # keep open limit sell orders indefintely
76
+ # # before_twenty_four_hrs_ago = Time.now - 86_400
77
+ # # order_history_meta.delete_if do |ohm|
78
+ # # order_history.find do |oh|
79
+ # # next unless oh[:done_at]
80
+
81
+ # # Time.parse(oh[:done_at]) < before_twenty_four_hrs_ago && (
82
+ # # oh[:id] == ohm[:buy_order_id] ||
83
+ # # oh[:id] == ohm[:sell_order_id]
84
+ # # ) && (
85
+ # # ohm[:color].to_sym == :white ||
86
+ # # ohm[:color].to_sym == :green ||
87
+ # # ohm[:color].to_sym == :cyan ||
88
+ # # ohm[:color].to_sym == :red
89
+ # # )
90
+ # # end
91
+ # # end
92
+
93
+ # # Only keep order history meta for those
94
+ # # hashes that exist in the last order history
95
+ # # response
96
+ # # order_history_meta.keep_if do |ohm|
97
+ # # order_history.find do |oh|
98
+ # # (oh[:id] == ohm[:buy_order_id] || oh[:id] == ohm[:sell_order_id]) && (
99
+ # # ohm[:color].to_sym == :white ||
100
+ # # ohm[:color].to_sym == :green ||
101
+ # # ohm[:color].to_sym == :yellow
102
+ # # )
103
+ # # end
104
+ # # end
105
+ # # event_history.order_book[:order_history_meta] = order_history_meta
106
+
107
+ # # Reset Market Trend Counter
108
+ # event_history.order_book[:market_trend][:buy] = 0
109
+ # event_history.order_book[:market_trend][:sell] = 0
110
+ # event_history.order_book[:last_trend_reset] = Time.now.strftime(
111
+ # '%Y-%m-%d %H:%M:%S.%N%z'
112
+ # )
113
+ # rescue StandardError => e
114
+ # raise e
115
+ # end
116
116
 
117
117
  # Display Usage for this Module
118
118
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.324'
4
+ VERSION = '0.0.325'
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.324
4
+ version: 0.0.325
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.