bitflyer 0.0.3 → 0.0.4
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 +79 -2
- data/lib/bitflyer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0a5803fb1c59025047dc57e2d68098aecbf86dc
|
4
|
+
data.tar.gz: cab306e2ff3c80bc0ea50af1cc405c4a3e5adfeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed458055798e5d28368fb2c21f9150c153f1d182dd148715c280cf546f4538cf05ce29f5285bf9d826a65d0f51e4414cc88a7ea89a65f97be89388c26dab43d6
|
7
|
+
data.tar.gz: 1390d7daa1e4ce69d53a48dfc7c5c3b17ea9150c8c47f509e4438260c519029b7862a0bc36bda143bfe2172f88c92f13a84db3fb59f90249f02fca31b47210c7
|
data/Gemfile.lock
CHANGED
@@ -46,8 +46,85 @@ module Bitflyer
|
|
46
46
|
@connection.get('/v1/me/getwithdrawals').body
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
50
|
-
|
49
|
+
def send_child_order
|
50
|
+
#TBD
|
51
|
+
end
|
52
|
+
|
53
|
+
def cancel_child_order(product_code: 'BTC_JPY', child_order_id: nil, child_order_acceptance_id: nil)
|
54
|
+
body = {
|
55
|
+
product_code: product_code,
|
56
|
+
child_order_id: child_order_id,
|
57
|
+
child_order_acceptance_id: child_order_acceptance_id
|
58
|
+
}.delete_if { |_, v| v.nil? }
|
59
|
+
@connection.post('/v1/me/cancelchildorder', body)
|
60
|
+
end
|
61
|
+
|
62
|
+
def send_parent_order
|
63
|
+
#TBD
|
64
|
+
end
|
65
|
+
|
66
|
+
def cancel_parent_order(product_code: 'BTC_JPY', parent_order_id: nil, parent_order_acceptance_id: nil)
|
67
|
+
body = {
|
68
|
+
product_code: product_code,
|
69
|
+
parent_order_id: parent_order_id,
|
70
|
+
parent_order_acceptance_id: parent_order_acceptance_id
|
71
|
+
}.delete_if { |_, v| v.nil? }
|
72
|
+
@connection.post('/v1/me/cancelparentorder', body)
|
73
|
+
end
|
74
|
+
|
75
|
+
def cancel_all_child_orders(product_code: 'BTC_JPY')
|
76
|
+
@connection.post('/v1/me/cancelallchildorders', { product_code: product_code }).body
|
77
|
+
end
|
78
|
+
|
79
|
+
def child_orders(product_code: 'BTC_JPY', count: nil, before: nil, after: nil, child_order_state: nil, parent_order_id: nil)
|
80
|
+
query = {
|
81
|
+
product_code: product_code,
|
82
|
+
count: count,
|
83
|
+
before: before,
|
84
|
+
after: after,
|
85
|
+
child_order_state: child_order_state,
|
86
|
+
parent_order_id: parent_order_id
|
87
|
+
}.delete_if { |_, v| v.nil? }
|
88
|
+
@connection.get('/v1/me/getchildorders', query).body
|
89
|
+
end
|
90
|
+
|
91
|
+
def parent_orders(product_code: 'BTC_JPY', count: nil, before: nil, after: nil, parent_order_state: nil)
|
92
|
+
query = {
|
93
|
+
product_code: product_code,
|
94
|
+
count: count,
|
95
|
+
before: before,
|
96
|
+
after: after,
|
97
|
+
parent_order_state: parent_order_state
|
98
|
+
}.delete_if { |_, v| v.nil? }
|
99
|
+
@connection.get('/v1/me/getparentorders', query).body
|
100
|
+
end
|
101
|
+
|
102
|
+
def parent_order(parent_order_id: nil, parent_order_acceptance_id: nil)
|
103
|
+
query = {
|
104
|
+
parent_order_id: parent_order_id,
|
105
|
+
parent_order_acceptance_id: parent_order_acceptance_id
|
106
|
+
}.delete_if { |_, v| v.nil? }
|
107
|
+
@connection.get('/v1/me/getparentorder', query).body
|
108
|
+
end
|
109
|
+
|
110
|
+
def executions(product_code: 'BTC_JPY', count: nil, before: nil, after: nil, child_order_id: nil, child_order_acceptance_id: nil)
|
111
|
+
query = {
|
112
|
+
product_code: product_code,
|
113
|
+
count: count,
|
114
|
+
before: before,
|
115
|
+
after: after,
|
116
|
+
child_order_id: child_order_id,
|
117
|
+
child_order_acceptance_id: child_order_acceptance_id,
|
118
|
+
}.delete_if { |_, v| v.nil? }
|
119
|
+
@connection.get('/v1/me/getexecutions', query).body
|
120
|
+
end
|
121
|
+
|
122
|
+
def positions(product_code: 'FX_BTC_JPY')
|
123
|
+
@connection.get('/v1/me/getpositions', { product_code: product_code }).body
|
124
|
+
end
|
125
|
+
|
126
|
+
def trading_commission(product_code: 'BTC_JPY')
|
127
|
+
@connection.get('v1/me/gettradingcommission', { product_code: product_code }).body
|
51
128
|
end
|
52
129
|
end
|
53
130
|
end
|
data/lib/bitflyer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitflyer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Ueki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|