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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/coss_bot/buy_low_sell_high.rb +2 -2
- data/lib/coss_bot/version.rb +1 -1
- data/lib/coss_bot.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9ef19ac8c7758772a524ab6ba485b4781dcfa747e1f2c0258f31161d4e82a86
|
4
|
+
data.tar.gz: 24e8458f0b3aaef39acbb713ce0d39ae700a7b100921fd8082b91c5e7d7f906e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18cbac675cc8db28442f7cffd9e9a1520878d1eb5465a40457a0edb59d7fdf8aff07ebd8c4e2ce1bf19f21f8297520314fdc156601feef36db32dcee32bb0ee7
|
7
|
+
data.tar.gz: bdf5bfc7a759babcb4f1513c1b93d011b832ad2b5470280831e8b8555ed13203f49421c0197f44118c011dcf31a1364688a0184bf938caeb926c65c70b8e4c3f
|
data/Gemfile.lock
CHANGED
@@ -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
|
22
|
+
yield(buy_response, sell_response)
|
23
23
|
puts '=== End of trading cycle ==='
|
24
24
|
end
|
25
25
|
end
|
data/lib/coss_bot/version.rb
CHANGED
data/lib/coss_bot.rb
CHANGED