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 +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile +4 -4
- data/lib/cryptum/log.rb +6 -2
- data/lib/cryptum/ui/order/execute.rb +10 -10
- data/lib/cryptum/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe0b02adbb5ffcbdb8065a6f1736db690d68311c3e951827a28931b9c7a4c1f2
|
4
|
+
data.tar.gz: 3add711462fc12b4f22e80f1883a8559cec2929bbb16a8a10c3c8c9a19a674a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d70cdf414221746b8fd55fd6c16e9072287dae88b4e0c6bc6a76273df5e40685cdd5f417b625fd5440cebd8c73d463c70de29b4b48b19ea9eaa6bdab5904b0c
|
7
|
+
data.tar.gz: 9bc168b1a91812b2f7b68dfc4594eba6ab24a628daa7f04df123023f46e86bd94ac08e380fe46c4f154f066229036003910162f01f0a0c489a4ec2953ef03f77
|
data/.rubocop.yml
CHANGED
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.
|
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.
|
29
|
+
gem 'rubocop', '1.50.2'
|
30
30
|
gem 'rubocop-rake', '0.6.0'
|
31
|
-
gem 'rubocop-rspec', '2.
|
32
|
-
gem 'ruby-prof', '1.6.
|
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
|
-
|
92
|
-
|
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 <=
|
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
|
462
|
+
).strftime('%Y-%m-%d %H:%M:%S%z')
|
463
463
|
end
|
464
464
|
|
465
465
|
invest = "$#{invest_out} @ "
|
data/lib/cryptum/version.rb
CHANGED
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.
|
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
|
+
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
540
|
+
rubygems_version: 3.4.12
|
541
541
|
signing_key:
|
542
542
|
specification_version: 4
|
543
543
|
summary: Coinbase Pro High-Frequency Trading Bot
|