vertpig 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vertpig/market.rb +0 -4
- data/lib/vertpig/order.rb +22 -0
- data/lib/vertpig/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da5640a9b92e8fed891b45d12c9d21e5e1e1a85b
|
4
|
+
data.tar.gz: e969a1e1b36b7141f49a0092ffa03b1ce82060b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8104bc5adada7167232c4ce47927f344443598fe7d24680488df30f9e3a105286b88a7a712555b597344a1bee776d71063ca6572679e7aee7b9d927c91d6bed0
|
7
|
+
data.tar.gz: 965ee2f7eb3be7e8671a569af27783c8f877913b0afb0082bf89f62cd7ec243209fa2cbad565b756df476e47a77fa1e10887b9a8d2868d17dae26134fab5cb71
|
data/lib/vertpig/market.rb
CHANGED
@@ -22,10 +22,6 @@ module Vertpig
|
|
22
22
|
client.get('public/getmarkets').map{|data| new(data) }
|
23
23
|
end
|
24
24
|
|
25
|
-
def self.buylimit(market, quantity, rate, type, postonly)
|
26
|
-
new(market, client.get('/market/buylimit', market: market, quantity: quantity, rate: rate, type: type, postonly: postonly))
|
27
|
-
end
|
28
|
-
|
29
25
|
private
|
30
26
|
|
31
27
|
def self.client
|
data/lib/vertpig/order.rb
CHANGED
@@ -41,6 +41,28 @@ module Vertpig
|
|
41
41
|
orders
|
42
42
|
end
|
43
43
|
|
44
|
+
def self.buy(market, amount, price)
|
45
|
+
client.get('/market/buylimit', {
|
46
|
+
market: market,
|
47
|
+
quantity: amount,
|
48
|
+
rate: price
|
49
|
+
})
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.sell(market, amount, price)
|
53
|
+
client.get('/market/selllimit', {
|
54
|
+
market: market,
|
55
|
+
quantity: amount,
|
56
|
+
rate: price
|
57
|
+
})
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.cancel(order_id)
|
61
|
+
client.get('/market/cancel', {
|
62
|
+
uuid: order_id
|
63
|
+
})
|
64
|
+
end
|
65
|
+
|
44
66
|
def self.open
|
45
67
|
client.get('market/getopenorders').map{|data| new(data) }
|
46
68
|
end
|
data/lib/vertpig/version.rb
CHANGED