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
data/docs/WalletApi.md
ADDED
@@ -0,0 +1,535 @@
|
|
1
|
+
# KabustationClient::WalletApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:18080/kabusapi*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**wallet_cash_get**](WalletApi.md#wallet_cash_get) | **GET** /wallet/cash | 取引余力(現物) |
|
8
|
+
| [**wallet_cash_symbol_get**](WalletApi.md#wallet_cash_symbol_get) | **GET** /wallet/cash/{symbol} | 取引余力(現物)(銘柄指定) |
|
9
|
+
| [**wallet_future_get**](WalletApi.md#wallet_future_get) | **GET** /wallet/future | 取引余力(先物) |
|
10
|
+
| [**wallet_future_symbol_get**](WalletApi.md#wallet_future_symbol_get) | **GET** /wallet/future/{symbol} | 取引余力(先物)(銘柄指定) |
|
11
|
+
| [**wallet_margin_get**](WalletApi.md#wallet_margin_get) | **GET** /wallet/margin | 取引余力(信用) |
|
12
|
+
| [**wallet_margin_symbol_get**](WalletApi.md#wallet_margin_symbol_get) | **GET** /wallet/margin/{symbol} | 取引余力(信用)(銘柄指定) |
|
13
|
+
| [**wallet_option_get**](WalletApi.md#wallet_option_get) | **GET** /wallet/option | 取引余力(オプション) |
|
14
|
+
| [**wallet_option_symbol_get**](WalletApi.md#wallet_option_symbol_get) | **GET** /wallet/option/{symbol} | 取引余力(オプション)(銘柄指定) |
|
15
|
+
|
16
|
+
|
17
|
+
## wallet_cash_get
|
18
|
+
|
19
|
+
> <WalletCashSuccess> wallet_cash_get(x_api_key)
|
20
|
+
|
21
|
+
取引余力(現物)
|
22
|
+
|
23
|
+
口座の取引余力(現物)を取得します
|
24
|
+
|
25
|
+
### Examples
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'time'
|
29
|
+
require 'kabustation_client'
|
30
|
+
|
31
|
+
api_instance = KabustationClient::WalletApi.new
|
32
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
33
|
+
|
34
|
+
begin
|
35
|
+
# 取引余力(現物)
|
36
|
+
result = api_instance.wallet_cash_get(x_api_key)
|
37
|
+
p result
|
38
|
+
rescue KabustationClient::ApiError => e
|
39
|
+
puts "Error when calling WalletApi->wallet_cash_get: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
#### Using the wallet_cash_get_with_http_info variant
|
44
|
+
|
45
|
+
This returns an Array which contains the response data, status code and headers.
|
46
|
+
|
47
|
+
> <Array(<WalletCashSuccess>, Integer, Hash)> wallet_cash_get_with_http_info(x_api_key)
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
begin
|
51
|
+
# 取引余力(現物)
|
52
|
+
data, status_code, headers = api_instance.wallet_cash_get_with_http_info(x_api_key)
|
53
|
+
p status_code # => 2xx
|
54
|
+
p headers # => { ... }
|
55
|
+
p data # => <WalletCashSuccess>
|
56
|
+
rescue KabustationClient::ApiError => e
|
57
|
+
puts "Error when calling WalletApi->wallet_cash_get_with_http_info: #{e}"
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
### Parameters
|
62
|
+
|
63
|
+
| Name | Type | Description | Notes |
|
64
|
+
| ---- | ---- | ----------- | ----- |
|
65
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
66
|
+
|
67
|
+
### Return type
|
68
|
+
|
69
|
+
[**WalletCashSuccess**](WalletCashSuccess.md)
|
70
|
+
|
71
|
+
### Authorization
|
72
|
+
|
73
|
+
No authorization required
|
74
|
+
|
75
|
+
### HTTP request headers
|
76
|
+
|
77
|
+
- **Content-Type**: Not defined
|
78
|
+
- **Accept**: application/json
|
79
|
+
|
80
|
+
|
81
|
+
## wallet_cash_symbol_get
|
82
|
+
|
83
|
+
> <WalletCashSuccess> wallet_cash_symbol_get(x_api_key, symbol)
|
84
|
+
|
85
|
+
取引余力(現物)(銘柄指定)
|
86
|
+
|
87
|
+
指定した銘柄の取引余力(現物)を取得します
|
88
|
+
|
89
|
+
### Examples
|
90
|
+
|
91
|
+
```ruby
|
92
|
+
require 'time'
|
93
|
+
require 'kabustation_client'
|
94
|
+
|
95
|
+
api_instance = KabustationClient::WalletApi.new
|
96
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
97
|
+
symbol = 'symbol_example' # String | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 <b>市場コード</b> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>東証</td> </tr> <tr> <td>3</td> <td>名証</td> </tr> <tr> <td>5</td> <td>福証</td> </tr> <tr> <td>6</td> <td>札証</td> </tr> </tbody> </table>
|
98
|
+
|
99
|
+
begin
|
100
|
+
# 取引余力(現物)(銘柄指定)
|
101
|
+
result = api_instance.wallet_cash_symbol_get(x_api_key, symbol)
|
102
|
+
p result
|
103
|
+
rescue KabustationClient::ApiError => e
|
104
|
+
puts "Error when calling WalletApi->wallet_cash_symbol_get: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Using the wallet_cash_symbol_get_with_http_info variant
|
109
|
+
|
110
|
+
This returns an Array which contains the response data, status code and headers.
|
111
|
+
|
112
|
+
> <Array(<WalletCashSuccess>, Integer, Hash)> wallet_cash_symbol_get_with_http_info(x_api_key, symbol)
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
begin
|
116
|
+
# 取引余力(現物)(銘柄指定)
|
117
|
+
data, status_code, headers = api_instance.wallet_cash_symbol_get_with_http_info(x_api_key, symbol)
|
118
|
+
p status_code # => 2xx
|
119
|
+
p headers # => { ... }
|
120
|
+
p data # => <WalletCashSuccess>
|
121
|
+
rescue KabustationClient::ApiError => e
|
122
|
+
puts "Error when calling WalletApi->wallet_cash_symbol_get_with_http_info: #{e}"
|
123
|
+
end
|
124
|
+
```
|
125
|
+
|
126
|
+
### Parameters
|
127
|
+
|
128
|
+
| Name | Type | Description | Notes |
|
129
|
+
| ---- | ---- | ----------- | ----- |
|
130
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
131
|
+
| **symbol** | **String** | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 <b>市場コード</b> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>東証</td> </tr> <tr> <td>3</td> <td>名証</td> </tr> <tr> <td>5</td> <td>福証</td> </tr> <tr> <td>6</td> <td>札証</td> </tr> </tbody> </table> | |
|
132
|
+
|
133
|
+
### Return type
|
134
|
+
|
135
|
+
[**WalletCashSuccess**](WalletCashSuccess.md)
|
136
|
+
|
137
|
+
### Authorization
|
138
|
+
|
139
|
+
No authorization required
|
140
|
+
|
141
|
+
### HTTP request headers
|
142
|
+
|
143
|
+
- **Content-Type**: Not defined
|
144
|
+
- **Accept**: application/json
|
145
|
+
|
146
|
+
|
147
|
+
## wallet_future_get
|
148
|
+
|
149
|
+
> <WalletFutureSuccess> wallet_future_get(x_api_key)
|
150
|
+
|
151
|
+
取引余力(先物)
|
152
|
+
|
153
|
+
口座の取引余力(先物)を取得します
|
154
|
+
|
155
|
+
### Examples
|
156
|
+
|
157
|
+
```ruby
|
158
|
+
require 'time'
|
159
|
+
require 'kabustation_client'
|
160
|
+
|
161
|
+
api_instance = KabustationClient::WalletApi.new
|
162
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
163
|
+
|
164
|
+
begin
|
165
|
+
# 取引余力(先物)
|
166
|
+
result = api_instance.wallet_future_get(x_api_key)
|
167
|
+
p result
|
168
|
+
rescue KabustationClient::ApiError => e
|
169
|
+
puts "Error when calling WalletApi->wallet_future_get: #{e}"
|
170
|
+
end
|
171
|
+
```
|
172
|
+
|
173
|
+
#### Using the wallet_future_get_with_http_info variant
|
174
|
+
|
175
|
+
This returns an Array which contains the response data, status code and headers.
|
176
|
+
|
177
|
+
> <Array(<WalletFutureSuccess>, Integer, Hash)> wallet_future_get_with_http_info(x_api_key)
|
178
|
+
|
179
|
+
```ruby
|
180
|
+
begin
|
181
|
+
# 取引余力(先物)
|
182
|
+
data, status_code, headers = api_instance.wallet_future_get_with_http_info(x_api_key)
|
183
|
+
p status_code # => 2xx
|
184
|
+
p headers # => { ... }
|
185
|
+
p data # => <WalletFutureSuccess>
|
186
|
+
rescue KabustationClient::ApiError => e
|
187
|
+
puts "Error when calling WalletApi->wallet_future_get_with_http_info: #{e}"
|
188
|
+
end
|
189
|
+
```
|
190
|
+
|
191
|
+
### Parameters
|
192
|
+
|
193
|
+
| Name | Type | Description | Notes |
|
194
|
+
| ---- | ---- | ----------- | ----- |
|
195
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
196
|
+
|
197
|
+
### Return type
|
198
|
+
|
199
|
+
[**WalletFutureSuccess**](WalletFutureSuccess.md)
|
200
|
+
|
201
|
+
### Authorization
|
202
|
+
|
203
|
+
No authorization required
|
204
|
+
|
205
|
+
### HTTP request headers
|
206
|
+
|
207
|
+
- **Content-Type**: Not defined
|
208
|
+
- **Accept**: application/json
|
209
|
+
|
210
|
+
|
211
|
+
## wallet_future_symbol_get
|
212
|
+
|
213
|
+
> <WalletFutureSuccess> wallet_future_symbol_get(x_api_key, symbol)
|
214
|
+
|
215
|
+
取引余力(先物)(銘柄指定)
|
216
|
+
|
217
|
+
指定した銘柄の取引余力(先物)を取得します
|
218
|
+
|
219
|
+
### Examples
|
220
|
+
|
221
|
+
```ruby
|
222
|
+
require 'time'
|
223
|
+
require 'kabustation_client'
|
224
|
+
|
225
|
+
api_instance = KabustationClient::WalletApi.new
|
226
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
227
|
+
symbol = 'symbol_example' # String | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 ※SOR市場は取扱っておりませんのでご注意ください。<b>市場コード</b><br> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>日通し</td> </tr> <tr> <td>23</td> <td>日中</td> </tr> <tr> <td>24</td> <td>夜間</td> </tr> </tbody> </table>
|
228
|
+
|
229
|
+
begin
|
230
|
+
# 取引余力(先物)(銘柄指定)
|
231
|
+
result = api_instance.wallet_future_symbol_get(x_api_key, symbol)
|
232
|
+
p result
|
233
|
+
rescue KabustationClient::ApiError => e
|
234
|
+
puts "Error when calling WalletApi->wallet_future_symbol_get: #{e}"
|
235
|
+
end
|
236
|
+
```
|
237
|
+
|
238
|
+
#### Using the wallet_future_symbol_get_with_http_info variant
|
239
|
+
|
240
|
+
This returns an Array which contains the response data, status code and headers.
|
241
|
+
|
242
|
+
> <Array(<WalletFutureSuccess>, Integer, Hash)> wallet_future_symbol_get_with_http_info(x_api_key, symbol)
|
243
|
+
|
244
|
+
```ruby
|
245
|
+
begin
|
246
|
+
# 取引余力(先物)(銘柄指定)
|
247
|
+
data, status_code, headers = api_instance.wallet_future_symbol_get_with_http_info(x_api_key, symbol)
|
248
|
+
p status_code # => 2xx
|
249
|
+
p headers # => { ... }
|
250
|
+
p data # => <WalletFutureSuccess>
|
251
|
+
rescue KabustationClient::ApiError => e
|
252
|
+
puts "Error when calling WalletApi->wallet_future_symbol_get_with_http_info: #{e}"
|
253
|
+
end
|
254
|
+
```
|
255
|
+
|
256
|
+
### Parameters
|
257
|
+
|
258
|
+
| Name | Type | Description | Notes |
|
259
|
+
| ---- | ---- | ----------- | ----- |
|
260
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
261
|
+
| **symbol** | **String** | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 ※SOR市場は取扱っておりませんのでご注意ください。<b>市場コード</b><br> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>日通し</td> </tr> <tr> <td>23</td> <td>日中</td> </tr> <tr> <td>24</td> <td>夜間</td> </tr> </tbody> </table> | |
|
262
|
+
|
263
|
+
### Return type
|
264
|
+
|
265
|
+
[**WalletFutureSuccess**](WalletFutureSuccess.md)
|
266
|
+
|
267
|
+
### Authorization
|
268
|
+
|
269
|
+
No authorization required
|
270
|
+
|
271
|
+
### HTTP request headers
|
272
|
+
|
273
|
+
- **Content-Type**: Not defined
|
274
|
+
- **Accept**: application/json
|
275
|
+
|
276
|
+
|
277
|
+
## wallet_margin_get
|
278
|
+
|
279
|
+
> <WalletMarginSuccess> wallet_margin_get(x_api_key)
|
280
|
+
|
281
|
+
取引余力(信用)
|
282
|
+
|
283
|
+
口座の取引余力(信用)を取得します
|
284
|
+
|
285
|
+
### Examples
|
286
|
+
|
287
|
+
```ruby
|
288
|
+
require 'time'
|
289
|
+
require 'kabustation_client'
|
290
|
+
|
291
|
+
api_instance = KabustationClient::WalletApi.new
|
292
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
293
|
+
|
294
|
+
begin
|
295
|
+
# 取引余力(信用)
|
296
|
+
result = api_instance.wallet_margin_get(x_api_key)
|
297
|
+
p result
|
298
|
+
rescue KabustationClient::ApiError => e
|
299
|
+
puts "Error when calling WalletApi->wallet_margin_get: #{e}"
|
300
|
+
end
|
301
|
+
```
|
302
|
+
|
303
|
+
#### Using the wallet_margin_get_with_http_info variant
|
304
|
+
|
305
|
+
This returns an Array which contains the response data, status code and headers.
|
306
|
+
|
307
|
+
> <Array(<WalletMarginSuccess>, Integer, Hash)> wallet_margin_get_with_http_info(x_api_key)
|
308
|
+
|
309
|
+
```ruby
|
310
|
+
begin
|
311
|
+
# 取引余力(信用)
|
312
|
+
data, status_code, headers = api_instance.wallet_margin_get_with_http_info(x_api_key)
|
313
|
+
p status_code # => 2xx
|
314
|
+
p headers # => { ... }
|
315
|
+
p data # => <WalletMarginSuccess>
|
316
|
+
rescue KabustationClient::ApiError => e
|
317
|
+
puts "Error when calling WalletApi->wallet_margin_get_with_http_info: #{e}"
|
318
|
+
end
|
319
|
+
```
|
320
|
+
|
321
|
+
### Parameters
|
322
|
+
|
323
|
+
| Name | Type | Description | Notes |
|
324
|
+
| ---- | ---- | ----------- | ----- |
|
325
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
326
|
+
|
327
|
+
### Return type
|
328
|
+
|
329
|
+
[**WalletMarginSuccess**](WalletMarginSuccess.md)
|
330
|
+
|
331
|
+
### Authorization
|
332
|
+
|
333
|
+
No authorization required
|
334
|
+
|
335
|
+
### HTTP request headers
|
336
|
+
|
337
|
+
- **Content-Type**: Not defined
|
338
|
+
- **Accept**: application/json
|
339
|
+
|
340
|
+
|
341
|
+
## wallet_margin_symbol_get
|
342
|
+
|
343
|
+
> <WalletMarginSuccess> wallet_margin_symbol_get(x_api_key, symbol)
|
344
|
+
|
345
|
+
取引余力(信用)(銘柄指定)
|
346
|
+
|
347
|
+
指定した銘柄の取引余力(信用)を取得します
|
348
|
+
|
349
|
+
### Examples
|
350
|
+
|
351
|
+
```ruby
|
352
|
+
require 'time'
|
353
|
+
require 'kabustation_client'
|
354
|
+
|
355
|
+
api_instance = KabustationClient::WalletApi.new
|
356
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
357
|
+
symbol = 'symbol_example' # String | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 <b>市場コード</b> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>東証</td> </tr> <tr> <td>3</td> <td>名証</td> </tr> </tbody> </table>
|
358
|
+
|
359
|
+
begin
|
360
|
+
# 取引余力(信用)(銘柄指定)
|
361
|
+
result = api_instance.wallet_margin_symbol_get(x_api_key, symbol)
|
362
|
+
p result
|
363
|
+
rescue KabustationClient::ApiError => e
|
364
|
+
puts "Error when calling WalletApi->wallet_margin_symbol_get: #{e}"
|
365
|
+
end
|
366
|
+
```
|
367
|
+
|
368
|
+
#### Using the wallet_margin_symbol_get_with_http_info variant
|
369
|
+
|
370
|
+
This returns an Array which contains the response data, status code and headers.
|
371
|
+
|
372
|
+
> <Array(<WalletMarginSuccess>, Integer, Hash)> wallet_margin_symbol_get_with_http_info(x_api_key, symbol)
|
373
|
+
|
374
|
+
```ruby
|
375
|
+
begin
|
376
|
+
# 取引余力(信用)(銘柄指定)
|
377
|
+
data, status_code, headers = api_instance.wallet_margin_symbol_get_with_http_info(x_api_key, symbol)
|
378
|
+
p status_code # => 2xx
|
379
|
+
p headers # => { ... }
|
380
|
+
p data # => <WalletMarginSuccess>
|
381
|
+
rescue KabustationClient::ApiError => e
|
382
|
+
puts "Error when calling WalletApi->wallet_margin_symbol_get_with_http_info: #{e}"
|
383
|
+
end
|
384
|
+
```
|
385
|
+
|
386
|
+
### Parameters
|
387
|
+
|
388
|
+
| Name | Type | Description | Notes |
|
389
|
+
| ---- | ---- | ----------- | ----- |
|
390
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
391
|
+
| **symbol** | **String** | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 <b>市場コード</b> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>東証</td> </tr> <tr> <td>3</td> <td>名証</td> </tr> </tbody> </table> | |
|
392
|
+
|
393
|
+
### Return type
|
394
|
+
|
395
|
+
[**WalletMarginSuccess**](WalletMarginSuccess.md)
|
396
|
+
|
397
|
+
### Authorization
|
398
|
+
|
399
|
+
No authorization required
|
400
|
+
|
401
|
+
### HTTP request headers
|
402
|
+
|
403
|
+
- **Content-Type**: Not defined
|
404
|
+
- **Accept**: application/json
|
405
|
+
|
406
|
+
|
407
|
+
## wallet_option_get
|
408
|
+
|
409
|
+
> <WalletOptionSuccess> wallet_option_get(x_api_key)
|
410
|
+
|
411
|
+
取引余力(オプション)
|
412
|
+
|
413
|
+
口座の取引余力(オプション)を取得します
|
414
|
+
|
415
|
+
### Examples
|
416
|
+
|
417
|
+
```ruby
|
418
|
+
require 'time'
|
419
|
+
require 'kabustation_client'
|
420
|
+
|
421
|
+
api_instance = KabustationClient::WalletApi.new
|
422
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
423
|
+
|
424
|
+
begin
|
425
|
+
# 取引余力(オプション)
|
426
|
+
result = api_instance.wallet_option_get(x_api_key)
|
427
|
+
p result
|
428
|
+
rescue KabustationClient::ApiError => e
|
429
|
+
puts "Error when calling WalletApi->wallet_option_get: #{e}"
|
430
|
+
end
|
431
|
+
```
|
432
|
+
|
433
|
+
#### Using the wallet_option_get_with_http_info variant
|
434
|
+
|
435
|
+
This returns an Array which contains the response data, status code and headers.
|
436
|
+
|
437
|
+
> <Array(<WalletOptionSuccess>, Integer, Hash)> wallet_option_get_with_http_info(x_api_key)
|
438
|
+
|
439
|
+
```ruby
|
440
|
+
begin
|
441
|
+
# 取引余力(オプション)
|
442
|
+
data, status_code, headers = api_instance.wallet_option_get_with_http_info(x_api_key)
|
443
|
+
p status_code # => 2xx
|
444
|
+
p headers # => { ... }
|
445
|
+
p data # => <WalletOptionSuccess>
|
446
|
+
rescue KabustationClient::ApiError => e
|
447
|
+
puts "Error when calling WalletApi->wallet_option_get_with_http_info: #{e}"
|
448
|
+
end
|
449
|
+
```
|
450
|
+
|
451
|
+
### Parameters
|
452
|
+
|
453
|
+
| Name | Type | Description | Notes |
|
454
|
+
| ---- | ---- | ----------- | ----- |
|
455
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
456
|
+
|
457
|
+
### Return type
|
458
|
+
|
459
|
+
[**WalletOptionSuccess**](WalletOptionSuccess.md)
|
460
|
+
|
461
|
+
### Authorization
|
462
|
+
|
463
|
+
No authorization required
|
464
|
+
|
465
|
+
### HTTP request headers
|
466
|
+
|
467
|
+
- **Content-Type**: Not defined
|
468
|
+
- **Accept**: application/json
|
469
|
+
|
470
|
+
|
471
|
+
## wallet_option_symbol_get
|
472
|
+
|
473
|
+
> <WalletOptionSuccess> wallet_option_symbol_get(x_api_key, symbol)
|
474
|
+
|
475
|
+
取引余力(オプション)(銘柄指定)
|
476
|
+
|
477
|
+
指定した銘柄の取引余力(オプション)を取得します
|
478
|
+
|
479
|
+
### Examples
|
480
|
+
|
481
|
+
```ruby
|
482
|
+
require 'time'
|
483
|
+
require 'kabustation_client'
|
484
|
+
|
485
|
+
api_instance = KabustationClient::WalletApi.new
|
486
|
+
x_api_key = 'x_api_key_example' # String | トークン発行メソッドで取得した文字列
|
487
|
+
symbol = 'symbol_example' # String | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 <b>市場コード</b> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>日通し</td> </tr> <tr> <td>23</td> <td>日中</td> </tr> <tr> <td>24</td> <td>夜間</td> </tr> </tbody> </table>
|
488
|
+
|
489
|
+
begin
|
490
|
+
# 取引余力(オプション)(銘柄指定)
|
491
|
+
result = api_instance.wallet_option_symbol_get(x_api_key, symbol)
|
492
|
+
p result
|
493
|
+
rescue KabustationClient::ApiError => e
|
494
|
+
puts "Error when calling WalletApi->wallet_option_symbol_get: #{e}"
|
495
|
+
end
|
496
|
+
```
|
497
|
+
|
498
|
+
#### Using the wallet_option_symbol_get_with_http_info variant
|
499
|
+
|
500
|
+
This returns an Array which contains the response data, status code and headers.
|
501
|
+
|
502
|
+
> <Array(<WalletOptionSuccess>, Integer, Hash)> wallet_option_symbol_get_with_http_info(x_api_key, symbol)
|
503
|
+
|
504
|
+
```ruby
|
505
|
+
begin
|
506
|
+
# 取引余力(オプション)(銘柄指定)
|
507
|
+
data, status_code, headers = api_instance.wallet_option_symbol_get_with_http_info(x_api_key, symbol)
|
508
|
+
p status_code # => 2xx
|
509
|
+
p headers # => { ... }
|
510
|
+
p data # => <WalletOptionSuccess>
|
511
|
+
rescue KabustationClient::ApiError => e
|
512
|
+
puts "Error when calling WalletApi->wallet_option_symbol_get_with_http_info: #{e}"
|
513
|
+
end
|
514
|
+
```
|
515
|
+
|
516
|
+
### Parameters
|
517
|
+
|
518
|
+
| Name | Type | Description | Notes |
|
519
|
+
| ---- | ---- | ----------- | ----- |
|
520
|
+
| **x_api_key** | **String** | トークン発行メソッドで取得した文字列 | |
|
521
|
+
| **symbol** | **String** | 銘柄コード <br> ※次の形式で入力してください。<br> [銘柄コード]@[市場コード]<br> ※市場コードは下記の定義値から選択してください。 <b>市場コード</b> <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>日通し</td> </tr> <tr> <td>23</td> <td>日中</td> </tr> <tr> <td>24</td> <td>夜間</td> </tr> </tbody> </table> | |
|
522
|
+
|
523
|
+
### Return type
|
524
|
+
|
525
|
+
[**WalletOptionSuccess**](WalletOptionSuccess.md)
|
526
|
+
|
527
|
+
### Authorization
|
528
|
+
|
529
|
+
No authorization required
|
530
|
+
|
531
|
+
### HTTP request headers
|
532
|
+
|
533
|
+
- **Content-Type**: Not defined
|
534
|
+
- **Accept**: application/json
|
535
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# KabustationClient::WalletCashSuccess
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **stock_account_wallet** | **Float** | 現物買付可能額<br> ※auマネーコネクトが有効の場合、auじぶん銀行の残高を含めた合計可能額を表示する<br> ※auマネーコネクトが無効の場合、auカブコム証券の可能額のみを表示する | [optional] |
|
8
|
+
| **au_kc_stock_account_wallet** | **Float** | うち、auカブコム証券可能額 | [optional] |
|
9
|
+
| **au_jbn_stock_account_wallet** | **Float** | うち、auじぶん銀行残高<br>※auマネーコネクトが無効の場合、「0」を表示する | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'kabustation_client'
|
15
|
+
|
16
|
+
instance = KabustationClient::WalletCashSuccess.new(
|
17
|
+
stock_account_wallet: null,
|
18
|
+
au_kc_stock_account_wallet: null,
|
19
|
+
au_jbn_stock_account_wallet: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# KabustationClient::WalletFutureSuccess
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **future_trade_limit** | **Float** | 新規建玉可能額 | [optional] |
|
8
|
+
| **margin_requirement** | **Float** | 買い必要証拠金額<br>※銘柄指定の場合のみ。<br>※銘柄が指定されなかった場合、空を返す。 | [optional] |
|
9
|
+
| **margin_requirement_sell** | **Float** | 売り必要証拠金額<br>※銘柄指定の場合のみ。<br>※銘柄が指定されなかった場合、空を返す。 | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'kabustation_client'
|
15
|
+
|
16
|
+
instance = KabustationClient::WalletFutureSuccess.new(
|
17
|
+
future_trade_limit: null,
|
18
|
+
margin_requirement: null,
|
19
|
+
margin_requirement_sell: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# KabustationClient::WalletMarginSuccess
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **margin_account_wallet** | **Float** | 信用新規可能額 | [optional] |
|
8
|
+
| **depositkeep_rate** | **Float** | 保証金維持率<br>※銘柄指定の場合のみ<br>※銘柄が指定されなかった場合、0.0を返す。 | [optional] |
|
9
|
+
| **consignment_deposit_rate** | **Float** | 委託保証金率<br>※銘柄指定の場合のみ。<br>※銘柄が指定されなかった場合、Noneを返す。 | [optional] |
|
10
|
+
| **cash_of_consignment_deposit_rate** | **Float** | 現金委託保証金率<br>※銘柄指定の場合のみ。<br>※銘柄が指定されなかった場合、Noneを返す。 | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'kabustation_client'
|
16
|
+
|
17
|
+
instance = KabustationClient::WalletMarginSuccess.new(
|
18
|
+
margin_account_wallet: null,
|
19
|
+
depositkeep_rate: null,
|
20
|
+
consignment_deposit_rate: null,
|
21
|
+
cash_of_consignment_deposit_rate: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# KabustationClient::WalletOptionSuccess
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **option_buy_trade_limit** | **Float** | 買新規建玉可能額 | [optional] |
|
8
|
+
| **option_sell_trade_limit** | **Float** | 売新規建玉可能額 | [optional] |
|
9
|
+
| **margin_requirement** | **Float** | 必要証拠金額<br>※銘柄指定の場合のみ。<br>※銘柄が指定されなかった場合、空を返す。 | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'kabustation_client'
|
15
|
+
|
16
|
+
instance = KabustationClient::WalletOptionSuccess.new(
|
17
|
+
option_buy_trade_limit: null,
|
18
|
+
option_sell_trade_limit: null,
|
19
|
+
margin_requirement: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=$(git remote)
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|