cryptum 0.0.462 → 0.0.464

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: b01792e111d040337fc5179dc59cc5b49dd4cdc693d2b7a4149e6e85d056316d
4
- data.tar.gz: c0d7ce82def2ead71b876bdd9a328b884519122b07c1ebe4ce80b7496070ae43
3
+ metadata.gz: a73360dc5d7f4c6a420e078a1dfa22a8ffdd14bce66f8ab5c341e373f0265c5d
4
+ data.tar.gz: a403cfe52a227bd4691729d4c0976c141ad64569c6057d72f0d6b61d56d21ae6
5
5
  SHA512:
6
- metadata.gz: d26e0469d6f9057456abf77c5dbdfce467ed08de0636ec4bc5fb16efb0f5c0405450c956f583cfc4e15ad2a34e5e963d7130cd0c165a2485e0b28ee02323ce37
7
- data.tar.gz: 75990e3327dd4710925d0e5146f51a1491fa0a2d4783e0d41b00c724d47c9d7f45db65896da079dc9b9223c8255a05fa77c0f5da56a648f6ff5654fa278e8a37
6
+ metadata.gz: 9eeaf361bcddb2ccec7a487ac65c6dbeced78ad2f9087f1d5938fd8722919cf911c50ca81a5a925a10d7d518607af863a97d7c2eab6d0e5f326b4a16b619e967
7
+ data.tar.gz: b8f3e154d3e41e6b30503ca0b949a7451434ad9b3fb81981e69b0d25fe74835ad0d4b5339f279d778b2605ecb67de94670760605a5ebd2df6ebcdcc74fe87d02
data/Gemfile CHANGED
@@ -12,7 +12,7 @@ gemspec
12
12
  # to build appropriately. Defer to ./reinstall_coinbot_gemset.sh
13
13
  # to review these custom flags
14
14
  gem 'addressable', '2.8.4'
15
- gem 'bundler', '>=2.4.17'
15
+ gem 'bundler', '>=2.4.18'
16
16
  gem 'bundler-audit', '0.9.1'
17
17
  gem 'curses', '1.4.4'
18
18
  gem 'eventmachine', '1.2.7'
@@ -27,9 +27,9 @@ gem 'rdoc', '6.5.0'
27
27
  gem 'require_all', '3.0.0'
28
28
  gem 'rest-client', '2.1.0'
29
29
  gem 'rspec', '3.12.0'
30
- gem 'rubocop', '1.55.0'
30
+ gem 'rubocop', '1.55.1'
31
31
  gem 'rubocop-rake', '0.6.0'
32
- gem 'rubocop-rspec', '2.22.0'
32
+ gem 'rubocop-rspec', '2.23.0'
33
33
  gem 'ruby-prof', '1.6.3'
34
34
  gem 'rvm', '1.11.3.9'
35
35
  gem 'sinatra', '3.0.6'
@@ -180,8 +180,8 @@ module Cryptum
180
180
  event_reason == :canceled
181
181
 
182
182
  # Remove all white hashes from order_history_meta
183
- order_history_meta = order_history_meta.reject! do |ohm|
184
- ohm[:color] == :white
183
+ order_history_meta.reject! do |ohm|
184
+ ohm[:color].to_sym == :white
185
185
  end
186
186
 
187
187
  buy_order_id = event_history.event[:order_id]
@@ -226,7 +226,7 @@ module Cryptum
226
226
  end
227
227
  end
228
228
 
229
- # Update Canceled Sell Orders w/ Black &&
229
+ # Update Canceled Sell Orders w/ White &&
230
230
  # Include done_at Timestamp for 24h gain calc
231
231
  if event_type == :done &&
232
232
  event_side == :sell &&
@@ -245,14 +245,14 @@ module Cryptum
245
245
  end
246
246
 
247
247
  # Snag all orders bought YTD
248
- oh_buy_ytd_arr = order_history.select do |oh|
249
- oh[:side] == 'buy' &&
250
- oh.key?(:done_at) &&
251
- Time.now.strftime('%Y') == Time.parse(oh[:done_at]).strftime('%Y')
252
- end
253
- order_hist_buy_usd_tot = oh_buy_ytd_arr.map do |oh|
254
- oh[:executed_value].to_f
255
- end.sum
248
+ # oh_buy_ytd_arr = order_history.select do |oh|
249
+ # oh[:side] == 'buy' &&
250
+ # oh.key?(:done_at) &&
251
+ # Time.now.strftime('%Y') == Time.parse(oh[:done_at]).strftime('%Y')
252
+ # end
253
+ # order_hist_buy_usd_tot = oh_buy_ytd_arr.map do |oh|
254
+ # oh[:executed_value].to_f
255
+ # end.sum
256
256
 
257
257
  # Snag all orders sold YTD
258
258
  oh_sold_ytd_arr = order_history.select do |oh|
@@ -263,11 +263,11 @@ module Cryptum
263
263
  # TODO: ensure oh_buy_ytd_arr && oh_sold_ytd_arr are same length
264
264
  # otherwise it throws off the profit calculations
265
265
  order_hist_sold_ytd = oh_sold_ytd_arr.length
266
- order_hist_sold_usd_tot = oh_sold_ytd_arr.map do |oh|
267
- oh[:executed_value].to_f
268
- end.sum
269
- order_hist_profit_usd_ytd = order_hist_sold_usd_tot - order_hist_buy_usd_tot
270
- order_hist_profit_usd_ytd_out = format('%0.2f', order_hist_profit_usd_ytd)
266
+ # order_hist_sold_usd_tot = oh_sold_ytd_arr.map do |oh|
267
+ # oh[:executed_value].to_f
268
+ # end.sum
269
+ # order_hist_profit_usd_ytd = order_hist_sold_usd_tot - order_hist_buy_usd_tot
270
+ # order_hist_profit_usd_ytd_out = format('%0.2f', order_hist_profit_usd_ytd)
271
271
 
272
272
  # Snag all session orders sold YTD
273
273
  oh_meta_sold_arr = order_history_meta.select do |ohm|
@@ -337,12 +337,12 @@ module Cryptum
337
337
  twenty_four_hrs_ago = Time.now - 86_400
338
338
 
339
339
  # Snag all orders bought within past 24 hrs
340
- oh_buy_twenty_four_arr = []
341
- unless oh_buy_ytd_arr.empty?
342
- oh_buy_twenty_four_arr = oh_buy_ytd_arr.select do |o|
343
- Time.parse(o[:done_at]) >= twenty_four_hrs_ago
344
- end
345
- end
340
+ # oh_buy_twenty_four_arr = []
341
+ # unless oh_buy_ytd_arr.empty?
342
+ # oh_buy_twenty_four_arr = oh_buy_ytd_arr.select do |o|
343
+ # Time.parse(o[:done_at]) >= twenty_four_hrs_ago
344
+ # end
345
+ # end
346
346
  # order_hist_buy_twenty_four = oh_buy_twenty_four_arr.length
347
347
 
348
348
  # Snag all orders sold within past 24 hrs
@@ -355,15 +355,15 @@ module Cryptum
355
355
  order_hist_sold_twenty_four = oh_sold_twenty_four_arr.length
356
356
 
357
357
  # Calculate 24h gain
358
- order_hist_buy_usd_24h = oh_buy_twenty_four_arr.map do |oh|
359
- oh[:excuted_value].to_f
360
- end.sum
358
+ # order_hist_buy_usd_24h = oh_buy_twenty_four_arr.map do |oh|
359
+ # oh[:excuted_value].to_f
360
+ # end.sum
361
361
 
362
- order_hist_sold_usd_24h = oh_sold_twenty_four_arr.map do |oh|
363
- oh[:executed_value].to_f
364
- end.sum
365
- order_hist_profit_usd_24h = order_hist_sold_usd_24h - order_hist_buy_usd_24h
366
- order_hist_profit_usd_24h_out = format('%0.2f', order_hist_profit_usd_24h)
362
+ # order_hist_sold_usd_24h = oh_sold_twenty_four_arr.map do |oh|
363
+ # oh[:executed_value].to_f
364
+ # end.sum
365
+ # order_hist_profit_usd_24h = order_hist_sold_usd_24h - order_hist_buy_usd_24h
366
+ # order_hist_profit_usd_24h_out = format('%0.2f', order_hist_profit_usd_24h)
367
367
 
368
368
  # Snag all session orders sold within past 24 hrs
369
369
  ohm_sold_twenty_four_arr = []
@@ -646,8 +646,8 @@ module Cryptum
646
646
  )
647
647
 
648
648
  tot_header_str = "TOTAL OPEN: #{total_to_sell} | "
649
- tot_header_str += "SOLD 24h: #{order_hist_sold_twenty_four} YTD: #{order_hist_sold_ytd} | "
650
- tot_header_str += "PROF 24h: $#{order_hist_profit_usd_24h_out} YTD: $#{order_hist_profit_usd_ytd_out}"
649
+ tot_header_str += "SOLD 24h: #{order_hist_sold_twenty_four} YTD: #{order_hist_sold_ytd}"
650
+ # tot_header_str += "PROF 24h: $#{order_hist_profit_usd_24h_out} YTD: $#{order_hist_profit_usd_ytd_out}"
651
651
  order_execute_win.setpos(
652
652
  out_line_no,
653
653
  Cryptum::UI.col_center(str: tot_header_str)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.462'
4
+ VERSION = '0.0.464'
5
5
  end
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.462
4
+ version: 0.0.464
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-28 00:00:00.000000000 Z
11
+ date: 2023-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.4.17
33
+ version: 2.4.18
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 2.4.17
40
+ version: 2.4.18
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler-audit
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -240,14 +240,14 @@ dependencies:
240
240
  requirements:
241
241
  - - '='
242
242
  - !ruby/object:Gem::Version
243
- version: 1.55.0
243
+ version: 1.55.1
244
244
  type: :runtime
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - '='
249
249
  - !ruby/object:Gem::Version
250
- version: 1.55.0
250
+ version: 1.55.1
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: rubocop-rake
253
253
  requirement: !ruby/object:Gem::Requirement
@@ -268,14 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: 2.22.0
271
+ version: 2.23.0
272
272
  type: :runtime
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - '='
277
277
  - !ruby/object:Gem::Version
278
- version: 2.22.0
278
+ version: 2.23.0
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: ruby-prof
281
281
  requirement: !ruby/object:Gem::Requirement