cryptum 0.0.360 → 0.0.362

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: 20ab6f10a55a48ccfbe894244be58e570164f286b3f4ae376a749d96323bf57b
4
- data.tar.gz: e6fd70c21307346527247c1e41540aa14f43c64ab9879dfe19bb791f7fe81ca1
3
+ metadata.gz: 81280048c0a0ce151b105bc5705e7b886d4554172e3f4ef51349437f4b2c2d85
4
+ data.tar.gz: b5c8e7c1cc800c0a1e05ee135e9de589c2c724f193b8f4da5c3994716b15cc62
5
5
  SHA512:
6
- metadata.gz: '00838b9d052e1d9137e40574e6eda02e1aaf50caa87cfd1d43b938b91e4d0513ba64b41d3f3086d9b80dbd1721eb314ad6b02149bf80ba08a19dfa17bb85493b'
7
- data.tar.gz: c47d8bfd3260e14365a1afb64dfd50029c74a4dad749fbe9af7146e637d5d8d32753cc29923adbbddf62bfae689baf07bb7f991e3908ee6ec0b884c9d0f07e35
6
+ metadata.gz: 3d316a8a94edcdfc01df2aff2125c94c59c58167648875f994453229239c5566542b339b924dc706c89046960684b79f903abdbaaef7c54fe0f4714b0e907d06
7
+ data.tar.gz: b3545d8e37240d613dfdca0e26bc58553a302afdaaa88d2e18c51bdda6e3c1140830893ac8cd57420a916f847110fee61d010b5edf9c8442f597f6ce0b3c62a5
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.1'
15
- gem 'bundler', '>=2.4.4'
15
+ gem 'bundler', '>=2.4.5'
16
16
  gem 'bundler-audit', '0.9.1'
17
17
  gem 'curses', '1.4.4'
18
18
  gem 'eventmachine', '1.2.7'
@@ -26,9 +26,9 @@ 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.43.0'
29
+ gem 'rubocop', '1.44.1'
30
30
  gem 'rubocop-rake', '0.6.0'
31
- gem 'rubocop-rspec', '2.18.0'
31
+ gem 'rubocop-rspec', '2.18.1'
32
32
  gem 'ruby-prof', '1.4.5'
33
33
  gem 'rvm', '1.11.3.9'
34
34
  gem 'sinatra', '3.0.5'
@@ -83,18 +83,15 @@ module Cryptum
83
83
  # FAST BUY && SLOW BUY values taking
84
84
  # market_trend_reset values into account
85
85
 
86
- # FAST BUY = 10 minutes
87
- # self.time_between_orders = 600
88
- self.time_between_orders = 3_600
86
+ # FAST BUY = 4 hours
87
+ self.time_between_orders = 14_400
89
88
  self.time_between_orders_reset = time_between_orders
90
89
 
91
- # SLOW BUY = 1 hour
92
- self.time_between_orders_max = 14_400
93
- # self.time_between_orders_max = 3_600
90
+ # SLOW BUY = 1 day
91
+ self.time_between_orders_max = 86_400
94
92
 
95
- # 5 seconds
96
- # self.time_between_orders_min = 5
97
- self.time_between_orders_min = 600
93
+ # 1 hour
94
+ self.time_between_orders_min = 3_600
98
95
  # -------------------------------------------------- #
99
96
  end
100
97
  rescue Interrupt
@@ -83,6 +83,16 @@ module Cryptum
83
83
  if option_choice.autotrade
84
84
  this_order = event_history.order_book[:order_plan].first
85
85
 
86
+ # If price is greater than the previous order,
87
+ # force it to be slightly less
88
+ last_order = order_history_meta.select do |order|
89
+ order if order[:color] == 'yellow'
90
+ end.last
91
+ last_purchase_price = 0.0
92
+ last_purchase_price = last_order[:price].to_f if last_order.any?
93
+
94
+ limit_price = last_purchase_price - quote_increment.to_f if last_purchase_price.positive? && last_purchase_price < limit_price
95
+
86
96
  price = format(
87
97
  "%0.#{fiat_smallest_decimal}f",
88
98
  limit_price
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.360'
4
+ VERSION = '0.0.362'
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.360
4
+ version: 0.0.362
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-01-17 00:00:00.000000000 Z
11
+ date: 2023-01-25 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.4
33
+ version: 2.4.5
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.4
40
+ version: 2.4.5
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.43.0
229
+ version: 1.44.1
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.43.0
236
+ version: 1.44.1
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rubocop-rake
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -254,14 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - '='
256
256
  - !ruby/object:Gem::Version
257
- version: 2.18.0
257
+ version: 2.18.1
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.18.0
264
+ version: 2.18.1
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: ruby-prof
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -490,7 +490,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
490
490
  - !ruby/object:Gem::Version
491
491
  version: '0'
492
492
  requirements: []
493
- rubygems_version: 3.4.3
493
+ rubygems_version: 3.4.5
494
494
  signing_key:
495
495
  specification_version: 4
496
496
  summary: Coinbase Pro High-Frequency Trading Bot