bitflyer 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bitflyer/http/private.rb +29 -8
- data/lib/bitflyer/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: 1fe1a563928289a8e8aaef7cbe25549dd18810ef
|
4
|
+
data.tar.gz: 249c561de32e3d2eff443dbe3454cbb36d5dc900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7060497afcac7294de5a9c1f8639110eceb8f5ae4c183ca8f46eebb49a17987dd18a39025d944fb64fa2971c8aae8f5691b4392094abce2b664c69b0b07012b5
|
7
|
+
data.tar.gz: 2766ff1aa67e219dbf46ec8823feee55cd83a3dcaf7e84e251373e96265d12c2a36e2bb3a9e2083b0e724e370d3852dbdecac39647f6ef3ec99c4dc4caeb60d6
|
data/Gemfile.lock
CHANGED
@@ -38,16 +38,31 @@ module Bitflyer
|
|
38
38
|
@connection.get('/v1/me/getdeposits').body
|
39
39
|
end
|
40
40
|
|
41
|
-
def withdraw
|
42
|
-
|
41
|
+
def withdraw(currency_code: 'JPY', bank_account_id: nil, amount: nil, code: nil)
|
42
|
+
body = {
|
43
|
+
currency_code: currency_code,
|
44
|
+
bank_account_id: bank_account_id,
|
45
|
+
amount: amount,
|
46
|
+
code: code
|
47
|
+
}.delete_if { |_, v| v.nil? }
|
48
|
+
@connection.post('/v1/me/withdraw', body).body
|
43
49
|
end
|
44
50
|
|
45
51
|
def withdrawals
|
46
52
|
@connection.get('/v1/me/getwithdrawals').body
|
47
53
|
end
|
48
54
|
|
49
|
-
def send_child_order
|
50
|
-
|
55
|
+
def send_child_order(product_code: 'BTC_JPY', child_order_type: nil, side: nil, price: nil, size: nil, minute_to_expire: nil, time_in_force: 'GTC')
|
56
|
+
body = {
|
57
|
+
product_code: product_code,
|
58
|
+
child_order_type: child_order_type,
|
59
|
+
side: side,
|
60
|
+
price: price,
|
61
|
+
size: size,
|
62
|
+
minute_to_expire: minute_to_expire,
|
63
|
+
time_in_force: time_in_force
|
64
|
+
}.delete_if { |_, v| v.nil? }
|
65
|
+
@connection.post('/v1/me/sendchildorder', body).body
|
51
66
|
end
|
52
67
|
|
53
68
|
def cancel_child_order(product_code: 'BTC_JPY', child_order_id: nil, child_order_acceptance_id: nil)
|
@@ -56,11 +71,17 @@ module Bitflyer
|
|
56
71
|
child_order_id: child_order_id,
|
57
72
|
child_order_acceptance_id: child_order_acceptance_id
|
58
73
|
}.delete_if { |_, v| v.nil? }
|
59
|
-
@connection.post('/v1/me/cancelchildorder', body)
|
74
|
+
@connection.post('/v1/me/cancelchildorder', body).body
|
60
75
|
end
|
61
76
|
|
62
|
-
def send_parent_order
|
63
|
-
|
77
|
+
def send_parent_order(order_method: nil, minute_to_expire: nil, time_in_force: 'GTC', parameters: parameters)
|
78
|
+
body = {
|
79
|
+
order_method: order_method,
|
80
|
+
minute_to_expire: minute_to_expire,
|
81
|
+
time_in_force: time_in_force,
|
82
|
+
parameters: parameters
|
83
|
+
}.delete_if { |_, v| v.nil? }
|
84
|
+
@connection.post('/v1/me/sendparentorder', body).body
|
64
85
|
end
|
65
86
|
|
66
87
|
def cancel_parent_order(product_code: 'BTC_JPY', parent_order_id: nil, parent_order_acceptance_id: nil)
|
@@ -69,7 +90,7 @@ module Bitflyer
|
|
69
90
|
parent_order_id: parent_order_id,
|
70
91
|
parent_order_acceptance_id: parent_order_acceptance_id
|
71
92
|
}.delete_if { |_, v| v.nil? }
|
72
|
-
@connection.post('/v1/me/cancelparentorder', body)
|
93
|
+
@connection.post('/v1/me/cancelparentorder', body).body
|
73
94
|
end
|
74
95
|
|
75
96
|
def cancel_all_child_orders(product_code: 'BTC_JPY')
|
data/lib/bitflyer/version.rb
CHANGED