coss_bot 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c85e32211ac8fd1a7c3d1f8baafeba6a841423b868a3fb98e4ed91fae93aeb00
4
- data.tar.gz: 1afa1f2048c150ecb1e84fa535627a2068bc86a8d16368b62db55190cad07d70
3
+ metadata.gz: b9ef19ac8c7758772a524ab6ba485b4781dcfa747e1f2c0258f31161d4e82a86
4
+ data.tar.gz: 24e8458f0b3aaef39acbb713ce0d39ae700a7b100921fd8082b91c5e7d7f906e
5
5
  SHA512:
6
- metadata.gz: 5f2bc2c5727d184947560a6f2410266e82e38b81a39fdd5255547ea3fe07245f0bff95dc7aaa0c0e5a73cbec92c455c8b619b9ea41cb7d786426c7017ab6e8d5
7
- data.tar.gz: ab694d3a8b7296621a4672efa6c1a0e193b797b57cd7b1bb02ef933ce450f7860d6708e3dec4eda9c3191b05d2bf0229ac86427ec001c2a3a67e0c19affc4325
6
+ metadata.gz: 18cbac675cc8db28442f7cffd9e9a1520878d1eb5465a40457a0edb59d7fdf8aff07ebd8c4e2ce1bf19f21f8297520314fdc156601feef36db32dcee32bb0ee7
7
+ data.tar.gz: bdf5bfc7a759babcb4f1513c1b93d011b832ad2b5470280831e8b8555ed13203f49421c0197f44118c011dcf31a1364688a0184bf938caeb926c65c70b8e4c3f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coss_bot (0.1.1)
4
+ coss_bot (0.1.2)
5
5
  coss_api_ruby_wrapper (= 0.1.1)
6
6
 
7
7
  GEM
@@ -14,12 +14,12 @@ module CossBot
14
14
  return if current_balance <= trade_limit.to_f
15
15
  return if current_balance <= current_price * lot_size
16
16
 
17
- price_with_profit = (current_price + (current_price / 100 * profit)).round(6)
17
+ price_with_profit = (current_price + (current_price / 100 * profit.to_f)).round(6)
18
18
  puts "Placing BUY order for #{current_price}. Lot size: #{lot_size}"
19
19
  buy_response = exchange.place_limit_order(pair, current_price, 'BUY', lot_size)
20
20
  puts "Placing SELL order for #{price_with_profit}. Lot size: #{lot_size}"
21
21
  sell_response = exchange.place_limit_order(pair, price_with_profit, 'SELL', lot_size)
22
- yield(buy_response['order_id'], sell_response['order_id'])
22
+ yield(buy_response, sell_response)
23
23
  puts '=== End of trading cycle ==='
24
24
  end
25
25
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CossBot
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
data/lib/coss_bot.rb CHANGED
@@ -4,6 +4,7 @@ require 'coss_bot/version'
4
4
  require 'coss_bot/basic'
5
5
  require 'coss_bot/buy_low_sell_high'
6
6
  require 'benchmark'
7
+ require 'coss_api_ruby_wrapper'
7
8
 
8
9
  module CossBot
9
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coss_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Viktor Vsk