ruby_bitbankcc 0.1.3 → 0.1.4
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 +5 -5
- data/Gemfile +0 -1
- data/README.md +1 -1
- data/lib/ruby_bitbankcc/bitbankcc.rb +4 -2
- data/lib/ruby_bitbankcc/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 883f42fc00d27f4198bf3b88ec326ed6da677e13c2d4f83838f53a9fd259312c
|
4
|
+
data.tar.gz: 46d5fe10b409cc664d031d61e87a20737130ff1d088917d57a511eea42618fa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 580e2fba1de83bdd274478e79d8854e422933488f6eabb95f445d8b7d3417e446d2faef5f997457278f75d7d58f6ae06af8dc86aa68d1d63d398810102976257
|
7
|
+
data.tar.gz: 18ce3d092f704fc8d2ee929926fe68ef30597fd4db0979be60c9d5e6ca12628ea6c39b1cc10090e44ed5330fe321843dfa188f147d20091a53574c8eb7b86f83
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -30,7 +30,7 @@ bbcc.read_ticker('btc_jpy')
|
|
30
30
|
bbcc.read_order_books('btc_jpy')
|
31
31
|
bbcc.read_balance()
|
32
32
|
bbcc.read_active_orders('btc_jpy')
|
33
|
-
bbcc.create_order('btc_jpy', "0.001", 130000, 'buy', 'limit')
|
33
|
+
bbcc.create_order('btc_jpy', "0.001", 130000, 'buy', 'limit', false) # you can omit last post_only (omit means false)
|
34
34
|
bbcc.cancel_order('btc_jpy', order_id)
|
35
35
|
bbcc.read_trade_history('btc_jpy')
|
36
36
|
bbcc.read_withdrawal_account('btc')
|
@@ -43,7 +43,7 @@ class Bitbankcc
|
|
43
43
|
request_for_get(path, nonce, params)
|
44
44
|
end
|
45
45
|
|
46
|
-
def create_order(pair, amount, price, side, type)
|
46
|
+
def create_order(pair, amount, price, side, type, post_only = false)
|
47
47
|
path = "/v1/user/spot/order"
|
48
48
|
nonce = Time.now.to_i.to_s
|
49
49
|
body = {
|
@@ -51,7 +51,8 @@ class Bitbankcc
|
|
51
51
|
amount: amount,
|
52
52
|
price: price,
|
53
53
|
side: side,
|
54
|
-
type: type
|
54
|
+
type: type,
|
55
|
+
post_only: post_only
|
55
56
|
}.to_json
|
56
57
|
request_for_post(path, nonce, body)
|
57
58
|
end
|
@@ -128,6 +129,7 @@ class Bitbankcc
|
|
128
129
|
response = https.start do |h|
|
129
130
|
h.request(request)
|
130
131
|
end
|
132
|
+
# XXX: I think we should JSON.parse it, but it makes backward incompatibility. What do you think, code wanderers?
|
131
133
|
response.body
|
132
134
|
end
|
133
135
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_bitbankcc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bitbankcc
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -116,8 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
|
-
|
120
|
-
rubygems_version: 2.4.5
|
119
|
+
rubygems_version: 3.0.3
|
121
120
|
signing_key:
|
122
121
|
specification_version: 4
|
123
122
|
summary: This is ruby client of bitbankcc api
|