kabustation_client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +188 -0
- data/Rakefile +10 -0
- data/docs/ApiSoftLimitResponse.md +32 -0
- data/docs/AuthApi.md +72 -0
- data/docs/BoardSuccess.md +142 -0
- data/docs/BoardSuccessBuy1.md +24 -0
- data/docs/BoardSuccessBuy10.md +20 -0
- data/docs/BoardSuccessBuy2.md +20 -0
- data/docs/BoardSuccessBuy3.md +20 -0
- data/docs/BoardSuccessBuy4.md +20 -0
- data/docs/BoardSuccessBuy5.md +20 -0
- data/docs/BoardSuccessBuy6.md +20 -0
- data/docs/BoardSuccessBuy7.md +20 -0
- data/docs/BoardSuccessBuy8.md +20 -0
- data/docs/BoardSuccessBuy9.md +20 -0
- data/docs/BoardSuccessSell1.md +24 -0
- data/docs/BoardSuccessSell10.md +20 -0
- data/docs/BoardSuccessSell2.md +20 -0
- data/docs/BoardSuccessSell3.md +20 -0
- data/docs/BoardSuccessSell4.md +20 -0
- data/docs/BoardSuccessSell5.md +20 -0
- data/docs/BoardSuccessSell6.md +20 -0
- data/docs/BoardSuccessSell7.md +20 -0
- data/docs/BoardSuccessSell8.md +20 -0
- data/docs/BoardSuccessSell9.md +20 -0
- data/docs/ErrorResponse.md +20 -0
- data/docs/ExchangeResponse.md +28 -0
- data/docs/InfoApi.md +924 -0
- data/docs/MarginPremiumResponse.md +22 -0
- data/docs/MarginPremiumResponseDayTrade.md +26 -0
- data/docs/MarginPremiumResponseGeneralMargin.md +26 -0
- data/docs/OrderApi.md +275 -0
- data/docs/OrderSuccess.md +20 -0
- data/docs/OrdersSuccess.md +58 -0
- data/docs/OrdersSuccessDetailsInner.md +44 -0
- data/docs/Positions.md +20 -0
- data/docs/PositionsDeriv.md +20 -0
- data/docs/PositionsSuccess.md +58 -0
- data/docs/PrimaryExchangeResponse.md +20 -0
- data/docs/RankingByCategoryResponse.md +22 -0
- data/docs/RankingByCategoryResponseRankingInner.md +34 -0
- data/docs/RankingByMarginResponse.md +22 -0
- data/docs/RankingByMarginResponseRankingInner.md +36 -0
- data/docs/RankingByTickCountResponse.md +22 -0
- data/docs/RankingByTickCountResponseRankingInner.md +46 -0
- data/docs/RankingByTradeValueResponse.md +22 -0
- data/docs/RankingByTradeValueResponseRankingInner.md +42 -0
- data/docs/RankingByTradeVolumeResponse.md +22 -0
- data/docs/RankingByTradeVolumeResponseRankingInner.md +42 -0
- data/docs/RankingDefaultResponse.md +22 -0
- data/docs/RankingDefaultResponseRankingInner.md +42 -0
- data/docs/RankingGet200Response.md +57 -0
- data/docs/RegistSuccess.md +18 -0
- data/docs/RegisterApi.md +206 -0
- data/docs/RegulationsResponse.md +20 -0
- data/docs/RegulationsResponseRegulationsInfoInner.md +30 -0
- data/docs/RequestCancelOrder.md +20 -0
- data/docs/RequestRegister.md +18 -0
- data/docs/RequestRegisterSymbolsInner.md +20 -0
- data/docs/RequestSendOrder.md +52 -0
- data/docs/RequestSendOrderDerivFuture.md +42 -0
- data/docs/RequestSendOrderDerivFutureReverseLimitOrder.md +24 -0
- data/docs/RequestSendOrderDerivOption.md +42 -0
- data/docs/RequestSendOrderReverseLimitOrder.md +26 -0
- data/docs/RequestToken.md +18 -0
- data/docs/RequestUnregister.md +18 -0
- data/docs/SymbolNameSuccess.md +20 -0
- data/docs/SymbolSuccess.md +64 -0
- data/docs/TokenSuccess.md +20 -0
- data/docs/UnregisterAllSuccess.md +18 -0
- data/docs/WalletApi.md +535 -0
- data/docs/WalletCashSuccess.md +22 -0
- data/docs/WalletFutureSuccess.md +22 -0
- data/docs/WalletMarginSuccess.md +24 -0
- data/docs/WalletOptionSuccess.md +22 -0
- data/git_push.sh +57 -0
- data/kabustation_client.gemspec +39 -0
- data/lib/kabustation_client/api/auth_api.rb +90 -0
- data/lib/kabustation_client/api/info_api.rb +1044 -0
- data/lib/kabustation_client/api/order_api.rb +322 -0
- data/lib/kabustation_client/api/register_api.rb +236 -0
- data/lib/kabustation_client/api/wallet_api.rb +558 -0
- data/lib/kabustation_client/api_client.rb +393 -0
- data/lib/kabustation_client/api_error.rb +58 -0
- data/lib/kabustation_client/configuration.rb +295 -0
- data/lib/kabustation_client/models/api_soft_limit_response.rb +285 -0
- data/lib/kabustation_client/models/board_success.rb +816 -0
- data/lib/kabustation_client/models/board_success_buy1.rb +246 -0
- data/lib/kabustation_client/models/board_success_buy10.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy2.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy3.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy4.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy5.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy6.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy7.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy8.rb +226 -0
- data/lib/kabustation_client/models/board_success_buy9.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell1.rb +246 -0
- data/lib/kabustation_client/models/board_success_sell10.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell2.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell3.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell4.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell5.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell6.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell7.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell8.rb +226 -0
- data/lib/kabustation_client/models/board_success_sell9.rb +226 -0
- data/lib/kabustation_client/models/error_response.rb +225 -0
- data/lib/kabustation_client/models/exchange_response.rb +265 -0
- data/lib/kabustation_client/models/margin_premium_response.rb +233 -0
- data/lib/kabustation_client/models/margin_premium_response_day_trade.rb +256 -0
- data/lib/kabustation_client/models/margin_premium_response_general_margin.rb +256 -0
- data/lib/kabustation_client/models/order_success.rb +225 -0
- data/lib/kabustation_client/models/orders_success.rb +417 -0
- data/lib/kabustation_client/models/orders_success_details_inner.rb +345 -0
- data/lib/kabustation_client/models/positions.rb +225 -0
- data/lib/kabustation_client/models/positions_deriv.rb +225 -0
- data/lib/kabustation_client/models/positions_success.rb +415 -0
- data/lib/kabustation_client/models/primary_exchange_response.rb +225 -0
- data/lib/kabustation_client/models/ranking_by_category_response.rb +237 -0
- data/lib/kabustation_client/models/ranking_by_category_response_ranking_inner.rb +295 -0
- data/lib/kabustation_client/models/ranking_by_margin_response.rb +237 -0
- data/lib/kabustation_client/models/ranking_by_margin_response_ranking_inner.rb +305 -0
- data/lib/kabustation_client/models/ranking_by_tick_count_response.rb +237 -0
- data/lib/kabustation_client/models/ranking_by_tick_count_response_ranking_inner.rb +355 -0
- data/lib/kabustation_client/models/ranking_by_trade_value_response.rb +237 -0
- data/lib/kabustation_client/models/ranking_by_trade_value_response_ranking_inner.rb +335 -0
- data/lib/kabustation_client/models/ranking_by_trade_volume_response.rb +237 -0
- data/lib/kabustation_client/models/ranking_by_trade_volume_response_ranking_inner.rb +335 -0
- data/lib/kabustation_client/models/ranking_default_response.rb +237 -0
- data/lib/kabustation_client/models/ranking_default_response_ranking_inner.rb +335 -0
- data/lib/kabustation_client/models/ranking_get200_response.rb +109 -0
- data/lib/kabustation_client/models/regist_success.rb +217 -0
- data/lib/kabustation_client/models/regulations_response.rb +227 -0
- data/lib/kabustation_client/models/regulations_response_regulations_info_inner.rb +275 -0
- data/lib/kabustation_client/models/request_cancel_order.rb +239 -0
- data/lib/kabustation_client/models/request_register.rb +216 -0
- data/lib/kabustation_client/models/request_register_symbols_inner.rb +225 -0
- data/lib/kabustation_client/models/request_send_order.rb +470 -0
- data/lib/kabustation_client/models/request_send_order_deriv_future.rb +406 -0
- data/lib/kabustation_client/models/request_send_order_deriv_future_reverse_limit_order.rb +274 -0
- data/lib/kabustation_client/models/request_send_order_deriv_option.rb +406 -0
- data/lib/kabustation_client/models/request_send_order_reverse_limit_order.rb +291 -0
- data/lib/kabustation_client/models/request_token.rb +222 -0
- data/lib/kabustation_client/models/request_unregister.rb +217 -0
- data/lib/kabustation_client/models/symbol_name_success.rb +225 -0
- data/lib/kabustation_client/models/symbol_success.rb +445 -0
- data/lib/kabustation_client/models/token_success.rb +225 -0
- data/lib/kabustation_client/models/unregister_all_success.rb +215 -0
- data/lib/kabustation_client/models/wallet_cash_success.rb +235 -0
- data/lib/kabustation_client/models/wallet_future_success.rb +235 -0
- data/lib/kabustation_client/models/wallet_margin_success.rb +245 -0
- data/lib/kabustation_client/models/wallet_option_success.rb +235 -0
- data/lib/kabustation_client/version.rb +15 -0
- data/lib/kabustation_client.rb +112 -0
- data/spec/api/auth_api_spec.rb +47 -0
- data/spec/api/info_api_spec.rb +222 -0
- data/spec/api/order_api_spec.rb +87 -0
- data/spec/api/register_api_spec.rb +73 -0
- data/spec/api/wallet_api_spec.rb +135 -0
- data/spec/models/api_soft_limit_response_spec.rb +78 -0
- data/spec/models/board_success_buy10_spec.rb +42 -0
- data/spec/models/board_success_buy1_spec.rb +54 -0
- data/spec/models/board_success_buy2_spec.rb +42 -0
- data/spec/models/board_success_buy3_spec.rb +42 -0
- data/spec/models/board_success_buy4_spec.rb +42 -0
- data/spec/models/board_success_buy5_spec.rb +42 -0
- data/spec/models/board_success_buy6_spec.rb +42 -0
- data/spec/models/board_success_buy7_spec.rb +42 -0
- data/spec/models/board_success_buy8_spec.rb +42 -0
- data/spec/models/board_success_buy9_spec.rb +42 -0
- data/spec/models/board_success_sell10_spec.rb +42 -0
- data/spec/models/board_success_sell1_spec.rb +54 -0
- data/spec/models/board_success_sell2_spec.rb +42 -0
- data/spec/models/board_success_sell3_spec.rb +42 -0
- data/spec/models/board_success_sell4_spec.rb +42 -0
- data/spec/models/board_success_sell5_spec.rb +42 -0
- data/spec/models/board_success_sell6_spec.rb +42 -0
- data/spec/models/board_success_sell7_spec.rb +42 -0
- data/spec/models/board_success_sell8_spec.rb +42 -0
- data/spec/models/board_success_sell9_spec.rb +42 -0
- data/spec/models/board_success_spec.rb +408 -0
- data/spec/models/error_response_spec.rb +42 -0
- data/spec/models/exchange_response_spec.rb +66 -0
- data/spec/models/margin_premium_response_day_trade_spec.rb +60 -0
- data/spec/models/margin_premium_response_general_margin_spec.rb +60 -0
- data/spec/models/margin_premium_response_spec.rb +48 -0
- data/spec/models/order_success_spec.rb +42 -0
- data/spec/models/orders_success_details_inner_spec.rb +114 -0
- data/spec/models/orders_success_spec.rb +156 -0
- data/spec/models/positions_deriv_spec.rb +42 -0
- data/spec/models/positions_spec.rb +42 -0
- data/spec/models/positions_success_spec.rb +156 -0
- data/spec/models/primary_exchange_response_spec.rb +42 -0
- data/spec/models/ranking_by_category_response_ranking_inner_spec.rb +84 -0
- data/spec/models/ranking_by_category_response_spec.rb +48 -0
- data/spec/models/ranking_by_margin_response_ranking_inner_spec.rb +90 -0
- data/spec/models/ranking_by_margin_response_spec.rb +48 -0
- data/spec/models/ranking_by_tick_count_response_ranking_inner_spec.rb +120 -0
- data/spec/models/ranking_by_tick_count_response_spec.rb +48 -0
- data/spec/models/ranking_by_trade_value_response_ranking_inner_spec.rb +108 -0
- data/spec/models/ranking_by_trade_value_response_spec.rb +48 -0
- data/spec/models/ranking_by_trade_volume_response_ranking_inner_spec.rb +108 -0
- data/spec/models/ranking_by_trade_volume_response_spec.rb +48 -0
- data/spec/models/ranking_default_response_ranking_inner_spec.rb +108 -0
- data/spec/models/ranking_default_response_spec.rb +48 -0
- data/spec/models/ranking_get200_response_spec.rb +32 -0
- data/spec/models/regist_success_spec.rb +36 -0
- data/spec/models/regulations_response_regulations_info_inner_spec.rb +72 -0
- data/spec/models/regulations_response_spec.rb +42 -0
- data/spec/models/request_cancel_order_spec.rb +42 -0
- data/spec/models/request_register_spec.rb +36 -0
- data/spec/models/request_register_symbols_inner_spec.rb +42 -0
- data/spec/models/request_send_order_deriv_future_reverse_limit_order_spec.rb +54 -0
- data/spec/models/request_send_order_deriv_future_spec.rb +108 -0
- data/spec/models/request_send_order_deriv_option_spec.rb +108 -0
- data/spec/models/request_send_order_reverse_limit_order_spec.rb +60 -0
- data/spec/models/request_send_order_spec.rb +138 -0
- data/spec/models/request_token_spec.rb +36 -0
- data/spec/models/request_unregister_spec.rb +36 -0
- data/spec/models/symbol_name_success_spec.rb +42 -0
- data/spec/models/symbol_success_spec.rb +174 -0
- data/spec/models/token_success_spec.rb +42 -0
- data/spec/models/unregister_all_success_spec.rb +36 -0
- data/spec/models/wallet_cash_success_spec.rb +48 -0
- data/spec/models/wallet_future_success_spec.rb +48 -0
- data/spec/models/wallet_margin_success_spec.rb +54 -0
- data/spec/models/wallet_option_success_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +387 -0
@@ -0,0 +1,322 @@
|
|
1
|
+
=begin
|
2
|
+
#kabuステーションAPI
|
3
|
+
|
4
|
+
## 定義情報 REST APIのコード一覧、エンドポイントは下記リンク参照 - [REST APIコード一覧](../ptal/error.html)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.5
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module KabustationClient
|
16
|
+
class OrderApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# 注文取消
|
23
|
+
# 注文を取消します
|
24
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
25
|
+
# @param request_cancel_order [RequestCancelOrder]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [OrderSuccess]
|
28
|
+
def cancelorder_put(x_api_key, request_cancel_order, opts = {})
|
29
|
+
data, _status_code, _headers = cancelorder_put_with_http_info(x_api_key, request_cancel_order, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# 注文取消
|
34
|
+
# 注文を取消します
|
35
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
36
|
+
# @param request_cancel_order [RequestCancelOrder]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(OrderSuccess, Integer, Hash)>] OrderSuccess data, response status code and response headers
|
39
|
+
def cancelorder_put_with_http_info(x_api_key, request_cancel_order, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.cancelorder_put ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'x_api_key' is set
|
44
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling OrderApi.cancelorder_put"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'request_cancel_order' is set
|
48
|
+
if @api_client.config.client_side_validation && request_cancel_order.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'request_cancel_order' when calling OrderApi.cancelorder_put"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/cancelorder'
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = opts[:header_params] || {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
63
|
+
if !content_type.nil?
|
64
|
+
header_params['Content-Type'] = content_type
|
65
|
+
end
|
66
|
+
header_params[:'X-API-KEY'] = x_api_key
|
67
|
+
|
68
|
+
# form parameters
|
69
|
+
form_params = opts[:form_params] || {}
|
70
|
+
|
71
|
+
# http body (model)
|
72
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_cancel_order)
|
73
|
+
|
74
|
+
# return_type
|
75
|
+
return_type = opts[:debug_return_type] || 'OrderSuccess'
|
76
|
+
|
77
|
+
# auth_names
|
78
|
+
auth_names = opts[:debug_auth_names] || []
|
79
|
+
|
80
|
+
new_options = opts.merge(
|
81
|
+
:operation => :"OrderApi.cancelorder_put",
|
82
|
+
:header_params => header_params,
|
83
|
+
:query_params => query_params,
|
84
|
+
:form_params => form_params,
|
85
|
+
:body => post_body,
|
86
|
+
:auth_names => auth_names,
|
87
|
+
:return_type => return_type
|
88
|
+
)
|
89
|
+
|
90
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug "API called: OrderApi#cancelorder_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
|
+
end
|
94
|
+
return data, status_code, headers
|
95
|
+
end
|
96
|
+
|
97
|
+
# 注文発注(先物)
|
98
|
+
# 先物銘柄の注文を発注します。<br> 同一の銘柄に対しての注文は同時に5件ほどを上限としてご利用ください。
|
99
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
100
|
+
# @param request_send_order_deriv_future [RequestSendOrderDerivFuture]
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [OrderSuccess]
|
103
|
+
def sendoder_future_post(x_api_key, request_send_order_deriv_future, opts = {})
|
104
|
+
data, _status_code, _headers = sendoder_future_post_with_http_info(x_api_key, request_send_order_deriv_future, opts)
|
105
|
+
data
|
106
|
+
end
|
107
|
+
|
108
|
+
# 注文発注(先物)
|
109
|
+
# 先物銘柄の注文を発注します。<br> 同一の銘柄に対しての注文は同時に5件ほどを上限としてご利用ください。
|
110
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
111
|
+
# @param request_send_order_deriv_future [RequestSendOrderDerivFuture]
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Array<(OrderSuccess, Integer, Hash)>] OrderSuccess data, response status code and response headers
|
114
|
+
def sendoder_future_post_with_http_info(x_api_key, request_send_order_deriv_future, opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.sendoder_future_post ...'
|
117
|
+
end
|
118
|
+
# verify the required parameter 'x_api_key' is set
|
119
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling OrderApi.sendoder_future_post"
|
121
|
+
end
|
122
|
+
# verify the required parameter 'request_send_order_deriv_future' is set
|
123
|
+
if @api_client.config.client_side_validation && request_send_order_deriv_future.nil?
|
124
|
+
fail ArgumentError, "Missing the required parameter 'request_send_order_deriv_future' when calling OrderApi.sendoder_future_post"
|
125
|
+
end
|
126
|
+
# resource path
|
127
|
+
local_var_path = '/sendorder/future'
|
128
|
+
|
129
|
+
# query parameters
|
130
|
+
query_params = opts[:query_params] || {}
|
131
|
+
|
132
|
+
# header parameters
|
133
|
+
header_params = opts[:header_params] || {}
|
134
|
+
# HTTP header 'Accept' (if needed)
|
135
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
136
|
+
# HTTP header 'Content-Type'
|
137
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
138
|
+
if !content_type.nil?
|
139
|
+
header_params['Content-Type'] = content_type
|
140
|
+
end
|
141
|
+
header_params[:'X-API-KEY'] = x_api_key
|
142
|
+
|
143
|
+
# form parameters
|
144
|
+
form_params = opts[:form_params] || {}
|
145
|
+
|
146
|
+
# http body (model)
|
147
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_send_order_deriv_future)
|
148
|
+
|
149
|
+
# return_type
|
150
|
+
return_type = opts[:debug_return_type] || 'OrderSuccess'
|
151
|
+
|
152
|
+
# auth_names
|
153
|
+
auth_names = opts[:debug_auth_names] || []
|
154
|
+
|
155
|
+
new_options = opts.merge(
|
156
|
+
:operation => :"OrderApi.sendoder_future_post",
|
157
|
+
:header_params => header_params,
|
158
|
+
:query_params => query_params,
|
159
|
+
:form_params => form_params,
|
160
|
+
:body => post_body,
|
161
|
+
:auth_names => auth_names,
|
162
|
+
:return_type => return_type
|
163
|
+
)
|
164
|
+
|
165
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug "API called: OrderApi#sendoder_future_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
|
+
end
|
169
|
+
return data, status_code, headers
|
170
|
+
end
|
171
|
+
|
172
|
+
# 注文発注(オプション)
|
173
|
+
# オプション銘柄の注文を発注します。<br> 同一の銘柄に対しての注文は同時に5件ほどを上限としてご利用ください。
|
174
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
175
|
+
# @param request_send_order_deriv_option [RequestSendOrderDerivOption]
|
176
|
+
# @param [Hash] opts the optional parameters
|
177
|
+
# @return [OrderSuccess]
|
178
|
+
def sendorder_option_post(x_api_key, request_send_order_deriv_option, opts = {})
|
179
|
+
data, _status_code, _headers = sendorder_option_post_with_http_info(x_api_key, request_send_order_deriv_option, opts)
|
180
|
+
data
|
181
|
+
end
|
182
|
+
|
183
|
+
# 注文発注(オプション)
|
184
|
+
# オプション銘柄の注文を発注します。<br> 同一の銘柄に対しての注文は同時に5件ほどを上限としてご利用ください。
|
185
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
186
|
+
# @param request_send_order_deriv_option [RequestSendOrderDerivOption]
|
187
|
+
# @param [Hash] opts the optional parameters
|
188
|
+
# @return [Array<(OrderSuccess, Integer, Hash)>] OrderSuccess data, response status code and response headers
|
189
|
+
def sendorder_option_post_with_http_info(x_api_key, request_send_order_deriv_option, opts = {})
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.sendorder_option_post ...'
|
192
|
+
end
|
193
|
+
# verify the required parameter 'x_api_key' is set
|
194
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
195
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling OrderApi.sendorder_option_post"
|
196
|
+
end
|
197
|
+
# verify the required parameter 'request_send_order_deriv_option' is set
|
198
|
+
if @api_client.config.client_side_validation && request_send_order_deriv_option.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'request_send_order_deriv_option' when calling OrderApi.sendorder_option_post"
|
200
|
+
end
|
201
|
+
# resource path
|
202
|
+
local_var_path = '/sendorder/option'
|
203
|
+
|
204
|
+
# query parameters
|
205
|
+
query_params = opts[:query_params] || {}
|
206
|
+
|
207
|
+
# header parameters
|
208
|
+
header_params = opts[:header_params] || {}
|
209
|
+
# HTTP header 'Accept' (if needed)
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
211
|
+
# HTTP header 'Content-Type'
|
212
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
213
|
+
if !content_type.nil?
|
214
|
+
header_params['Content-Type'] = content_type
|
215
|
+
end
|
216
|
+
header_params[:'X-API-KEY'] = x_api_key
|
217
|
+
|
218
|
+
# form parameters
|
219
|
+
form_params = opts[:form_params] || {}
|
220
|
+
|
221
|
+
# http body (model)
|
222
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_send_order_deriv_option)
|
223
|
+
|
224
|
+
# return_type
|
225
|
+
return_type = opts[:debug_return_type] || 'OrderSuccess'
|
226
|
+
|
227
|
+
# auth_names
|
228
|
+
auth_names = opts[:debug_auth_names] || []
|
229
|
+
|
230
|
+
new_options = opts.merge(
|
231
|
+
:operation => :"OrderApi.sendorder_option_post",
|
232
|
+
:header_params => header_params,
|
233
|
+
:query_params => query_params,
|
234
|
+
:form_params => form_params,
|
235
|
+
:body => post_body,
|
236
|
+
:auth_names => auth_names,
|
237
|
+
:return_type => return_type
|
238
|
+
)
|
239
|
+
|
240
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug "API called: OrderApi#sendorder_option_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
243
|
+
end
|
244
|
+
return data, status_code, headers
|
245
|
+
end
|
246
|
+
|
247
|
+
# 注文発注(現物・信用)
|
248
|
+
# 注文を発注します。<br> 同一の銘柄に対しての注文は同時に5件ほどを上限としてご利用ください。
|
249
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
250
|
+
# @param request_send_order [RequestSendOrder]
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @return [OrderSuccess]
|
253
|
+
def sendorder_post(x_api_key, request_send_order, opts = {})
|
254
|
+
data, _status_code, _headers = sendorder_post_with_http_info(x_api_key, request_send_order, opts)
|
255
|
+
data
|
256
|
+
end
|
257
|
+
|
258
|
+
# 注文発注(現物・信用)
|
259
|
+
# 注文を発注します。<br> 同一の銘柄に対しての注文は同時に5件ほどを上限としてご利用ください。
|
260
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
261
|
+
# @param request_send_order [RequestSendOrder]
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @return [Array<(OrderSuccess, Integer, Hash)>] OrderSuccess data, response status code and response headers
|
264
|
+
def sendorder_post_with_http_info(x_api_key, request_send_order, opts = {})
|
265
|
+
if @api_client.config.debugging
|
266
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.sendorder_post ...'
|
267
|
+
end
|
268
|
+
# verify the required parameter 'x_api_key' is set
|
269
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
270
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling OrderApi.sendorder_post"
|
271
|
+
end
|
272
|
+
# verify the required parameter 'request_send_order' is set
|
273
|
+
if @api_client.config.client_side_validation && request_send_order.nil?
|
274
|
+
fail ArgumentError, "Missing the required parameter 'request_send_order' when calling OrderApi.sendorder_post"
|
275
|
+
end
|
276
|
+
# resource path
|
277
|
+
local_var_path = '/sendorder'
|
278
|
+
|
279
|
+
# query parameters
|
280
|
+
query_params = opts[:query_params] || {}
|
281
|
+
|
282
|
+
# header parameters
|
283
|
+
header_params = opts[:header_params] || {}
|
284
|
+
# HTTP header 'Accept' (if needed)
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
286
|
+
# HTTP header 'Content-Type'
|
287
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
288
|
+
if !content_type.nil?
|
289
|
+
header_params['Content-Type'] = content_type
|
290
|
+
end
|
291
|
+
header_params[:'X-API-KEY'] = x_api_key
|
292
|
+
|
293
|
+
# form parameters
|
294
|
+
form_params = opts[:form_params] || {}
|
295
|
+
|
296
|
+
# http body (model)
|
297
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_send_order)
|
298
|
+
|
299
|
+
# return_type
|
300
|
+
return_type = opts[:debug_return_type] || 'OrderSuccess'
|
301
|
+
|
302
|
+
# auth_names
|
303
|
+
auth_names = opts[:debug_auth_names] || []
|
304
|
+
|
305
|
+
new_options = opts.merge(
|
306
|
+
:operation => :"OrderApi.sendorder_post",
|
307
|
+
:header_params => header_params,
|
308
|
+
:query_params => query_params,
|
309
|
+
:form_params => form_params,
|
310
|
+
:body => post_body,
|
311
|
+
:auth_names => auth_names,
|
312
|
+
:return_type => return_type
|
313
|
+
)
|
314
|
+
|
315
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
316
|
+
if @api_client.config.debugging
|
317
|
+
@api_client.config.logger.debug "API called: OrderApi#sendorder_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
318
|
+
end
|
319
|
+
return data, status_code, headers
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
@@ -0,0 +1,236 @@
|
|
1
|
+
=begin
|
2
|
+
#kabuステーションAPI
|
3
|
+
|
4
|
+
## 定義情報 REST APIのコード一覧、エンドポイントは下記リンク参照 - [REST APIコード一覧](../ptal/error.html)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.5
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module KabustationClient
|
16
|
+
class RegisterApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# 銘柄登録
|
23
|
+
# PUSH配信する銘柄を登録します。<br> API登録銘柄リストを開くには、kabuステーションAPIインジケーターを右クリックし「API登録銘柄リスト」を選択してください。
|
24
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
25
|
+
# @param request_register [RequestRegister] 登録する銘柄のリスト
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [RegistSuccess]
|
28
|
+
def register_put(x_api_key, request_register, opts = {})
|
29
|
+
data, _status_code, _headers = register_put_with_http_info(x_api_key, request_register, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# 銘柄登録
|
34
|
+
# PUSH配信する銘柄を登録します。<br> API登録銘柄リストを開くには、kabuステーションAPIインジケーターを右クリックし「API登録銘柄リスト」を選択してください。
|
35
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
36
|
+
# @param request_register [RequestRegister] 登録する銘柄のリスト
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(RegistSuccess, Integer, Hash)>] RegistSuccess data, response status code and response headers
|
39
|
+
def register_put_with_http_info(x_api_key, request_register, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: RegisterApi.register_put ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'x_api_key' is set
|
44
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling RegisterApi.register_put"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'request_register' is set
|
48
|
+
if @api_client.config.client_side_validation && request_register.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'request_register' when calling RegisterApi.register_put"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/register'
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
|
57
|
+
# header parameters
|
58
|
+
header_params = opts[:header_params] || {}
|
59
|
+
# HTTP header 'Accept' (if needed)
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
63
|
+
if !content_type.nil?
|
64
|
+
header_params['Content-Type'] = content_type
|
65
|
+
end
|
66
|
+
header_params[:'X-API-KEY'] = x_api_key
|
67
|
+
|
68
|
+
# form parameters
|
69
|
+
form_params = opts[:form_params] || {}
|
70
|
+
|
71
|
+
# http body (model)
|
72
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_register)
|
73
|
+
|
74
|
+
# return_type
|
75
|
+
return_type = opts[:debug_return_type] || 'RegistSuccess'
|
76
|
+
|
77
|
+
# auth_names
|
78
|
+
auth_names = opts[:debug_auth_names] || []
|
79
|
+
|
80
|
+
new_options = opts.merge(
|
81
|
+
:operation => :"RegisterApi.register_put",
|
82
|
+
:header_params => header_params,
|
83
|
+
:query_params => query_params,
|
84
|
+
:form_params => form_params,
|
85
|
+
:body => post_body,
|
86
|
+
:auth_names => auth_names,
|
87
|
+
:return_type => return_type
|
88
|
+
)
|
89
|
+
|
90
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug "API called: RegisterApi#register_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
|
+
end
|
94
|
+
return data, status_code, headers
|
95
|
+
end
|
96
|
+
|
97
|
+
# 銘柄登録全解除
|
98
|
+
# API登録銘柄リストに登録されている銘柄をすべて解除します
|
99
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [UnregisterAllSuccess]
|
102
|
+
def unregister_all_put(x_api_key, opts = {})
|
103
|
+
data, _status_code, _headers = unregister_all_put_with_http_info(x_api_key, opts)
|
104
|
+
data
|
105
|
+
end
|
106
|
+
|
107
|
+
# 銘柄登録全解除
|
108
|
+
# API登録銘柄リストに登録されている銘柄をすべて解除します
|
109
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [Array<(UnregisterAllSuccess, Integer, Hash)>] UnregisterAllSuccess data, response status code and response headers
|
112
|
+
def unregister_all_put_with_http_info(x_api_key, opts = {})
|
113
|
+
if @api_client.config.debugging
|
114
|
+
@api_client.config.logger.debug 'Calling API: RegisterApi.unregister_all_put ...'
|
115
|
+
end
|
116
|
+
# verify the required parameter 'x_api_key' is set
|
117
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
118
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling RegisterApi.unregister_all_put"
|
119
|
+
end
|
120
|
+
# resource path
|
121
|
+
local_var_path = '/unregister/all'
|
122
|
+
|
123
|
+
# query parameters
|
124
|
+
query_params = opts[:query_params] || {}
|
125
|
+
|
126
|
+
# header parameters
|
127
|
+
header_params = opts[:header_params] || {}
|
128
|
+
# HTTP header 'Accept' (if needed)
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
130
|
+
header_params[:'X-API-KEY'] = x_api_key
|
131
|
+
|
132
|
+
# form parameters
|
133
|
+
form_params = opts[:form_params] || {}
|
134
|
+
|
135
|
+
# http body (model)
|
136
|
+
post_body = opts[:debug_body]
|
137
|
+
|
138
|
+
# return_type
|
139
|
+
return_type = opts[:debug_return_type] || 'UnregisterAllSuccess'
|
140
|
+
|
141
|
+
# auth_names
|
142
|
+
auth_names = opts[:debug_auth_names] || []
|
143
|
+
|
144
|
+
new_options = opts.merge(
|
145
|
+
:operation => :"RegisterApi.unregister_all_put",
|
146
|
+
:header_params => header_params,
|
147
|
+
:query_params => query_params,
|
148
|
+
:form_params => form_params,
|
149
|
+
:body => post_body,
|
150
|
+
:auth_names => auth_names,
|
151
|
+
:return_type => return_type
|
152
|
+
)
|
153
|
+
|
154
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
155
|
+
if @api_client.config.debugging
|
156
|
+
@api_client.config.logger.debug "API called: RegisterApi#unregister_all_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
157
|
+
end
|
158
|
+
return data, status_code, headers
|
159
|
+
end
|
160
|
+
|
161
|
+
# 銘柄登録解除
|
162
|
+
# API登録銘柄リストに登録されている銘柄を解除します
|
163
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
164
|
+
# @param request_unregister [RequestUnregister] 登録解除する銘柄のリスト
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @return [RegistSuccess]
|
167
|
+
def unregister_put(x_api_key, request_unregister, opts = {})
|
168
|
+
data, _status_code, _headers = unregister_put_with_http_info(x_api_key, request_unregister, opts)
|
169
|
+
data
|
170
|
+
end
|
171
|
+
|
172
|
+
# 銘柄登録解除
|
173
|
+
# API登録銘柄リストに登録されている銘柄を解除します
|
174
|
+
# @param x_api_key [String] トークン発行メソッドで取得した文字列
|
175
|
+
# @param request_unregister [RequestUnregister] 登録解除する銘柄のリスト
|
176
|
+
# @param [Hash] opts the optional parameters
|
177
|
+
# @return [Array<(RegistSuccess, Integer, Hash)>] RegistSuccess data, response status code and response headers
|
178
|
+
def unregister_put_with_http_info(x_api_key, request_unregister, opts = {})
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug 'Calling API: RegisterApi.unregister_put ...'
|
181
|
+
end
|
182
|
+
# verify the required parameter 'x_api_key' is set
|
183
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling RegisterApi.unregister_put"
|
185
|
+
end
|
186
|
+
# verify the required parameter 'request_unregister' is set
|
187
|
+
if @api_client.config.client_side_validation && request_unregister.nil?
|
188
|
+
fail ArgumentError, "Missing the required parameter 'request_unregister' when calling RegisterApi.unregister_put"
|
189
|
+
end
|
190
|
+
# resource path
|
191
|
+
local_var_path = '/unregister'
|
192
|
+
|
193
|
+
# query parameters
|
194
|
+
query_params = opts[:query_params] || {}
|
195
|
+
|
196
|
+
# header parameters
|
197
|
+
header_params = opts[:header_params] || {}
|
198
|
+
# HTTP header 'Accept' (if needed)
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
200
|
+
# HTTP header 'Content-Type'
|
201
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
202
|
+
if !content_type.nil?
|
203
|
+
header_params['Content-Type'] = content_type
|
204
|
+
end
|
205
|
+
header_params[:'X-API-KEY'] = x_api_key
|
206
|
+
|
207
|
+
# form parameters
|
208
|
+
form_params = opts[:form_params] || {}
|
209
|
+
|
210
|
+
# http body (model)
|
211
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_unregister)
|
212
|
+
|
213
|
+
# return_type
|
214
|
+
return_type = opts[:debug_return_type] || 'RegistSuccess'
|
215
|
+
|
216
|
+
# auth_names
|
217
|
+
auth_names = opts[:debug_auth_names] || []
|
218
|
+
|
219
|
+
new_options = opts.merge(
|
220
|
+
:operation => :"RegisterApi.unregister_put",
|
221
|
+
:header_params => header_params,
|
222
|
+
:query_params => query_params,
|
223
|
+
:form_params => form_params,
|
224
|
+
:body => post_body,
|
225
|
+
:auth_names => auth_names,
|
226
|
+
:return_type => return_type
|
227
|
+
)
|
228
|
+
|
229
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: RegisterApi#unregister_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
return data, status_code, headers
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|