cryptum 0.0.360 → 0.0.361

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: 700f5049379602380f8aa288cf38c6bfde8bcadab9b77e7022171ca2db34922a
4
+ data.tar.gz: d7814e9633e81b724262fb461e5174a5c7974066604ec6df5bfc7dc15002e867
5
5
  SHA512:
6
- metadata.gz: '00838b9d052e1d9137e40574e6eda02e1aaf50caa87cfd1d43b938b91e4d0513ba64b41d3f3086d9b80dbd1721eb314ad6b02149bf80ba08a19dfa17bb85493b'
7
- data.tar.gz: c47d8bfd3260e14365a1afb64dfd50029c74a4dad749fbe9af7146e637d5d8d32753cc29923adbbddf62bfae689baf07bb7f991e3908ee6ec0b884c9d0f07e35
6
+ metadata.gz: a936730f94b46dff797bf25152041bfdffb2dda3fbba45d671d7b06655f800dd24307c5cce63bf2db53606c1434f61a993538c998160439045e7c2871a2c3f78
7
+ data.tar.gz: 66e492d56c02b219f3d9f9400fd182f62c121ba3bd92212363cd0aa9a5cd6d46e4b17a27f0b2a8e54c9569121b25c37f4b3b3f45b2926b6ab1210fdf0364b987
data/Gemfile CHANGED
@@ -28,7 +28,7 @@ gem 'rest-client', '2.1.0'
28
28
  gem 'rspec', '3.12.0'
29
29
  gem 'rubocop', '1.43.0'
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,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 - fiat_smallest_decimal 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.361'
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.361
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-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -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.4
494
494
  signing_key:
495
495
  specification_version: 4
496
496
  summary: Coinbase Pro High-Frequency Trading Bot