vertpig 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: da5640a9b92e8fed891b45d12c9d21e5e1e1a85b
4
- data.tar.gz: e969a1e1b36b7141f49a0092ffa03b1ce82060b5
3
+ metadata.gz: ba397f3dd4af995ba7dc8715c189bcd004c6eb89
4
+ data.tar.gz: 9d5902e8197d1e261f1d7c256868d74fef969e7e
5
5
  SHA512:
6
- metadata.gz: 8104bc5adada7167232c4ce47927f344443598fe7d24680488df30f9e3a105286b88a7a712555b597344a1bee776d71063ca6572679e7aee7b9d927c91d6bed0
7
- data.tar.gz: 965ee2f7eb3be7e8671a569af27783c8f877913b0afb0082bf89f62cd7ec243209fa2cbad565b756df476e47a77fa1e10887b9a8d2868d17dae26134fab5cb71
6
+ metadata.gz: 5ca41fc0a9cf795b798c532048c6efafaf45aae80652b277e8789a83530b71accb251a8c9e62cff9a1171e17ffec32f93c07d24affb2b6181dbb7888ebc4ed60
7
+ data.tar.gz: 5de3af2e44dcdcdeb0b2ac5eb33ceeb24df96f37e2e46a97cf2dd25071df6c7f43b9e125f973ea3a7ff3200bf27dbbe0b49bda2e9b1aa2049f5e274d0df24b63
data/lib/vertpig/order.rb CHANGED
@@ -42,11 +42,27 @@ module Vertpig
42
42
  end
43
43
 
44
44
  def self.buy(market, amount, price)
45
- client.get('/market/buylimit', {
46
- market: market,
47
- quantity: amount,
48
- rate: price
49
- })
45
+ # client.get('/market/buylimit', {
46
+ # market: market,
47
+ # quantity: amount,
48
+ # rate: price
49
+ # })
50
+
51
+ puts "====> Buy with Amount: #{amount} at Price: #{'%.8f' % price} at #{Time.now}"
52
+ result = nil
53
+
54
+ begin
55
+ result = @client.get('/market/buylimit', {
56
+ market: market,
57
+ quantity: amount,
58
+ rate: price
59
+ })
60
+ puts "======> BUY FINISH at price: #{'%.8f' % price} - amount: #{amount}"
61
+ rescue Exception => e
62
+ puts "======> BUY ERROR #{e}"
63
+ end
64
+
65
+ result
50
66
  end
51
67
 
52
68
  def self.sell(market, amount, price)
@@ -1,3 +1,3 @@
1
1
  module Vertpig
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vertpig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vertbase