kabustation_client 1.0.0 → 1.2.0

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.
@@ -21,27 +21,21 @@ module KabustationClient
21
21
  end
22
22
  # 取引余力(現物)
23
23
  # 口座の取引余力(現物)を取得します
24
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
25
24
  # @param [Hash] opts the optional parameters
26
25
  # @return [WalletCashSuccess]
27
- def wallet_cash_get(x_api_key, opts = {})
28
- data, _status_code, _headers = wallet_cash_get_with_http_info(x_api_key, opts)
26
+ def wallet_cash_get(opts = {})
27
+ data, _status_code, _headers = wallet_cash_get_with_http_info(opts)
29
28
  data
30
29
  end
31
30
 
32
31
  # 取引余力(現物)
33
32
  # 口座の取引余力(現物)を取得します
34
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
35
33
  # @param [Hash] opts the optional parameters
36
34
  # @return [Array<(WalletCashSuccess, Integer, Hash)>] WalletCashSuccess data, response status code and response headers
37
- def wallet_cash_get_with_http_info(x_api_key, opts = {})
35
+ def wallet_cash_get_with_http_info(opts = {})
38
36
  if @api_client.config.debugging
39
37
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_cash_get ...'
40
38
  end
41
- # verify the required parameter 'x_api_key' is set
42
- if @api_client.config.client_side_validation && x_api_key.nil?
43
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_cash_get"
44
- end
45
39
  # resource path
46
40
  local_var_path = '/wallet/cash'
47
41
 
@@ -52,7 +46,6 @@ module KabustationClient
52
46
  header_params = opts[:header_params] || {}
53
47
  # HTTP header 'Accept' (if needed)
54
48
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
- header_params[:'X-API-KEY'] = x_api_key
56
49
 
57
50
  # form parameters
58
51
  form_params = opts[:form_params] || {}
@@ -64,7 +57,7 @@ module KabustationClient
64
57
  return_type = opts[:debug_return_type] || 'WalletCashSuccess'
65
58
 
66
59
  # auth_names
67
- auth_names = opts[:debug_auth_names] || []
60
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
68
61
 
69
62
  new_options = opts.merge(
70
63
  :operation => :"WalletApi.wallet_cash_get",
@@ -85,29 +78,23 @@ module KabustationClient
85
78
 
86
79
  # 取引余力(現物)(銘柄指定)
87
80
  # 指定した銘柄の取引余力(現物)を取得します
88
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
89
81
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 &lt;b&gt;市場コード&lt;/b&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;東証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;3&lt;/td&gt; &lt;td&gt;名証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;5&lt;/td&gt; &lt;td&gt;福証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;6&lt;/td&gt; &lt;td&gt;札証&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
90
82
  # @param [Hash] opts the optional parameters
91
83
  # @return [WalletCashSuccess]
92
- def wallet_cash_symbol_get(x_api_key, symbol, opts = {})
93
- data, _status_code, _headers = wallet_cash_symbol_get_with_http_info(x_api_key, symbol, opts)
84
+ def wallet_cash_symbol_get(symbol, opts = {})
85
+ data, _status_code, _headers = wallet_cash_symbol_get_with_http_info(symbol, opts)
94
86
  data
95
87
  end
96
88
 
97
89
  # 取引余力(現物)(銘柄指定)
98
90
  # 指定した銘柄の取引余力(現物)を取得します
99
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
100
91
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 &lt;b&gt;市場コード&lt;/b&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;東証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;3&lt;/td&gt; &lt;td&gt;名証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;5&lt;/td&gt; &lt;td&gt;福証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;6&lt;/td&gt; &lt;td&gt;札証&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
101
92
  # @param [Hash] opts the optional parameters
102
93
  # @return [Array<(WalletCashSuccess, Integer, Hash)>] WalletCashSuccess data, response status code and response headers
103
- def wallet_cash_symbol_get_with_http_info(x_api_key, symbol, opts = {})
94
+ def wallet_cash_symbol_get_with_http_info(symbol, opts = {})
104
95
  if @api_client.config.debugging
105
96
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_cash_symbol_get ...'
106
97
  end
107
- # verify the required parameter 'x_api_key' is set
108
- if @api_client.config.client_side_validation && x_api_key.nil?
109
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_cash_symbol_get"
110
- end
111
98
  # verify the required parameter 'symbol' is set
112
99
  if @api_client.config.client_side_validation && symbol.nil?
113
100
  fail ArgumentError, "Missing the required parameter 'symbol' when calling WalletApi.wallet_cash_symbol_get"
@@ -122,7 +109,6 @@ module KabustationClient
122
109
  header_params = opts[:header_params] || {}
123
110
  # HTTP header 'Accept' (if needed)
124
111
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
- header_params[:'X-API-KEY'] = x_api_key
126
112
 
127
113
  # form parameters
128
114
  form_params = opts[:form_params] || {}
@@ -134,7 +120,7 @@ module KabustationClient
134
120
  return_type = opts[:debug_return_type] || 'WalletCashSuccess'
135
121
 
136
122
  # auth_names
137
- auth_names = opts[:debug_auth_names] || []
123
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
138
124
 
139
125
  new_options = opts.merge(
140
126
  :operation => :"WalletApi.wallet_cash_symbol_get",
@@ -155,27 +141,21 @@ module KabustationClient
155
141
 
156
142
  # 取引余力(先物)
157
143
  # 口座の取引余力(先物)を取得します
158
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
159
144
  # @param [Hash] opts the optional parameters
160
145
  # @return [WalletFutureSuccess]
161
- def wallet_future_get(x_api_key, opts = {})
162
- data, _status_code, _headers = wallet_future_get_with_http_info(x_api_key, opts)
146
+ def wallet_future_get(opts = {})
147
+ data, _status_code, _headers = wallet_future_get_with_http_info(opts)
163
148
  data
164
149
  end
165
150
 
166
151
  # 取引余力(先物)
167
152
  # 口座の取引余力(先物)を取得します
168
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
169
153
  # @param [Hash] opts the optional parameters
170
154
  # @return [Array<(WalletFutureSuccess, Integer, Hash)>] WalletFutureSuccess data, response status code and response headers
171
- def wallet_future_get_with_http_info(x_api_key, opts = {})
155
+ def wallet_future_get_with_http_info(opts = {})
172
156
  if @api_client.config.debugging
173
157
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_future_get ...'
174
158
  end
175
- # verify the required parameter 'x_api_key' is set
176
- if @api_client.config.client_side_validation && x_api_key.nil?
177
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_future_get"
178
- end
179
159
  # resource path
180
160
  local_var_path = '/wallet/future'
181
161
 
@@ -186,7 +166,6 @@ module KabustationClient
186
166
  header_params = opts[:header_params] || {}
187
167
  # HTTP header 'Accept' (if needed)
188
168
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
189
- header_params[:'X-API-KEY'] = x_api_key
190
169
 
191
170
  # form parameters
192
171
  form_params = opts[:form_params] || {}
@@ -198,7 +177,7 @@ module KabustationClient
198
177
  return_type = opts[:debug_return_type] || 'WalletFutureSuccess'
199
178
 
200
179
  # auth_names
201
- auth_names = opts[:debug_auth_names] || []
180
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
202
181
 
203
182
  new_options = opts.merge(
204
183
  :operation => :"WalletApi.wallet_future_get",
@@ -219,29 +198,23 @@ module KabustationClient
219
198
 
220
199
  # 取引余力(先物)(銘柄指定)
221
200
  # 指定した銘柄の取引余力(先物)を取得します
222
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
223
201
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 ※SOR市場は取扱っておりませんのでご注意ください。&lt;b&gt;市場コード&lt;/b&gt;&lt;br&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;日通し&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;23&lt;/td&gt; &lt;td&gt;日中&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;24&lt;/td&gt; &lt;td&gt;夜間&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
224
202
  # @param [Hash] opts the optional parameters
225
203
  # @return [WalletFutureSuccess]
226
- def wallet_future_symbol_get(x_api_key, symbol, opts = {})
227
- data, _status_code, _headers = wallet_future_symbol_get_with_http_info(x_api_key, symbol, opts)
204
+ def wallet_future_symbol_get(symbol, opts = {})
205
+ data, _status_code, _headers = wallet_future_symbol_get_with_http_info(symbol, opts)
228
206
  data
229
207
  end
230
208
 
231
209
  # 取引余力(先物)(銘柄指定)
232
210
  # 指定した銘柄の取引余力(先物)を取得します
233
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
234
211
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 ※SOR市場は取扱っておりませんのでご注意ください。&lt;b&gt;市場コード&lt;/b&gt;&lt;br&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;日通し&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;23&lt;/td&gt; &lt;td&gt;日中&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;24&lt;/td&gt; &lt;td&gt;夜間&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
235
212
  # @param [Hash] opts the optional parameters
236
213
  # @return [Array<(WalletFutureSuccess, Integer, Hash)>] WalletFutureSuccess data, response status code and response headers
237
- def wallet_future_symbol_get_with_http_info(x_api_key, symbol, opts = {})
214
+ def wallet_future_symbol_get_with_http_info(symbol, opts = {})
238
215
  if @api_client.config.debugging
239
216
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_future_symbol_get ...'
240
217
  end
241
- # verify the required parameter 'x_api_key' is set
242
- if @api_client.config.client_side_validation && x_api_key.nil?
243
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_future_symbol_get"
244
- end
245
218
  # verify the required parameter 'symbol' is set
246
219
  if @api_client.config.client_side_validation && symbol.nil?
247
220
  fail ArgumentError, "Missing the required parameter 'symbol' when calling WalletApi.wallet_future_symbol_get"
@@ -256,7 +229,6 @@ module KabustationClient
256
229
  header_params = opts[:header_params] || {}
257
230
  # HTTP header 'Accept' (if needed)
258
231
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
259
- header_params[:'X-API-KEY'] = x_api_key
260
232
 
261
233
  # form parameters
262
234
  form_params = opts[:form_params] || {}
@@ -268,7 +240,7 @@ module KabustationClient
268
240
  return_type = opts[:debug_return_type] || 'WalletFutureSuccess'
269
241
 
270
242
  # auth_names
271
- auth_names = opts[:debug_auth_names] || []
243
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
272
244
 
273
245
  new_options = opts.merge(
274
246
  :operation => :"WalletApi.wallet_future_symbol_get",
@@ -289,27 +261,21 @@ module KabustationClient
289
261
 
290
262
  # 取引余力(信用)
291
263
  # 口座の取引余力(信用)を取得します
292
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
293
264
  # @param [Hash] opts the optional parameters
294
265
  # @return [WalletMarginSuccess]
295
- def wallet_margin_get(x_api_key, opts = {})
296
- data, _status_code, _headers = wallet_margin_get_with_http_info(x_api_key, opts)
266
+ def wallet_margin_get(opts = {})
267
+ data, _status_code, _headers = wallet_margin_get_with_http_info(opts)
297
268
  data
298
269
  end
299
270
 
300
271
  # 取引余力(信用)
301
272
  # 口座の取引余力(信用)を取得します
302
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
303
273
  # @param [Hash] opts the optional parameters
304
274
  # @return [Array<(WalletMarginSuccess, Integer, Hash)>] WalletMarginSuccess data, response status code and response headers
305
- def wallet_margin_get_with_http_info(x_api_key, opts = {})
275
+ def wallet_margin_get_with_http_info(opts = {})
306
276
  if @api_client.config.debugging
307
277
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_margin_get ...'
308
278
  end
309
- # verify the required parameter 'x_api_key' is set
310
- if @api_client.config.client_side_validation && x_api_key.nil?
311
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_margin_get"
312
- end
313
279
  # resource path
314
280
  local_var_path = '/wallet/margin'
315
281
 
@@ -320,7 +286,6 @@ module KabustationClient
320
286
  header_params = opts[:header_params] || {}
321
287
  # HTTP header 'Accept' (if needed)
322
288
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
323
- header_params[:'X-API-KEY'] = x_api_key
324
289
 
325
290
  # form parameters
326
291
  form_params = opts[:form_params] || {}
@@ -332,7 +297,7 @@ module KabustationClient
332
297
  return_type = opts[:debug_return_type] || 'WalletMarginSuccess'
333
298
 
334
299
  # auth_names
335
- auth_names = opts[:debug_auth_names] || []
300
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
336
301
 
337
302
  new_options = opts.merge(
338
303
  :operation => :"WalletApi.wallet_margin_get",
@@ -353,29 +318,23 @@ module KabustationClient
353
318
 
354
319
  # 取引余力(信用)(銘柄指定)
355
320
  # 指定した銘柄の取引余力(信用)を取得します
356
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
357
321
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 &lt;b&gt;市場コード&lt;/b&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;東証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;3&lt;/td&gt; &lt;td&gt;名証&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
358
322
  # @param [Hash] opts the optional parameters
359
323
  # @return [WalletMarginSuccess]
360
- def wallet_margin_symbol_get(x_api_key, symbol, opts = {})
361
- data, _status_code, _headers = wallet_margin_symbol_get_with_http_info(x_api_key, symbol, opts)
324
+ def wallet_margin_symbol_get(symbol, opts = {})
325
+ data, _status_code, _headers = wallet_margin_symbol_get_with_http_info(symbol, opts)
362
326
  data
363
327
  end
364
328
 
365
329
  # 取引余力(信用)(銘柄指定)
366
330
  # 指定した銘柄の取引余力(信用)を取得します
367
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
368
331
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 &lt;b&gt;市場コード&lt;/b&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;東証&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;3&lt;/td&gt; &lt;td&gt;名証&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
369
332
  # @param [Hash] opts the optional parameters
370
333
  # @return [Array<(WalletMarginSuccess, Integer, Hash)>] WalletMarginSuccess data, response status code and response headers
371
- def wallet_margin_symbol_get_with_http_info(x_api_key, symbol, opts = {})
334
+ def wallet_margin_symbol_get_with_http_info(symbol, opts = {})
372
335
  if @api_client.config.debugging
373
336
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_margin_symbol_get ...'
374
337
  end
375
- # verify the required parameter 'x_api_key' is set
376
- if @api_client.config.client_side_validation && x_api_key.nil?
377
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_margin_symbol_get"
378
- end
379
338
  # verify the required parameter 'symbol' is set
380
339
  if @api_client.config.client_side_validation && symbol.nil?
381
340
  fail ArgumentError, "Missing the required parameter 'symbol' when calling WalletApi.wallet_margin_symbol_get"
@@ -390,7 +349,6 @@ module KabustationClient
390
349
  header_params = opts[:header_params] || {}
391
350
  # HTTP header 'Accept' (if needed)
392
351
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
393
- header_params[:'X-API-KEY'] = x_api_key
394
352
 
395
353
  # form parameters
396
354
  form_params = opts[:form_params] || {}
@@ -402,7 +360,7 @@ module KabustationClient
402
360
  return_type = opts[:debug_return_type] || 'WalletMarginSuccess'
403
361
 
404
362
  # auth_names
405
- auth_names = opts[:debug_auth_names] || []
363
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
406
364
 
407
365
  new_options = opts.merge(
408
366
  :operation => :"WalletApi.wallet_margin_symbol_get",
@@ -423,27 +381,21 @@ module KabustationClient
423
381
 
424
382
  # 取引余力(オプション)
425
383
  # 口座の取引余力(オプション)を取得します
426
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
427
384
  # @param [Hash] opts the optional parameters
428
385
  # @return [WalletOptionSuccess]
429
- def wallet_option_get(x_api_key, opts = {})
430
- data, _status_code, _headers = wallet_option_get_with_http_info(x_api_key, opts)
386
+ def wallet_option_get(opts = {})
387
+ data, _status_code, _headers = wallet_option_get_with_http_info(opts)
431
388
  data
432
389
  end
433
390
 
434
391
  # 取引余力(オプション)
435
392
  # 口座の取引余力(オプション)を取得します
436
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
437
393
  # @param [Hash] opts the optional parameters
438
394
  # @return [Array<(WalletOptionSuccess, Integer, Hash)>] WalletOptionSuccess data, response status code and response headers
439
- def wallet_option_get_with_http_info(x_api_key, opts = {})
395
+ def wallet_option_get_with_http_info(opts = {})
440
396
  if @api_client.config.debugging
441
397
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_option_get ...'
442
398
  end
443
- # verify the required parameter 'x_api_key' is set
444
- if @api_client.config.client_side_validation && x_api_key.nil?
445
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_option_get"
446
- end
447
399
  # resource path
448
400
  local_var_path = '/wallet/option'
449
401
 
@@ -454,7 +406,6 @@ module KabustationClient
454
406
  header_params = opts[:header_params] || {}
455
407
  # HTTP header 'Accept' (if needed)
456
408
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
457
- header_params[:'X-API-KEY'] = x_api_key
458
409
 
459
410
  # form parameters
460
411
  form_params = opts[:form_params] || {}
@@ -466,7 +417,7 @@ module KabustationClient
466
417
  return_type = opts[:debug_return_type] || 'WalletOptionSuccess'
467
418
 
468
419
  # auth_names
469
- auth_names = opts[:debug_auth_names] || []
420
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
470
421
 
471
422
  new_options = opts.merge(
472
423
  :operation => :"WalletApi.wallet_option_get",
@@ -487,29 +438,23 @@ module KabustationClient
487
438
 
488
439
  # 取引余力(オプション)(銘柄指定)
489
440
  # 指定した銘柄の取引余力(オプション)を取得します
490
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
491
441
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 &lt;b&gt;市場コード&lt;/b&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;日通し&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;23&lt;/td&gt; &lt;td&gt;日中&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;24&lt;/td&gt; &lt;td&gt;夜間&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
492
442
  # @param [Hash] opts the optional parameters
493
443
  # @return [WalletOptionSuccess]
494
- def wallet_option_symbol_get(x_api_key, symbol, opts = {})
495
- data, _status_code, _headers = wallet_option_symbol_get_with_http_info(x_api_key, symbol, opts)
444
+ def wallet_option_symbol_get(symbol, opts = {})
445
+ data, _status_code, _headers = wallet_option_symbol_get_with_http_info(symbol, opts)
496
446
  data
497
447
  end
498
448
 
499
449
  # 取引余力(オプション)(銘柄指定)
500
450
  # 指定した銘柄の取引余力(オプション)を取得します
501
- # @param x_api_key [String] トークン発行メソッドで取得した文字列
502
451
  # @param symbol [String] 銘柄コード &lt;br&gt; ※次の形式で入力してください。&lt;br&gt; [銘柄コード]@[市場コード]&lt;br&gt; ※市場コードは下記の定義値から選択してください。 &lt;b&gt;市場コード&lt;/b&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;定義値&lt;/th&gt; &lt;th&gt;説明&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;日通し&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;23&lt;/td&gt; &lt;td&gt;日中&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;24&lt;/td&gt; &lt;td&gt;夜間&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;
503
452
  # @param [Hash] opts the optional parameters
504
453
  # @return [Array<(WalletOptionSuccess, Integer, Hash)>] WalletOptionSuccess data, response status code and response headers
505
- def wallet_option_symbol_get_with_http_info(x_api_key, symbol, opts = {})
454
+ def wallet_option_symbol_get_with_http_info(symbol, opts = {})
506
455
  if @api_client.config.debugging
507
456
  @api_client.config.logger.debug 'Calling API: WalletApi.wallet_option_symbol_get ...'
508
457
  end
509
- # verify the required parameter 'x_api_key' is set
510
- if @api_client.config.client_side_validation && x_api_key.nil?
511
- fail ArgumentError, "Missing the required parameter 'x_api_key' when calling WalletApi.wallet_option_symbol_get"
512
- end
513
458
  # verify the required parameter 'symbol' is set
514
459
  if @api_client.config.client_side_validation && symbol.nil?
515
460
  fail ArgumentError, "Missing the required parameter 'symbol' when calling WalletApi.wallet_option_symbol_get"
@@ -524,7 +469,6 @@ module KabustationClient
524
469
  header_params = opts[:header_params] || {}
525
470
  # HTTP header 'Accept' (if needed)
526
471
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
527
- header_params[:'X-API-KEY'] = x_api_key
528
472
 
529
473
  # form parameters
530
474
  form_params = opts[:form_params] || {}
@@ -536,7 +480,7 @@ module KabustationClient
536
480
  return_type = opts[:debug_return_type] || 'WalletOptionSuccess'
537
481
 
538
482
  # auth_names
539
- auth_names = opts[:debug_auth_names] || []
483
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
540
484
 
541
485
  new_options = opts.merge(
542
486
  :operation => :"WalletApi.wallet_option_symbol_get",
@@ -99,6 +99,7 @@ module KabustationClient
99
99
  form_params = opts[:form_params] || {}
100
100
  follow_location = opts[:follow_location] || true
101
101
 
102
+ update_params_for_auth! header_params, query_params, opts[:auth_names]
102
103
 
103
104
  # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
104
105
  _verify_ssl_host = @config.verify_ssl_host ? 2 : 0
@@ -234,6 +234,13 @@ module KabustationClient
234
234
  # Returns Auth Settings hash for api client.
235
235
  def auth_settings
236
236
  {
237
+ 'ApiKeyAuth' =>
238
+ {
239
+ type: 'api_key',
240
+ in: 'header',
241
+ key: 'X-API-Key',
242
+ value: api_key_with_prefix('ApiKeyAuth')
243
+ },
237
244
  }
238
245
  end
239
246
 
@@ -25,7 +25,7 @@ module KabustationClient
25
25
  # ヒット後執行条件<br> ※未設定の場合はエラーになります。<br> ※日通の注文で2以外が指定された場合はエラーになります。<br> ※日中、夜間の注文で1、2以外が指定された場合はエラーになります。<br> ※逆指値(成行)で有効期間条件(TimeInForce)にFAK以外を指定された場合はエラーになります。<br> ※逆指値(指値)で有効期間条件(TimeInForce)にFAS以外を指定された場合はエラーになります。 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>成行</td> </tr> <tr> <td>2</td> <td>指値</td> </tr> </tbody> </table>
26
26
  attr_accessor :after_hit_order_type
27
27
 
28
- # ヒット後注文価格<br> ※未設定の場合はエラーになります。<br> ※数字以外が設定された場合はエラーになります。<br><br> ヒット後執行条件に従い、下記のようにヒット後注文価格を設定してください。 <table> <thead> <tr> <th>ヒット後執行条件</th> <th>設定価格</th> </tr> </thead> <tbody> <tr> <td>成行</td> <td>0</td> </tr> <tr> <td>指値</td> <td>指値の単価</td> </tr> </tbody> </table>
28
+ # ヒット後注文価格<br> ※未設定の場合はエラーになります。<br> ※数字以外が設定された場合はエラーになります。<br><br> ヒット後執行条件に従い、下記のようにヒット後注文価格を設定してください。 <table> <thead> <tr> <th>ヒット後執行条件</th> <th>設定価格</th> </tr> </thead> <tbody> <tr> <td>成行</td> <td>0</td> </tr> <tr> <td>指値</td> <td>指値の単価</td> </tr> </tbody> </table>
29
29
  attr_accessor :after_hit_price
30
30
 
31
31
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -28,7 +28,7 @@ module KabustationClient
28
28
  # ヒット後執行条件<br> ※未設定の場合はエラーになります。<br> ※1、2、3以外が指定された場合はエラーになります。 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>成行</td> </tr> <tr> <td>2</td> <td>指値</td> </tr> <tr> <td>3</td> <td>不成</td> </tr> </tbody> </table>
29
29
  attr_accessor :after_hit_order_type
30
30
 
31
- # ヒット後注文価格<br> ※未設定の場合はエラーになります。<br> ※数字以外が設定された場合はエラーになります。<br><br> ヒット後執行条件に従い、下記のようにヒット後注文価格を設定してください。 <table> <thead> <tr> <th>ヒット後執行条件</th> <th>設定価格</th> </tr> </thead> <tbody> <tr> <td>成行</td> <td>0</td> </tr> <tr> <td>指値</td> <td>指値の単価</td> </tr> <tr> <td>不成</td> <td>不成の単価</td> </tr> </tbody> </table>
31
+ # ヒット後注文価格<br> ※未設定の場合はエラーになります。<br> ※数字以外が設定された場合はエラーになります。<br><br> ヒット後執行条件に従い、下記のようにヒット後注文価格を設定してください。 <table> <thead> <tr> <th>ヒット後執行条件</th> <th>設定価格</th> </tr> </thead> <tbody> <tr> <td>成行</td> <td>0</td> </tr> <tr> <td>指値</td> <td>指値の単価</td> </tr> <tr> <td>不成</td> <td>不成の単価</td> </tr> </tbody> </table>
32
32
  attr_accessor :after_hit_price
33
33
 
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,53 @@
1
+
2
+ require 'websocket-client-simple'
3
+ require 'json'
4
+
5
+ module KabustationClient
6
+ class PushClient
7
+ attr_reader :ws
8
+
9
+ def initialize(callbacks = {})
10
+ @callbacks = {
11
+ open: -> {},
12
+ message: -> (_board) {},
13
+ error: -> (_e) {},
14
+ close: -> (_e) {}
15
+ }.merge(callbacks)
16
+
17
+ config = Configuration.default
18
+
19
+ @uri = "ws://#{config.host}#{config.base_path}/websocket"
20
+ end
21
+
22
+ def connect
23
+ callbacks = @callbacks
24
+
25
+ @ws = WebSocket::Client::Simple.connect @uri do |ws|
26
+ ws.on :open do
27
+ callbacks[:open].call
28
+ end
29
+
30
+ ws.on :message do |msg|
31
+ data = msg.data.force_encoding("ASCII-8BIT").force_encoding('UTF-8')
32
+ json = JSON.parse(data)
33
+ board = KabustationClient::ApiClient.new.convert_to_type(json, 'BoardSuccess')
34
+
35
+ callbacks[:message].call(board)
36
+ end
37
+
38
+ ws.on :error do |e|
39
+ callbacks[:error].call(e)
40
+ end
41
+
42
+ ws.on :close do |e|
43
+ callbacks[:close].call(e)
44
+ end
45
+ end
46
+ end
47
+
48
+
49
+ def close
50
+ @ws.close
51
+ end
52
+ end
53
+ end
@@ -11,5 +11,5 @@ Generator version: 7.4.0
11
11
  =end
12
12
 
13
13
  module KabustationClient
14
- VERSION = '1.0.0'
14
+ VERSION = '1.2.0'
15
15
  end
@@ -93,6 +93,9 @@ require 'kabustation_client/api/order_api'
93
93
  require 'kabustation_client/api/register_api'
94
94
  require 'kabustation_client/api/wallet_api'
95
95
 
96
+ # WebSocket
97
+ require 'kabustation_client/push_client'
98
+
96
99
  module KabustationClient
97
100
  class << self
98
101
  # Customize default settings for the SDK using block.