cryptum 0.0.431 → 0.0.432

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: efc9ac08fc48ca7aa7674359ea95d662af6cade3fc2a0249b19ce03bc996f3fb
4
- data.tar.gz: 3b6ddc0e658f076ee6f80f2f4a399d9192292c2ce090a7056b26c51a0cb7fd2a
3
+ metadata.gz: 3f84b25db89b6e6e4cf9b50130516a44e64eba480a1e567aba5619bae57b118d
4
+ data.tar.gz: ea62f0ff2be5facfb7823012ed7b28a7590b8fa046d378f9836f7a0fa91e9838
5
5
  SHA512:
6
- metadata.gz: aff4e41fe11057b9d0b401c78b27dae432a8756ec6a02b265b5b1eb580999954d0ae8ace3390804544920f89eeed141467d240f346603582a100ba6b1885ed61
7
- data.tar.gz: da014125c73aba67a997bb76b2a9476a1074b35ae51973b4b6a44833ab3bc5c410c572d249ddfae3116f1e75581c18ec74daf6254a2610c56bdd4b632322fe43
6
+ metadata.gz: 8976c39e002384261258f717f436a77376dbfe1af3c3173d70f9905ea9c55007988c24fc3f990b4486145e7ddbeb1c706d6414fdb1cc9be72f0e39efb8bcb68c
7
+ data.tar.gz: 1966b1868954202ee6151ac1a0bf6a4e7d03915925fdb4b0da075120e2bfdd8a0fa344a8ade889cec6b95ffa6f2f25e11f31ffc57eef0c89f6ab6e2919bba4d6
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.12'
15
+ gem 'bundler', '>=2.4.13'
16
16
  gem 'bundler-audit', '0.9.1'
17
17
  gem 'curses', '1.4.4'
18
18
  gem 'eventmachine', '1.2.7'
@@ -28,7 +28,7 @@ gem 'rest-client', '2.1.0'
28
28
  gem 'rspec', '3.12.0'
29
29
  gem 'rubocop', '1.50.2'
30
30
  gem 'rubocop-rake', '0.6.0'
31
- gem 'rubocop-rspec', '2.20.0'
31
+ gem 'rubocop-rspec', '2.22.0'
32
32
  gem 'ruby-prof', '1.6.3'
33
33
  gem 'rvm', '1.11.3.9'
34
34
  gem 'sinatra', '3.0.6'
@@ -13,7 +13,7 @@ module Cryptum
13
13
  terminal_win = opts[:terminal_win]
14
14
  event_history = opts[:event_history]
15
15
 
16
- terminal_win.key_press_event.key_w = false
16
+ terminal_win.key_press_event.key_w = false unless terminal_win.nil?
17
17
  order_book_file = event_history.order_book[:path]
18
18
 
19
19
  File.write(
@@ -108,7 +108,7 @@ module Cryptum
108
108
  )
109
109
  recalc_op = event_history.recalculate_order_plan
110
110
  order_plan = event_history.order_book[:order_plan]
111
- terminal_win.key_press_event.key_w = true if (recalc_op || order_plan.empty?) &&
111
+ terminal_win.key_press_event.key_w = true if (event_history.order_ready || recalc_op || order_plan.empty?) &&
112
112
  !event_history.red_pill
113
113
  event_history.recalculate_order_plan = false
114
114
  end
@@ -73,10 +73,10 @@ module Cryptum
73
73
 
74
74
  # Only keep order history meta for those hashes
75
75
  # that exist in the last order history response
76
- # :white ones will be kept for 24 hrs and handled
77
- # via Cryptum::OrderBook::MarketTrend.reset
78
- # This exist primarily to clean up meta data if the
79
- # bot crashes.
76
+ # :white ones will be kept for at least 24 hrs
77
+ # and handled via Cryptum::OrderBook::MarketTrend.reset
78
+ # This exist primarily to clean up "zombie" meta
79
+ # data entries if the bot crashes for whatever reason.
80
80
  order_book[:order_history_meta].keep_if do |ohm|
81
81
  order_book[:order_history].find do |oh|
82
82
  (oh[:id] == ohm[:buy_order_id] || oh[:id] == ohm[:sell_order_id]) && (
@@ -23,13 +23,7 @@ module Cryptum
23
23
  Cryptum::Log.append(level: :fatal, msg: e, which_self: self, event_history: event_history)
24
24
  exit 1
25
25
  ensure
26
- if event_history
27
- order_book_file = event_history.order_book[:path]
28
- File.write(
29
- order_book_file,
30
- JSON.pretty_generate(event_history.order_book)
31
- )
32
- end
26
+ Cryptum::Event::OrderBook.write(event_history: event_history) if event_history
33
27
  end
34
28
 
35
29
  # Display a List of Every UI Module
@@ -86,9 +86,7 @@ module Cryptum
86
86
 
87
87
  # If price is greater than the previous order,
88
88
  # force it to be slightly less
89
- last_order = order_history_meta.select do |order|
90
- order if order[:color] == 'yellow'
91
- end.last
89
+ last_order = order_history_meta.reverse.find { |o| o[:color] == 'yellow' }
92
90
 
93
91
  last_purchase_price = 0.0
94
92
  last_purchase_price = last_order[:price].to_f if last_order
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.431'
4
+ VERSION = '0.0.432'
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.431
4
+ version: 0.0.432
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-05-03 00:00:00.000000000 Z
11
+ date: 2023-05-12 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.12
33
+ version: 2.4.13
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.12
40
+ version: 2.4.13
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler-audit
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -254,14 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - '='
256
256
  - !ruby/object:Gem::Version
257
- version: 2.20.0
257
+ version: 2.22.0
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - '='
263
263
  - !ruby/object:Gem::Version
264
- version: 2.20.0
264
+ version: 2.22.0
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: ruby-prof
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -537,7 +537,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
537
537
  - !ruby/object:Gem::Version
538
538
  version: '0'
539
539
  requirements: []
540
- rubygems_version: 3.4.12
540
+ rubygems_version: 3.4.13
541
541
  signing_key:
542
542
  specification_version: 4
543
543
  summary: Coinbase Pro High-Frequency Trading Bot