cryptum 0.0.426 → 0.0.428

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: 127ea736102e9f1d3ef7223fba59992eefc164f9f91cb63888503794925ae11b
4
- data.tar.gz: a95b0a42d443aa539127bf0b17c2fb80eabc64a0d6d17a025c558ddb75b90488
3
+ metadata.gz: fe0b02adbb5ffcbdb8065a6f1736db690d68311c3e951827a28931b9c7a4c1f2
4
+ data.tar.gz: 3add711462fc12b4f22e80f1883a8559cec2929bbb16a8a10c3c8c9a19a674a3
5
5
  SHA512:
6
- metadata.gz: 24834242320b3db874db4377bfd80cf3e6cab555fb7fb50635a1b084699e845eb4e7ec8c5170fcb4920bd8c0897bee1915a52a3e450ea712ba9bb6505a357c50
7
- data.tar.gz: d2778232f88959d84424dc921edab4a41786656f568a3bdf367e68c7de667d6e1c4a9d3d81b129974db60b3e6206aa5d33c4869274694d3e14d65dd1e904b520
6
+ metadata.gz: 7d70cdf414221746b8fd55fd6c16e9072287dae88b4e0c6bc6a76273df5e40685cdd5f417b625fd5440cebd8c73d463c70de29b4b48b19ea9eaa6bdab5904b0c
7
+ data.tar.gz: 9bc168b1a91812b2f7b68dfc4594eba6ab24a628daa7f04df123023f46e86bd94ac08e380fe46c4f154f066229036003910162f01f0a0c489a4ec2953ef03f77
data/.rubocop.yml CHANGED
@@ -10,7 +10,7 @@ Metrics/AbcSize:
10
10
  Metrics/BlockLength:
11
11
  Max: 138
12
12
  Metrics/BlockNesting:
13
- Max: 3
13
+ Max: 4
14
14
  Metrics/ClassLength:
15
15
  Max: 128
16
16
  Metrics/CyclomaticComplexity:
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.11'
15
+ gem 'bundler', '>=2.4.12'
16
16
  gem 'bundler-audit', '0.9.1'
17
17
  gem 'curses', '1.4.4'
18
18
  gem 'eventmachine', '1.2.7'
@@ -26,10 +26,10 @@ gem 'rdoc', '6.5.0'
26
26
  gem 'require_all', '3.0.0'
27
27
  gem 'rest-client', '2.1.0'
28
28
  gem 'rspec', '3.12.0'
29
- gem 'rubocop', '1.50.0'
29
+ gem 'rubocop', '1.50.2'
30
30
  gem 'rubocop-rake', '0.6.0'
31
- gem 'rubocop-rspec', '2.19.0'
32
- gem 'ruby-prof', '1.6.1'
31
+ gem 'rubocop-rspec', '2.20.0'
32
+ gem 'ruby-prof', '1.6.2'
33
33
  gem 'rvm', '1.11.3.9'
34
34
  gem 'sinatra', '3.0.6'
35
35
  gem 'thin', '1.8.2'
data/lib/cryptum/log.rb CHANGED
@@ -88,8 +88,12 @@ module Cryptum
88
88
 
89
89
  if msg.instance_of?(Interrupt)
90
90
  logger.level = Logger::WARN
91
- log_event += ' => CTRL+C Detected...Exiting Session.'
92
- exit_gracefully = true unless driver_name == 'cryptum-repl'
91
+ if driver_name == 'cryptum-repl'
92
+ log_event += ' => CTRL+C Detected.'
93
+ else
94
+ log_event += ' => CTRL+C Detected...Exiting Session.'
95
+ exit_gracefully = true unless driver_name == 'cryptum-repl'
96
+ end
93
97
  else
94
98
  log_event += " => #{msg}"
95
99
  if msg.respond_to?('backtrace') && !msg.instance_of?(Errno::ECONNRESET)
@@ -95,10 +95,15 @@ module Cryptum
95
95
 
96
96
  limit_price = last_purchase_price - quote_increment.to_f if last_purchase_price.positive? && last_purchase_price < limit_price
97
97
 
98
+ price = format(
99
+ "%0.#{fiat_smallest_decimal}f",
100
+ limit_price
101
+ )
102
+
98
103
  # Debug last order -------------------------------#
99
- debug_last_order = "Last Order: #{last_order}"
100
- debug_last_order += "Last Purchase Price: #{last_purchase_price}"
101
- debug_last_order += "Limit Price (Should be <= quote_increment-- ^): #{limit_price}"
104
+ debug_last_order = "Last Order: #{last_order}\n"
105
+ debug_last_order += "Last Purchase Price: #{last_purchase_price}\n"
106
+ debug_last_order += "Limit Price (Should be <= #{last_purchase_price}): #{price}"
102
107
  debug_last_order += "\n\n\n"
103
108
 
104
109
  Cryptum::Log.append(
@@ -109,11 +114,6 @@ module Cryptum
109
114
  )
110
115
  #-------------------------------------------------#
111
116
 
112
- price = format(
113
- "%0.#{fiat_smallest_decimal}f",
114
- limit_price
115
- )
116
-
117
117
  size = this_order[:invest].to_f / limit_price
118
118
 
119
119
  loop do
@@ -455,11 +455,11 @@ module Cryptum
455
455
  oh[:id] == meta[:buy_order_id]
456
456
  end
457
457
 
458
- buy_created_at = '____-__-__ __:__:__'
458
+ buy_created_at = '____-__-__ __:__:__-____'
459
459
  unless buy_created_at_hash_arr.empty?
460
460
  buy_created_at = Time.parse(
461
461
  buy_created_at_hash_arr.first[:created_at]
462
- ).strftime('%Y-%m-%d %H:%M:%S.%N%z')
462
+ ).strftime('%Y-%m-%d %H:%M:%S%z')
463
463
  end
464
464
 
465
465
  invest = "$#{invest_out} @ "
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.426'
4
+ VERSION = '0.0.428'
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.426
4
+ version: 0.0.428
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-04-11 00:00:00.000000000 Z
11
+ date: 2023-04-19 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.11
33
+ version: 2.4.12
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.11
40
+ version: 2.4.12
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler-audit
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - '='
228
228
  - !ruby/object:Gem::Version
229
- version: 1.50.0
229
+ version: 1.50.2
230
230
  type: :runtime
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - '='
235
235
  - !ruby/object:Gem::Version
236
- version: 1.50.0
236
+ version: 1.50.2
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rubocop-rake
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -254,28 +254,28 @@ dependencies:
254
254
  requirements:
255
255
  - - '='
256
256
  - !ruby/object:Gem::Version
257
- version: 2.19.0
257
+ version: 2.20.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.19.0
264
+ version: 2.20.0
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: ruby-prof
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: 1.6.1
271
+ version: 1.6.2
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: 1.6.1
278
+ version: 1.6.2
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: rvm
281
281
  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.11
540
+ rubygems_version: 3.4.12
541
541
  signing_key:
542
542
  specification_version: 4
543
543
  summary: Coinbase Pro High-Frequency Trading Bot