vertpig 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vertpig/order.rb +13 -24
- data/lib/vertpig/version.rb +1 -1
- data/lib/vertpig/wallet.rb +6 -0
- data/lib/vertpig/withdrawal.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d122bb75bea4907a08257921b5bb1962b01afec
|
4
|
+
data.tar.gz: 8d24409df7148b5cde8cab9d722a4090f835e403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e78c2560a0231a4997a22034309c8186cfc0323e14c76937d2788fc43b90ce5009fbe54d223bacbce2d6ed44dbdf6816a19c21b72b0ff1fa55777904b99537ef
|
7
|
+
data.tar.gz: 6f4524f739bbf13902045fc05d1a99d8ec246c8d2fe399de0fce5ef25a3c4a0b6b36da8b78997f46a2dd7c1f8eadec6bb1460a241c6703aa8cf39ddd06137fc8
|
data/lib/vertpig/order.rb
CHANGED
@@ -41,32 +41,15 @@ module Vertpig
|
|
41
41
|
orders
|
42
42
|
end
|
43
43
|
|
44
|
-
def self.
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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 result
|
61
|
-
puts "======> BUY FINISH at price: #{'%.8f' % price} - amount: #{amount}"
|
62
|
-
rescue Exception => e
|
63
|
-
puts "======> BUY ERROR #{e}"
|
64
|
-
end
|
65
|
-
|
66
|
-
result
|
44
|
+
def self.buy_limit(market, amount, price)
|
45
|
+
client.get('market/buylimit', {
|
46
|
+
market: market,
|
47
|
+
quantity: amount,
|
48
|
+
rate: price
|
49
|
+
})
|
67
50
|
end
|
68
51
|
|
69
|
-
def self.
|
52
|
+
def self.sell_limit(market, amount, price)
|
70
53
|
client.get('market/selllimit', {
|
71
54
|
market: market,
|
72
55
|
quantity: amount,
|
@@ -74,6 +57,12 @@ module Vertpig
|
|
74
57
|
})
|
75
58
|
end
|
76
59
|
|
60
|
+
def self.info(order_id)
|
61
|
+
client.get('account/getorder', {
|
62
|
+
uuid: order_id
|
63
|
+
})
|
64
|
+
end
|
65
|
+
|
77
66
|
def self.cancel(order_id)
|
78
67
|
client.get('market/cancel', {
|
79
68
|
uuid: order_id
|
data/lib/vertpig/version.rb
CHANGED
data/lib/vertpig/wallet.rb
CHANGED
data/lib/vertpig/withdrawal.rb
CHANGED
@@ -25,6 +25,14 @@ module Vertpig
|
|
25
25
|
client.get('account/getwithdrawalhistory').map{|data| new(data) }
|
26
26
|
end
|
27
27
|
|
28
|
+
def self.single(currency, quantity, address)
|
29
|
+
client.get('account/withdraw', {
|
30
|
+
currency: currency,
|
31
|
+
quantity: quantity,
|
32
|
+
address: address
|
33
|
+
})
|
34
|
+
end
|
35
|
+
|
28
36
|
private
|
29
37
|
|
30
38
|
def self.client
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vertpig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vertbase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|