ruby_bitbankcc 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/ruby_bitbankcc/bitbankcc.rb +31 -2
- data/lib/ruby_bitbankcc/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9a92121911729ddaffa33095532d9c990ce22786330fe58784297a16d225f03
|
4
|
+
data.tar.gz: 22c8b68300550ce0883725daa22d05829a8b29191e54b634374eaf6006d60979
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68dd7a72133b30e96b4a0697f11f212ecffebc08aa5129a204acae7cce2ea3cf26e636cb29807c007a8a6d52091fd19504b6304b554eeb611074268de8be9ca5
|
7
|
+
data.tar.gz: 57ae42d1ffe49406ced5c16a7cace67a99ead5bf0a251d368549309649a813b28e40df379ef99cee6bc41d3b4bb0d0e4de6f69f7035d24441753c5d1cc1ef2ba
|
data/README.md
CHANGED
@@ -30,10 +30,15 @@ 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
|
-
|
33
|
+
# you can omit last post_only (omit means false)
|
34
|
+
bbcc.create_order('btc_jpy', "0.001", 130000, 'buy', 'limit', false)
|
35
|
+
# you can omit last trigger_price (omit means nil)
|
36
|
+
bbcc.create_order('btc_jpy', "0.001", 130000, 'buy', 'stop_limit', false, 140000)
|
34
37
|
bbcc.cancel_order('btc_jpy', order_id)
|
35
38
|
bbcc.read_trade_history('btc_jpy')
|
39
|
+
bbcc.read_deposit_history('btc')
|
36
40
|
bbcc.read_withdrawal_account('btc')
|
37
41
|
bbcc.request_withdrawal('btc', 'ACCOUNT UUID', '0.001', 'OTP TOKEN', 'SMS TOKEN')
|
42
|
+
bbcc.read_withdrawal_history('btc')
|
38
43
|
JSON.parse(response.body)
|
39
44
|
```
|
@@ -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, post_only = false)
|
46
|
+
def create_order(pair, amount, price, side, type, post_only = false, trigger_price = nil)
|
47
47
|
path = "/v1/user/spot/order"
|
48
48
|
nonce = Time.now.to_i.to_s
|
49
49
|
body = {
|
@@ -52,7 +52,8 @@ class Bitbankcc
|
|
52
52
|
price: price,
|
53
53
|
side: side,
|
54
54
|
type: type,
|
55
|
-
post_only: post_only
|
55
|
+
post_only: post_only,
|
56
|
+
trigger_price: trigger_price
|
56
57
|
}.to_json
|
57
58
|
request_for_post(path, nonce, body)
|
58
59
|
end
|
@@ -82,6 +83,20 @@ class Bitbankcc
|
|
82
83
|
request_for_get(path, nonce, params)
|
83
84
|
end
|
84
85
|
|
86
|
+
def read_deposit_history(asset, count = nil, since = nil, _end = nil, order = nil)
|
87
|
+
path = "/v1/user/deposit_history"
|
88
|
+
nonce = Time.now.to_i.to_s
|
89
|
+
params = {
|
90
|
+
asset: asset,
|
91
|
+
count: count,
|
92
|
+
since: since,
|
93
|
+
end: _end,
|
94
|
+
order: order
|
95
|
+
}.compact
|
96
|
+
|
97
|
+
request_for_get(path, nonce, params)
|
98
|
+
end
|
99
|
+
|
85
100
|
def read_withdrawal_account(asset)
|
86
101
|
path = "/v1/user/withdrawal_account"
|
87
102
|
nonce = Time.now.to_i.to_s
|
@@ -105,6 +120,20 @@ class Bitbankcc
|
|
105
120
|
request_for_post(path, nonce, body)
|
106
121
|
end
|
107
122
|
|
123
|
+
def read_withdrawal_history(asset, count = nil, since = nil, _end = nil, order = nil)
|
124
|
+
path = "/v1/user/withdrawal_history"
|
125
|
+
nonce = Time.now.to_i.to_s
|
126
|
+
params = {
|
127
|
+
asset: asset,
|
128
|
+
count: count,
|
129
|
+
since: since,
|
130
|
+
end: _end,
|
131
|
+
order: order
|
132
|
+
}.compact
|
133
|
+
|
134
|
+
request_for_get(path, nonce, params)
|
135
|
+
end
|
136
|
+
|
108
137
|
def read_ticker(pair)
|
109
138
|
RestClient.get @@base_public_url + "/#{pair}/ticker"
|
110
139
|
end
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bitbankcc
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description:
|
83
|
+
description:
|
84
84
|
email:
|
85
85
|
- system@bitcoinbank.co.jp
|
86
86
|
executables: []
|
@@ -101,7 +101,7 @@ homepage: https://github.com/bitbankinc/ruby_bitbankcc
|
|
101
101
|
licenses: []
|
102
102
|
metadata:
|
103
103
|
allowed_push_host: https://rubygems.org
|
104
|
-
post_install_message:
|
104
|
+
post_install_message:
|
105
105
|
rdoc_options: []
|
106
106
|
require_paths:
|
107
107
|
- lib
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubygems_version: 3.0.3
|
120
|
-
signing_key:
|
120
|
+
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: This is ruby client of bitbankcc api
|
123
123
|
test_files: []
|