vertpig 0.0.9 → 0.0.10

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
  SHA1:
3
- metadata.gz: 1e96908777fb34f76e6b66223ea81fcdaaa4a83b
4
- data.tar.gz: 4b36f1f4c4cc8ae6ad37e5e6e2afdd59b8d02a88
3
+ metadata.gz: 9d122bb75bea4907a08257921b5bb1962b01afec
4
+ data.tar.gz: 8d24409df7148b5cde8cab9d722a4090f835e403
5
5
  SHA512:
6
- metadata.gz: 7f3d3834edb768943640614312656d9c20bf8b1df3ed24dd5c8e3e981ca8f375d3e400d15656f5d7512091f093e071bee11f3e10c5824c61d48c16b3935ac0a6
7
- data.tar.gz: 2d9d1ea5d3c0c8ef38df32aa630e8c1e984095cb9bd98a5dfcf163c2ed9bdfb6000e584fbd828360bfb907391c52dca5badacc23e7003bc97cde9c56e6ebc6ec
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.buy(market, amount, price)
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 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.sell(market, amount, price)
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
@@ -1,3 +1,3 @@
1
1
  module Vertpig
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -17,6 +17,12 @@ module Vertpig
17
17
  client.get('account/getbalances').map{|data| new(data) }
18
18
  end
19
19
 
20
+ def self.balance(currency)
21
+ client.get('account/getbalance', {
22
+ currency: currency
23
+ })
24
+ end
25
+
20
26
  private
21
27
 
22
28
  def self.client
@@ -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.9
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-25 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday