kabustation_client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +188 -0
  4. data/Rakefile +10 -0
  5. data/docs/ApiSoftLimitResponse.md +32 -0
  6. data/docs/AuthApi.md +72 -0
  7. data/docs/BoardSuccess.md +142 -0
  8. data/docs/BoardSuccessBuy1.md +24 -0
  9. data/docs/BoardSuccessBuy10.md +20 -0
  10. data/docs/BoardSuccessBuy2.md +20 -0
  11. data/docs/BoardSuccessBuy3.md +20 -0
  12. data/docs/BoardSuccessBuy4.md +20 -0
  13. data/docs/BoardSuccessBuy5.md +20 -0
  14. data/docs/BoardSuccessBuy6.md +20 -0
  15. data/docs/BoardSuccessBuy7.md +20 -0
  16. data/docs/BoardSuccessBuy8.md +20 -0
  17. data/docs/BoardSuccessBuy9.md +20 -0
  18. data/docs/BoardSuccessSell1.md +24 -0
  19. data/docs/BoardSuccessSell10.md +20 -0
  20. data/docs/BoardSuccessSell2.md +20 -0
  21. data/docs/BoardSuccessSell3.md +20 -0
  22. data/docs/BoardSuccessSell4.md +20 -0
  23. data/docs/BoardSuccessSell5.md +20 -0
  24. data/docs/BoardSuccessSell6.md +20 -0
  25. data/docs/BoardSuccessSell7.md +20 -0
  26. data/docs/BoardSuccessSell8.md +20 -0
  27. data/docs/BoardSuccessSell9.md +20 -0
  28. data/docs/ErrorResponse.md +20 -0
  29. data/docs/ExchangeResponse.md +28 -0
  30. data/docs/InfoApi.md +924 -0
  31. data/docs/MarginPremiumResponse.md +22 -0
  32. data/docs/MarginPremiumResponseDayTrade.md +26 -0
  33. data/docs/MarginPremiumResponseGeneralMargin.md +26 -0
  34. data/docs/OrderApi.md +275 -0
  35. data/docs/OrderSuccess.md +20 -0
  36. data/docs/OrdersSuccess.md +58 -0
  37. data/docs/OrdersSuccessDetailsInner.md +44 -0
  38. data/docs/Positions.md +20 -0
  39. data/docs/PositionsDeriv.md +20 -0
  40. data/docs/PositionsSuccess.md +58 -0
  41. data/docs/PrimaryExchangeResponse.md +20 -0
  42. data/docs/RankingByCategoryResponse.md +22 -0
  43. data/docs/RankingByCategoryResponseRankingInner.md +34 -0
  44. data/docs/RankingByMarginResponse.md +22 -0
  45. data/docs/RankingByMarginResponseRankingInner.md +36 -0
  46. data/docs/RankingByTickCountResponse.md +22 -0
  47. data/docs/RankingByTickCountResponseRankingInner.md +46 -0
  48. data/docs/RankingByTradeValueResponse.md +22 -0
  49. data/docs/RankingByTradeValueResponseRankingInner.md +42 -0
  50. data/docs/RankingByTradeVolumeResponse.md +22 -0
  51. data/docs/RankingByTradeVolumeResponseRankingInner.md +42 -0
  52. data/docs/RankingDefaultResponse.md +22 -0
  53. data/docs/RankingDefaultResponseRankingInner.md +42 -0
  54. data/docs/RankingGet200Response.md +57 -0
  55. data/docs/RegistSuccess.md +18 -0
  56. data/docs/RegisterApi.md +206 -0
  57. data/docs/RegulationsResponse.md +20 -0
  58. data/docs/RegulationsResponseRegulationsInfoInner.md +30 -0
  59. data/docs/RequestCancelOrder.md +20 -0
  60. data/docs/RequestRegister.md +18 -0
  61. data/docs/RequestRegisterSymbolsInner.md +20 -0
  62. data/docs/RequestSendOrder.md +52 -0
  63. data/docs/RequestSendOrderDerivFuture.md +42 -0
  64. data/docs/RequestSendOrderDerivFutureReverseLimitOrder.md +24 -0
  65. data/docs/RequestSendOrderDerivOption.md +42 -0
  66. data/docs/RequestSendOrderReverseLimitOrder.md +26 -0
  67. data/docs/RequestToken.md +18 -0
  68. data/docs/RequestUnregister.md +18 -0
  69. data/docs/SymbolNameSuccess.md +20 -0
  70. data/docs/SymbolSuccess.md +64 -0
  71. data/docs/TokenSuccess.md +20 -0
  72. data/docs/UnregisterAllSuccess.md +18 -0
  73. data/docs/WalletApi.md +535 -0
  74. data/docs/WalletCashSuccess.md +22 -0
  75. data/docs/WalletFutureSuccess.md +22 -0
  76. data/docs/WalletMarginSuccess.md +24 -0
  77. data/docs/WalletOptionSuccess.md +22 -0
  78. data/git_push.sh +57 -0
  79. data/kabustation_client.gemspec +39 -0
  80. data/lib/kabustation_client/api/auth_api.rb +90 -0
  81. data/lib/kabustation_client/api/info_api.rb +1044 -0
  82. data/lib/kabustation_client/api/order_api.rb +322 -0
  83. data/lib/kabustation_client/api/register_api.rb +236 -0
  84. data/lib/kabustation_client/api/wallet_api.rb +558 -0
  85. data/lib/kabustation_client/api_client.rb +393 -0
  86. data/lib/kabustation_client/api_error.rb +58 -0
  87. data/lib/kabustation_client/configuration.rb +295 -0
  88. data/lib/kabustation_client/models/api_soft_limit_response.rb +285 -0
  89. data/lib/kabustation_client/models/board_success.rb +816 -0
  90. data/lib/kabustation_client/models/board_success_buy1.rb +246 -0
  91. data/lib/kabustation_client/models/board_success_buy10.rb +226 -0
  92. data/lib/kabustation_client/models/board_success_buy2.rb +226 -0
  93. data/lib/kabustation_client/models/board_success_buy3.rb +226 -0
  94. data/lib/kabustation_client/models/board_success_buy4.rb +226 -0
  95. data/lib/kabustation_client/models/board_success_buy5.rb +226 -0
  96. data/lib/kabustation_client/models/board_success_buy6.rb +226 -0
  97. data/lib/kabustation_client/models/board_success_buy7.rb +226 -0
  98. data/lib/kabustation_client/models/board_success_buy8.rb +226 -0
  99. data/lib/kabustation_client/models/board_success_buy9.rb +226 -0
  100. data/lib/kabustation_client/models/board_success_sell1.rb +246 -0
  101. data/lib/kabustation_client/models/board_success_sell10.rb +226 -0
  102. data/lib/kabustation_client/models/board_success_sell2.rb +226 -0
  103. data/lib/kabustation_client/models/board_success_sell3.rb +226 -0
  104. data/lib/kabustation_client/models/board_success_sell4.rb +226 -0
  105. data/lib/kabustation_client/models/board_success_sell5.rb +226 -0
  106. data/lib/kabustation_client/models/board_success_sell6.rb +226 -0
  107. data/lib/kabustation_client/models/board_success_sell7.rb +226 -0
  108. data/lib/kabustation_client/models/board_success_sell8.rb +226 -0
  109. data/lib/kabustation_client/models/board_success_sell9.rb +226 -0
  110. data/lib/kabustation_client/models/error_response.rb +225 -0
  111. data/lib/kabustation_client/models/exchange_response.rb +265 -0
  112. data/lib/kabustation_client/models/margin_premium_response.rb +233 -0
  113. data/lib/kabustation_client/models/margin_premium_response_day_trade.rb +256 -0
  114. data/lib/kabustation_client/models/margin_premium_response_general_margin.rb +256 -0
  115. data/lib/kabustation_client/models/order_success.rb +225 -0
  116. data/lib/kabustation_client/models/orders_success.rb +417 -0
  117. data/lib/kabustation_client/models/orders_success_details_inner.rb +345 -0
  118. data/lib/kabustation_client/models/positions.rb +225 -0
  119. data/lib/kabustation_client/models/positions_deriv.rb +225 -0
  120. data/lib/kabustation_client/models/positions_success.rb +415 -0
  121. data/lib/kabustation_client/models/primary_exchange_response.rb +225 -0
  122. data/lib/kabustation_client/models/ranking_by_category_response.rb +237 -0
  123. data/lib/kabustation_client/models/ranking_by_category_response_ranking_inner.rb +295 -0
  124. data/lib/kabustation_client/models/ranking_by_margin_response.rb +237 -0
  125. data/lib/kabustation_client/models/ranking_by_margin_response_ranking_inner.rb +305 -0
  126. data/lib/kabustation_client/models/ranking_by_tick_count_response.rb +237 -0
  127. data/lib/kabustation_client/models/ranking_by_tick_count_response_ranking_inner.rb +355 -0
  128. data/lib/kabustation_client/models/ranking_by_trade_value_response.rb +237 -0
  129. data/lib/kabustation_client/models/ranking_by_trade_value_response_ranking_inner.rb +335 -0
  130. data/lib/kabustation_client/models/ranking_by_trade_volume_response.rb +237 -0
  131. data/lib/kabustation_client/models/ranking_by_trade_volume_response_ranking_inner.rb +335 -0
  132. data/lib/kabustation_client/models/ranking_default_response.rb +237 -0
  133. data/lib/kabustation_client/models/ranking_default_response_ranking_inner.rb +335 -0
  134. data/lib/kabustation_client/models/ranking_get200_response.rb +109 -0
  135. data/lib/kabustation_client/models/regist_success.rb +217 -0
  136. data/lib/kabustation_client/models/regulations_response.rb +227 -0
  137. data/lib/kabustation_client/models/regulations_response_regulations_info_inner.rb +275 -0
  138. data/lib/kabustation_client/models/request_cancel_order.rb +239 -0
  139. data/lib/kabustation_client/models/request_register.rb +216 -0
  140. data/lib/kabustation_client/models/request_register_symbols_inner.rb +225 -0
  141. data/lib/kabustation_client/models/request_send_order.rb +470 -0
  142. data/lib/kabustation_client/models/request_send_order_deriv_future.rb +406 -0
  143. data/lib/kabustation_client/models/request_send_order_deriv_future_reverse_limit_order.rb +274 -0
  144. data/lib/kabustation_client/models/request_send_order_deriv_option.rb +406 -0
  145. data/lib/kabustation_client/models/request_send_order_reverse_limit_order.rb +291 -0
  146. data/lib/kabustation_client/models/request_token.rb +222 -0
  147. data/lib/kabustation_client/models/request_unregister.rb +217 -0
  148. data/lib/kabustation_client/models/symbol_name_success.rb +225 -0
  149. data/lib/kabustation_client/models/symbol_success.rb +445 -0
  150. data/lib/kabustation_client/models/token_success.rb +225 -0
  151. data/lib/kabustation_client/models/unregister_all_success.rb +215 -0
  152. data/lib/kabustation_client/models/wallet_cash_success.rb +235 -0
  153. data/lib/kabustation_client/models/wallet_future_success.rb +235 -0
  154. data/lib/kabustation_client/models/wallet_margin_success.rb +245 -0
  155. data/lib/kabustation_client/models/wallet_option_success.rb +235 -0
  156. data/lib/kabustation_client/version.rb +15 -0
  157. data/lib/kabustation_client.rb +112 -0
  158. data/spec/api/auth_api_spec.rb +47 -0
  159. data/spec/api/info_api_spec.rb +222 -0
  160. data/spec/api/order_api_spec.rb +87 -0
  161. data/spec/api/register_api_spec.rb +73 -0
  162. data/spec/api/wallet_api_spec.rb +135 -0
  163. data/spec/models/api_soft_limit_response_spec.rb +78 -0
  164. data/spec/models/board_success_buy10_spec.rb +42 -0
  165. data/spec/models/board_success_buy1_spec.rb +54 -0
  166. data/spec/models/board_success_buy2_spec.rb +42 -0
  167. data/spec/models/board_success_buy3_spec.rb +42 -0
  168. data/spec/models/board_success_buy4_spec.rb +42 -0
  169. data/spec/models/board_success_buy5_spec.rb +42 -0
  170. data/spec/models/board_success_buy6_spec.rb +42 -0
  171. data/spec/models/board_success_buy7_spec.rb +42 -0
  172. data/spec/models/board_success_buy8_spec.rb +42 -0
  173. data/spec/models/board_success_buy9_spec.rb +42 -0
  174. data/spec/models/board_success_sell10_spec.rb +42 -0
  175. data/spec/models/board_success_sell1_spec.rb +54 -0
  176. data/spec/models/board_success_sell2_spec.rb +42 -0
  177. data/spec/models/board_success_sell3_spec.rb +42 -0
  178. data/spec/models/board_success_sell4_spec.rb +42 -0
  179. data/spec/models/board_success_sell5_spec.rb +42 -0
  180. data/spec/models/board_success_sell6_spec.rb +42 -0
  181. data/spec/models/board_success_sell7_spec.rb +42 -0
  182. data/spec/models/board_success_sell8_spec.rb +42 -0
  183. data/spec/models/board_success_sell9_spec.rb +42 -0
  184. data/spec/models/board_success_spec.rb +408 -0
  185. data/spec/models/error_response_spec.rb +42 -0
  186. data/spec/models/exchange_response_spec.rb +66 -0
  187. data/spec/models/margin_premium_response_day_trade_spec.rb +60 -0
  188. data/spec/models/margin_premium_response_general_margin_spec.rb +60 -0
  189. data/spec/models/margin_premium_response_spec.rb +48 -0
  190. data/spec/models/order_success_spec.rb +42 -0
  191. data/spec/models/orders_success_details_inner_spec.rb +114 -0
  192. data/spec/models/orders_success_spec.rb +156 -0
  193. data/spec/models/positions_deriv_spec.rb +42 -0
  194. data/spec/models/positions_spec.rb +42 -0
  195. data/spec/models/positions_success_spec.rb +156 -0
  196. data/spec/models/primary_exchange_response_spec.rb +42 -0
  197. data/spec/models/ranking_by_category_response_ranking_inner_spec.rb +84 -0
  198. data/spec/models/ranking_by_category_response_spec.rb +48 -0
  199. data/spec/models/ranking_by_margin_response_ranking_inner_spec.rb +90 -0
  200. data/spec/models/ranking_by_margin_response_spec.rb +48 -0
  201. data/spec/models/ranking_by_tick_count_response_ranking_inner_spec.rb +120 -0
  202. data/spec/models/ranking_by_tick_count_response_spec.rb +48 -0
  203. data/spec/models/ranking_by_trade_value_response_ranking_inner_spec.rb +108 -0
  204. data/spec/models/ranking_by_trade_value_response_spec.rb +48 -0
  205. data/spec/models/ranking_by_trade_volume_response_ranking_inner_spec.rb +108 -0
  206. data/spec/models/ranking_by_trade_volume_response_spec.rb +48 -0
  207. data/spec/models/ranking_default_response_ranking_inner_spec.rb +108 -0
  208. data/spec/models/ranking_default_response_spec.rb +48 -0
  209. data/spec/models/ranking_get200_response_spec.rb +32 -0
  210. data/spec/models/regist_success_spec.rb +36 -0
  211. data/spec/models/regulations_response_regulations_info_inner_spec.rb +72 -0
  212. data/spec/models/regulations_response_spec.rb +42 -0
  213. data/spec/models/request_cancel_order_spec.rb +42 -0
  214. data/spec/models/request_register_spec.rb +36 -0
  215. data/spec/models/request_register_symbols_inner_spec.rb +42 -0
  216. data/spec/models/request_send_order_deriv_future_reverse_limit_order_spec.rb +54 -0
  217. data/spec/models/request_send_order_deriv_future_spec.rb +108 -0
  218. data/spec/models/request_send_order_deriv_option_spec.rb +108 -0
  219. data/spec/models/request_send_order_reverse_limit_order_spec.rb +60 -0
  220. data/spec/models/request_send_order_spec.rb +138 -0
  221. data/spec/models/request_token_spec.rb +36 -0
  222. data/spec/models/request_unregister_spec.rb +36 -0
  223. data/spec/models/symbol_name_success_spec.rb +42 -0
  224. data/spec/models/symbol_success_spec.rb +174 -0
  225. data/spec/models/token_success_spec.rb +42 -0
  226. data/spec/models/unregister_all_success_spec.rb +36 -0
  227. data/spec/models/wallet_cash_success_spec.rb +48 -0
  228. data/spec/models/wallet_future_success_spec.rb +48 -0
  229. data/spec/models/wallet_margin_success_spec.rb +54 -0
  230. data/spec/models/wallet_option_success_spec.rb +48 -0
  231. data/spec/spec_helper.rb +111 -0
  232. metadata +387 -0
@@ -0,0 +1,816 @@
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 'date'
14
+ require 'time'
15
+
16
+ module KabustationClient
17
+ # 下記にあるBIDとASKとは、トレーダー目線から見た場合の値であるため、BidPrice=Sell1のPrice、AskPrice=Buy1のPriceという数値となります。
18
+ class BoardSuccess
19
+ # 銘柄コード
20
+ attr_accessor :symbol
21
+
22
+ # 銘柄名
23
+ attr_accessor :symbol_name
24
+
25
+ # 市場コード<br>※株式・先物・オプション銘柄の場合のみ <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> <tr> <td>2</td> <td>日通し</td> </tr> <tr> <td>23</td> <td>日中</td> </tr> <tr> <td>24</td> <td>夜間</td> </tr> </tbody> </table>
26
+ attr_accessor :exchange
27
+
28
+ # 市場名称<br>※株式・先物・オプション銘柄の場合のみ
29
+ attr_accessor :exchange_name
30
+
31
+ # 現値
32
+ attr_accessor :current_price
33
+
34
+ # 現値時刻
35
+ attr_accessor :current_price_time
36
+
37
+ # 現値前値比較 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>0000</td> <td>事象なし</td> </tr> <tr> <td>0056</td> <td>変わらず</td> </tr> <tr> <td>0057</td> <td>UP</td> </tr> <tr> <td>0058</td> <td>DOWN</td> </tr> <tr> <td>0059</td> <td>中断板寄り後の初値</td> </tr> <tr> <td>0060</td> <td>ザラバ引け</td> </tr> <tr> <td>0061</td> <td>板寄り引け</td> </tr> <tr> <td>0062</td> <td>中断引け</td> </tr> <tr> <td>0063</td> <td>ダウン引け</td> </tr> <tr> <td>0064</td> <td>逆転終値</td> </tr> <tr> <td>0066</td> <td>特別気配引け</td> </tr> <tr> <td>0067</td> <td>一時留保引け</td> </tr> <tr> <td>0068</td> <td>売買停止引け</td> </tr> <tr> <td>0069</td> <td>サーキットブレーカ引け</td> </tr> <tr> <td>0431</td> <td>ダイナミックサーキットブレーカ引け</td> </tr> </tbody> </table>
38
+ attr_accessor :current_price_change_status
39
+
40
+ # 現値ステータス <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> <tr> <td>4</td> <td>システム障害</td> </tr> <tr> <td>5</td> <td>中断</td> </tr> <tr> <td>6</td> <td>売買停止</td> </tr> <tr> <td>7</td> <td>売買停止・システム停止解除</td> </tr> <tr> <td>8</td> <td>終値</td> </tr> <tr> <td>9</td> <td>システム停止</td> </tr> <tr> <td>10</td> <td>概算値</td> </tr> <tr> <td>11</td> <td>参考値</td> </tr> <tr> <td>12</td> <td>サーキットブレイク実施中</td> </tr> <tr> <td>13</td> <td>システム障害解除</td> </tr> <tr> <td>14</td> <td>サーキットブレイク解除</td> </tr> <tr> <td>15</td> <td>中断解除</td> </tr> <tr> <td>16</td> <td>一時留保中</td> </tr> <tr> <td>17</td> <td>一時留保解除</td> </tr> <tr> <td>18</td> <td>ファイル障害</td> </tr> <tr> <td>19</td> <td>ファイル障害解除</td> </tr> <tr> <td>20</td> <td>Spread/Strategy</td> </tr> <tr> <td>21</td> <td>ダイナミックサーキットブレイク発動</td> </tr> <tr> <td>22</td> <td>ダイナミックサーキットブレイク解除</td> </tr> <tr> <td>23</td> <td>板寄せ約定</td> </tr> </tbody> </table>
41
+ attr_accessor :current_price_status
42
+
43
+ # 計算用現値
44
+ attr_accessor :calc_price
45
+
46
+ # 前日終値
47
+ attr_accessor :previous_close
48
+
49
+ # 前日終値日付
50
+ attr_accessor :previous_close_time
51
+
52
+ # 前日比
53
+ attr_accessor :change_previous_close
54
+
55
+ # 騰落率
56
+ attr_accessor :change_previous_close_per
57
+
58
+ # 始値
59
+ attr_accessor :opening_price
60
+
61
+ # 始値時刻
62
+ attr_accessor :opening_price_time
63
+
64
+ # 高値
65
+ attr_accessor :high_price
66
+
67
+ # 高値時刻
68
+ attr_accessor :high_price_time
69
+
70
+ # 安値
71
+ attr_accessor :low_price
72
+
73
+ # 安値時刻
74
+ attr_accessor :low_price_time
75
+
76
+ # 売買高<br>※株式・先物・オプション銘柄の場合のみ
77
+ attr_accessor :trading_volume
78
+
79
+ # 売買高時刻<br>※株式・先物・オプション銘柄の場合のみ
80
+ attr_accessor :trading_volume_time
81
+
82
+ # 売買高加重平均価格(VWAP)<br>※株式・先物・オプション銘柄の場合のみ
83
+ attr_accessor :vwap
84
+
85
+ # 売買代金<br>※株式・先物・オプション銘柄の場合のみ
86
+ attr_accessor :trading_value
87
+
88
+ # 最良売気配数量 ※①<br>※株式・先物・オプション銘柄の場合のみ
89
+ attr_accessor :bid_qty
90
+
91
+ # 最良売気配値段 ※①<br>※株式・先物・オプション銘柄の場合のみ
92
+ attr_accessor :bid_price
93
+
94
+ # 最良売気配時刻 ※①<br>※株式銘柄の場合のみ
95
+ attr_accessor :bid_time
96
+
97
+ # 最良売気配フラグ ※①<br>※株式・先物・オプション銘柄の場合のみ <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>0000</td> <td>事象なし</td> </tr> <tr> <td>0101</td> <td>一般気配</td> </tr> <tr> <td>0102</td> <td>特別気配</td> </tr> <tr> <td>0103</td> <td>注意気配</td> </tr> <tr> <td>0107</td> <td>寄前気配</td> </tr> <tr> <td>0108</td> <td>停止前特別気配</td> </tr> <tr> <td>0109</td> <td>引け後気配</td> </tr> <tr> <td>0116</td> <td>寄前気配約定成立ポイントなし</td> </tr> <tr> <td>0117</td> <td>寄前気配約定成立ポイントあり</td> </tr> <tr> <td>0118</td> <td>連続約定気配</td> </tr> <tr> <td>0119</td> <td>停止前の連続約定気配</td> </tr> <tr> <td>0120</td> <td>買い上がり売り下がり中</td> </tr> </tbody> </table>
98
+ attr_accessor :bid_sign
99
+
100
+ # 売成行数量<br>※株式銘柄の場合のみ
101
+ attr_accessor :market_order_sell_qty
102
+
103
+ attr_accessor :sell1
104
+
105
+ attr_accessor :sell2
106
+
107
+ attr_accessor :sell3
108
+
109
+ attr_accessor :sell4
110
+
111
+ attr_accessor :sell5
112
+
113
+ attr_accessor :sell6
114
+
115
+ attr_accessor :sell7
116
+
117
+ attr_accessor :sell8
118
+
119
+ attr_accessor :sell9
120
+
121
+ attr_accessor :sell10
122
+
123
+ # 最良買気配数量 ※①<br>※株式・先物・オプション銘柄の場合のみ
124
+ attr_accessor :ask_qty
125
+
126
+ # 最良買気配値段 ※①<br>※株式・先物・オプション銘柄の場合のみ
127
+ attr_accessor :ask_price
128
+
129
+ # 最良買気配時刻 ※①<br>※株式銘柄の場合のみ
130
+ attr_accessor :ask_time
131
+
132
+ # 最良買気配フラグ ※①<br>※株式・先物・オプション銘柄の場合のみ <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>0000</td> <td>事象なし</td> </tr> <tr> <td>0101</td> <td>一般気配</td> </tr> <tr> <td>0102</td> <td>特別気配</td> </tr> <tr> <td>0103</td> <td>注意気配</td> </tr> <tr> <td>0107</td> <td>寄前気配</td> </tr> <tr> <td>0108</td> <td>停止前特別気配</td> </tr> <tr> <td>0109</td> <td>引け後気配</td> </tr> <tr> <td>0116</td> <td>寄前気配約定成立ポイントなし</td> </tr> <tr> <td>0117</td> <td>寄前気配約定成立ポイントあり</td> </tr> <tr> <td>0118</td> <td>連続約定気配</td> </tr> <tr> <td>0119</td> <td>停止前の連続約定気配</td> </tr> <tr> <td>0120</td> <td>買い上がり売り下がり中</td> </tr> </tbody> </table>
133
+ attr_accessor :ask_sign
134
+
135
+ # 買成行数量<br>※株式銘柄の場合のみ
136
+ attr_accessor :market_order_buy_qty
137
+
138
+ attr_accessor :buy1
139
+
140
+ attr_accessor :buy2
141
+
142
+ attr_accessor :buy3
143
+
144
+ attr_accessor :buy4
145
+
146
+ attr_accessor :buy5
147
+
148
+ attr_accessor :buy6
149
+
150
+ attr_accessor :buy7
151
+
152
+ attr_accessor :buy8
153
+
154
+ attr_accessor :buy9
155
+
156
+ attr_accessor :buy10
157
+
158
+ # OVER気配数量<br>※株式銘柄の場合のみ
159
+ attr_accessor :over_sell_qty
160
+
161
+ # UNDER気配数量<br>※株式銘柄の場合のみ
162
+ attr_accessor :under_buy_qty
163
+
164
+ # 時価総額<br>※株式銘柄の場合のみ
165
+ attr_accessor :total_market_value
166
+
167
+ # 清算値<br>※先物銘柄の場合のみ
168
+ attr_accessor :clearing_price
169
+
170
+ # インプライド・ボラティリティ<br>※オプション銘柄かつ日通しの場合のみ
171
+ attr_accessor :iv
172
+
173
+ # ガンマ<br>※オプション銘柄かつ日通しの場合のみ
174
+ attr_accessor :gamma
175
+
176
+ # セータ<br>※オプション銘柄かつ日通しの場合のみ
177
+ attr_accessor :theta
178
+
179
+ # ベガ<br>※オプション銘柄かつ日通しの場合のみ
180
+ attr_accessor :vega
181
+
182
+ # デルタ<br>※オプション銘柄かつ日通しの場合のみ
183
+ attr_accessor :delta
184
+
185
+ # 銘柄種別 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>指数</td> </tr> <tr> <td>1</td> <td>現物</td> </tr> <tr> <td>101</td> <td>日経225先物</td> </tr> <tr> <td>103</td> <td>日経225OP</td> </tr> <tr> <td>107</td> <td>TOPIX先物</td> </tr> <tr> <td>121</td> <td>JPX400先物</td> </tr> <tr> <td>144</td> <td>NYダウ</td> </tr> <tr> <td>145</td> <td>日経平均VI</td> </tr> <tr> <td>154</td> <td>グロース250先物</td> </tr> <tr> <td>155</td> <td>TOPIX_REIT</td> </tr> <tr> <td>171</td> <td>TOPIX CORE30</td> </tr> <tr> <td>901</td> <td>日経平均225ミニ先物</td> </tr> <tr> <td>907</td> <td>TOPIXミニ先物</td> </tr> </tbody> </table>
186
+ attr_accessor :security_type
187
+
188
+ # Attribute mapping from ruby-style variable name to JSON key.
189
+ def self.attribute_map
190
+ {
191
+ :'symbol' => :'Symbol',
192
+ :'symbol_name' => :'SymbolName',
193
+ :'exchange' => :'Exchange',
194
+ :'exchange_name' => :'ExchangeName',
195
+ :'current_price' => :'CurrentPrice',
196
+ :'current_price_time' => :'CurrentPriceTime',
197
+ :'current_price_change_status' => :'CurrentPriceChangeStatus',
198
+ :'current_price_status' => :'CurrentPriceStatus',
199
+ :'calc_price' => :'CalcPrice',
200
+ :'previous_close' => :'PreviousClose',
201
+ :'previous_close_time' => :'PreviousCloseTime',
202
+ :'change_previous_close' => :'ChangePreviousClose',
203
+ :'change_previous_close_per' => :'ChangePreviousClosePer',
204
+ :'opening_price' => :'OpeningPrice',
205
+ :'opening_price_time' => :'OpeningPriceTime',
206
+ :'high_price' => :'HighPrice',
207
+ :'high_price_time' => :'HighPriceTime',
208
+ :'low_price' => :'LowPrice',
209
+ :'low_price_time' => :'LowPriceTime',
210
+ :'trading_volume' => :'TradingVolume',
211
+ :'trading_volume_time' => :'TradingVolumeTime',
212
+ :'vwap' => :'VWAP',
213
+ :'trading_value' => :'TradingValue',
214
+ :'bid_qty' => :'BidQty',
215
+ :'bid_price' => :'BidPrice',
216
+ :'bid_time' => :'BidTime',
217
+ :'bid_sign' => :'BidSign',
218
+ :'market_order_sell_qty' => :'MarketOrderSellQty',
219
+ :'sell1' => :'Sell1',
220
+ :'sell2' => :'Sell2',
221
+ :'sell3' => :'Sell3',
222
+ :'sell4' => :'Sell4',
223
+ :'sell5' => :'Sell5',
224
+ :'sell6' => :'Sell6',
225
+ :'sell7' => :'Sell7',
226
+ :'sell8' => :'Sell8',
227
+ :'sell9' => :'Sell9',
228
+ :'sell10' => :'Sell10',
229
+ :'ask_qty' => :'AskQty',
230
+ :'ask_price' => :'AskPrice',
231
+ :'ask_time' => :'AskTime',
232
+ :'ask_sign' => :'AskSign',
233
+ :'market_order_buy_qty' => :'MarketOrderBuyQty',
234
+ :'buy1' => :'Buy1',
235
+ :'buy2' => :'Buy2',
236
+ :'buy3' => :'Buy3',
237
+ :'buy4' => :'Buy4',
238
+ :'buy5' => :'Buy5',
239
+ :'buy6' => :'Buy6',
240
+ :'buy7' => :'Buy7',
241
+ :'buy8' => :'Buy8',
242
+ :'buy9' => :'Buy9',
243
+ :'buy10' => :'Buy10',
244
+ :'over_sell_qty' => :'OverSellQty',
245
+ :'under_buy_qty' => :'UnderBuyQty',
246
+ :'total_market_value' => :'TotalMarketValue',
247
+ :'clearing_price' => :'ClearingPrice',
248
+ :'iv' => :'IV',
249
+ :'gamma' => :'Gamma',
250
+ :'theta' => :'Theta',
251
+ :'vega' => :'Vega',
252
+ :'delta' => :'Delta',
253
+ :'security_type' => :'SecurityType'
254
+ }
255
+ end
256
+
257
+ # Returns all the JSON keys this model knows about
258
+ def self.acceptable_attributes
259
+ attribute_map.values
260
+ end
261
+
262
+ # Attribute type mapping.
263
+ def self.openapi_types
264
+ {
265
+ :'symbol' => :'String',
266
+ :'symbol_name' => :'String',
267
+ :'exchange' => :'Integer',
268
+ :'exchange_name' => :'String',
269
+ :'current_price' => :'Float',
270
+ :'current_price_time' => :'Time',
271
+ :'current_price_change_status' => :'String',
272
+ :'current_price_status' => :'Integer',
273
+ :'calc_price' => :'Float',
274
+ :'previous_close' => :'Float',
275
+ :'previous_close_time' => :'Time',
276
+ :'change_previous_close' => :'Float',
277
+ :'change_previous_close_per' => :'Float',
278
+ :'opening_price' => :'Float',
279
+ :'opening_price_time' => :'Time',
280
+ :'high_price' => :'Float',
281
+ :'high_price_time' => :'Time',
282
+ :'low_price' => :'Float',
283
+ :'low_price_time' => :'Time',
284
+ :'trading_volume' => :'Float',
285
+ :'trading_volume_time' => :'Time',
286
+ :'vwap' => :'Float',
287
+ :'trading_value' => :'Float',
288
+ :'bid_qty' => :'Float',
289
+ :'bid_price' => :'Float',
290
+ :'bid_time' => :'Time',
291
+ :'bid_sign' => :'String',
292
+ :'market_order_sell_qty' => :'Float',
293
+ :'sell1' => :'BoardSuccessSell1',
294
+ :'sell2' => :'BoardSuccessSell2',
295
+ :'sell3' => :'BoardSuccessSell3',
296
+ :'sell4' => :'BoardSuccessSell4',
297
+ :'sell5' => :'BoardSuccessSell5',
298
+ :'sell6' => :'BoardSuccessSell6',
299
+ :'sell7' => :'BoardSuccessSell7',
300
+ :'sell8' => :'BoardSuccessSell8',
301
+ :'sell9' => :'BoardSuccessSell9',
302
+ :'sell10' => :'BoardSuccessSell10',
303
+ :'ask_qty' => :'Float',
304
+ :'ask_price' => :'Float',
305
+ :'ask_time' => :'Time',
306
+ :'ask_sign' => :'String',
307
+ :'market_order_buy_qty' => :'Float',
308
+ :'buy1' => :'BoardSuccessBuy1',
309
+ :'buy2' => :'BoardSuccessBuy2',
310
+ :'buy3' => :'BoardSuccessBuy3',
311
+ :'buy4' => :'BoardSuccessBuy4',
312
+ :'buy5' => :'BoardSuccessBuy5',
313
+ :'buy6' => :'BoardSuccessBuy6',
314
+ :'buy7' => :'BoardSuccessBuy7',
315
+ :'buy8' => :'BoardSuccessBuy8',
316
+ :'buy9' => :'BoardSuccessBuy9',
317
+ :'buy10' => :'BoardSuccessBuy10',
318
+ :'over_sell_qty' => :'Float',
319
+ :'under_buy_qty' => :'Float',
320
+ :'total_market_value' => :'Float',
321
+ :'clearing_price' => :'Float',
322
+ :'iv' => :'Float',
323
+ :'gamma' => :'Float',
324
+ :'theta' => :'Float',
325
+ :'vega' => :'Float',
326
+ :'delta' => :'Float',
327
+ :'security_type' => :'Integer'
328
+ }
329
+ end
330
+
331
+ # List of attributes with nullable: true
332
+ def self.openapi_nullable
333
+ Set.new([
334
+ ])
335
+ end
336
+
337
+ # Initializes the object
338
+ # @param [Hash] attributes Model attributes in the form of hash
339
+ def initialize(attributes = {})
340
+ if (!attributes.is_a?(Hash))
341
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KabustationClient::BoardSuccess` initialize method"
342
+ end
343
+
344
+ # check to see if the attribute exists and convert string to symbol for hash key
345
+ attributes = attributes.each_with_object({}) { |(k, v), h|
346
+ if (!self.class.attribute_map.key?(k.to_sym))
347
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KabustationClient::BoardSuccess`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
348
+ end
349
+ h[k.to_sym] = v
350
+ }
351
+
352
+ if attributes.key?(:'symbol')
353
+ self.symbol = attributes[:'symbol']
354
+ end
355
+
356
+ if attributes.key?(:'symbol_name')
357
+ self.symbol_name = attributes[:'symbol_name']
358
+ end
359
+
360
+ if attributes.key?(:'exchange')
361
+ self.exchange = attributes[:'exchange']
362
+ end
363
+
364
+ if attributes.key?(:'exchange_name')
365
+ self.exchange_name = attributes[:'exchange_name']
366
+ end
367
+
368
+ if attributes.key?(:'current_price')
369
+ self.current_price = attributes[:'current_price']
370
+ end
371
+
372
+ if attributes.key?(:'current_price_time')
373
+ self.current_price_time = attributes[:'current_price_time']
374
+ end
375
+
376
+ if attributes.key?(:'current_price_change_status')
377
+ self.current_price_change_status = attributes[:'current_price_change_status']
378
+ end
379
+
380
+ if attributes.key?(:'current_price_status')
381
+ self.current_price_status = attributes[:'current_price_status']
382
+ end
383
+
384
+ if attributes.key?(:'calc_price')
385
+ self.calc_price = attributes[:'calc_price']
386
+ end
387
+
388
+ if attributes.key?(:'previous_close')
389
+ self.previous_close = attributes[:'previous_close']
390
+ end
391
+
392
+ if attributes.key?(:'previous_close_time')
393
+ self.previous_close_time = attributes[:'previous_close_time']
394
+ end
395
+
396
+ if attributes.key?(:'change_previous_close')
397
+ self.change_previous_close = attributes[:'change_previous_close']
398
+ end
399
+
400
+ if attributes.key?(:'change_previous_close_per')
401
+ self.change_previous_close_per = attributes[:'change_previous_close_per']
402
+ end
403
+
404
+ if attributes.key?(:'opening_price')
405
+ self.opening_price = attributes[:'opening_price']
406
+ end
407
+
408
+ if attributes.key?(:'opening_price_time')
409
+ self.opening_price_time = attributes[:'opening_price_time']
410
+ end
411
+
412
+ if attributes.key?(:'high_price')
413
+ self.high_price = attributes[:'high_price']
414
+ end
415
+
416
+ if attributes.key?(:'high_price_time')
417
+ self.high_price_time = attributes[:'high_price_time']
418
+ end
419
+
420
+ if attributes.key?(:'low_price')
421
+ self.low_price = attributes[:'low_price']
422
+ end
423
+
424
+ if attributes.key?(:'low_price_time')
425
+ self.low_price_time = attributes[:'low_price_time']
426
+ end
427
+
428
+ if attributes.key?(:'trading_volume')
429
+ self.trading_volume = attributes[:'trading_volume']
430
+ end
431
+
432
+ if attributes.key?(:'trading_volume_time')
433
+ self.trading_volume_time = attributes[:'trading_volume_time']
434
+ end
435
+
436
+ if attributes.key?(:'vwap')
437
+ self.vwap = attributes[:'vwap']
438
+ end
439
+
440
+ if attributes.key?(:'trading_value')
441
+ self.trading_value = attributes[:'trading_value']
442
+ end
443
+
444
+ if attributes.key?(:'bid_qty')
445
+ self.bid_qty = attributes[:'bid_qty']
446
+ end
447
+
448
+ if attributes.key?(:'bid_price')
449
+ self.bid_price = attributes[:'bid_price']
450
+ end
451
+
452
+ if attributes.key?(:'bid_time')
453
+ self.bid_time = attributes[:'bid_time']
454
+ end
455
+
456
+ if attributes.key?(:'bid_sign')
457
+ self.bid_sign = attributes[:'bid_sign']
458
+ end
459
+
460
+ if attributes.key?(:'market_order_sell_qty')
461
+ self.market_order_sell_qty = attributes[:'market_order_sell_qty']
462
+ end
463
+
464
+ if attributes.key?(:'sell1')
465
+ self.sell1 = attributes[:'sell1']
466
+ end
467
+
468
+ if attributes.key?(:'sell2')
469
+ self.sell2 = attributes[:'sell2']
470
+ end
471
+
472
+ if attributes.key?(:'sell3')
473
+ self.sell3 = attributes[:'sell3']
474
+ end
475
+
476
+ if attributes.key?(:'sell4')
477
+ self.sell4 = attributes[:'sell4']
478
+ end
479
+
480
+ if attributes.key?(:'sell5')
481
+ self.sell5 = attributes[:'sell5']
482
+ end
483
+
484
+ if attributes.key?(:'sell6')
485
+ self.sell6 = attributes[:'sell6']
486
+ end
487
+
488
+ if attributes.key?(:'sell7')
489
+ self.sell7 = attributes[:'sell7']
490
+ end
491
+
492
+ if attributes.key?(:'sell8')
493
+ self.sell8 = attributes[:'sell8']
494
+ end
495
+
496
+ if attributes.key?(:'sell9')
497
+ self.sell9 = attributes[:'sell9']
498
+ end
499
+
500
+ if attributes.key?(:'sell10')
501
+ self.sell10 = attributes[:'sell10']
502
+ end
503
+
504
+ if attributes.key?(:'ask_qty')
505
+ self.ask_qty = attributes[:'ask_qty']
506
+ end
507
+
508
+ if attributes.key?(:'ask_price')
509
+ self.ask_price = attributes[:'ask_price']
510
+ end
511
+
512
+ if attributes.key?(:'ask_time')
513
+ self.ask_time = attributes[:'ask_time']
514
+ end
515
+
516
+ if attributes.key?(:'ask_sign')
517
+ self.ask_sign = attributes[:'ask_sign']
518
+ end
519
+
520
+ if attributes.key?(:'market_order_buy_qty')
521
+ self.market_order_buy_qty = attributes[:'market_order_buy_qty']
522
+ end
523
+
524
+ if attributes.key?(:'buy1')
525
+ self.buy1 = attributes[:'buy1']
526
+ end
527
+
528
+ if attributes.key?(:'buy2')
529
+ self.buy2 = attributes[:'buy2']
530
+ end
531
+
532
+ if attributes.key?(:'buy3')
533
+ self.buy3 = attributes[:'buy3']
534
+ end
535
+
536
+ if attributes.key?(:'buy4')
537
+ self.buy4 = attributes[:'buy4']
538
+ end
539
+
540
+ if attributes.key?(:'buy5')
541
+ self.buy5 = attributes[:'buy5']
542
+ end
543
+
544
+ if attributes.key?(:'buy6')
545
+ self.buy6 = attributes[:'buy6']
546
+ end
547
+
548
+ if attributes.key?(:'buy7')
549
+ self.buy7 = attributes[:'buy7']
550
+ end
551
+
552
+ if attributes.key?(:'buy8')
553
+ self.buy8 = attributes[:'buy8']
554
+ end
555
+
556
+ if attributes.key?(:'buy9')
557
+ self.buy9 = attributes[:'buy9']
558
+ end
559
+
560
+ if attributes.key?(:'buy10')
561
+ self.buy10 = attributes[:'buy10']
562
+ end
563
+
564
+ if attributes.key?(:'over_sell_qty')
565
+ self.over_sell_qty = attributes[:'over_sell_qty']
566
+ end
567
+
568
+ if attributes.key?(:'under_buy_qty')
569
+ self.under_buy_qty = attributes[:'under_buy_qty']
570
+ end
571
+
572
+ if attributes.key?(:'total_market_value')
573
+ self.total_market_value = attributes[:'total_market_value']
574
+ end
575
+
576
+ if attributes.key?(:'clearing_price')
577
+ self.clearing_price = attributes[:'clearing_price']
578
+ end
579
+
580
+ if attributes.key?(:'iv')
581
+ self.iv = attributes[:'iv']
582
+ end
583
+
584
+ if attributes.key?(:'gamma')
585
+ self.gamma = attributes[:'gamma']
586
+ end
587
+
588
+ if attributes.key?(:'theta')
589
+ self.theta = attributes[:'theta']
590
+ end
591
+
592
+ if attributes.key?(:'vega')
593
+ self.vega = attributes[:'vega']
594
+ end
595
+
596
+ if attributes.key?(:'delta')
597
+ self.delta = attributes[:'delta']
598
+ end
599
+
600
+ if attributes.key?(:'security_type')
601
+ self.security_type = attributes[:'security_type']
602
+ end
603
+ end
604
+
605
+ # Show invalid properties with the reasons. Usually used together with valid?
606
+ # @return Array for valid properties with the reasons
607
+ def list_invalid_properties
608
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
609
+ invalid_properties = Array.new
610
+ invalid_properties
611
+ end
612
+
613
+ # Check to see if the all the properties in the model are valid
614
+ # @return true if the model is valid
615
+ def valid?
616
+ warn '[DEPRECATED] the `valid?` method is obsolete'
617
+ true
618
+ end
619
+
620
+ # Checks equality by comparing each attribute.
621
+ # @param [Object] Object to be compared
622
+ def ==(o)
623
+ return true if self.equal?(o)
624
+ self.class == o.class &&
625
+ symbol == o.symbol &&
626
+ symbol_name == o.symbol_name &&
627
+ exchange == o.exchange &&
628
+ exchange_name == o.exchange_name &&
629
+ current_price == o.current_price &&
630
+ current_price_time == o.current_price_time &&
631
+ current_price_change_status == o.current_price_change_status &&
632
+ current_price_status == o.current_price_status &&
633
+ calc_price == o.calc_price &&
634
+ previous_close == o.previous_close &&
635
+ previous_close_time == o.previous_close_time &&
636
+ change_previous_close == o.change_previous_close &&
637
+ change_previous_close_per == o.change_previous_close_per &&
638
+ opening_price == o.opening_price &&
639
+ opening_price_time == o.opening_price_time &&
640
+ high_price == o.high_price &&
641
+ high_price_time == o.high_price_time &&
642
+ low_price == o.low_price &&
643
+ low_price_time == o.low_price_time &&
644
+ trading_volume == o.trading_volume &&
645
+ trading_volume_time == o.trading_volume_time &&
646
+ vwap == o.vwap &&
647
+ trading_value == o.trading_value &&
648
+ bid_qty == o.bid_qty &&
649
+ bid_price == o.bid_price &&
650
+ bid_time == o.bid_time &&
651
+ bid_sign == o.bid_sign &&
652
+ market_order_sell_qty == o.market_order_sell_qty &&
653
+ sell1 == o.sell1 &&
654
+ sell2 == o.sell2 &&
655
+ sell3 == o.sell3 &&
656
+ sell4 == o.sell4 &&
657
+ sell5 == o.sell5 &&
658
+ sell6 == o.sell6 &&
659
+ sell7 == o.sell7 &&
660
+ sell8 == o.sell8 &&
661
+ sell9 == o.sell9 &&
662
+ sell10 == o.sell10 &&
663
+ ask_qty == o.ask_qty &&
664
+ ask_price == o.ask_price &&
665
+ ask_time == o.ask_time &&
666
+ ask_sign == o.ask_sign &&
667
+ market_order_buy_qty == o.market_order_buy_qty &&
668
+ buy1 == o.buy1 &&
669
+ buy2 == o.buy2 &&
670
+ buy3 == o.buy3 &&
671
+ buy4 == o.buy4 &&
672
+ buy5 == o.buy5 &&
673
+ buy6 == o.buy6 &&
674
+ buy7 == o.buy7 &&
675
+ buy8 == o.buy8 &&
676
+ buy9 == o.buy9 &&
677
+ buy10 == o.buy10 &&
678
+ over_sell_qty == o.over_sell_qty &&
679
+ under_buy_qty == o.under_buy_qty &&
680
+ total_market_value == o.total_market_value &&
681
+ clearing_price == o.clearing_price &&
682
+ iv == o.iv &&
683
+ gamma == o.gamma &&
684
+ theta == o.theta &&
685
+ vega == o.vega &&
686
+ delta == o.delta &&
687
+ security_type == o.security_type
688
+ end
689
+
690
+ # @see the `==` method
691
+ # @param [Object] Object to be compared
692
+ def eql?(o)
693
+ self == o
694
+ end
695
+
696
+ # Calculates hash code according to all attributes.
697
+ # @return [Integer] Hash code
698
+ def hash
699
+ [symbol, symbol_name, exchange, exchange_name, current_price, current_price_time, current_price_change_status, current_price_status, calc_price, previous_close, previous_close_time, change_previous_close, change_previous_close_per, opening_price, opening_price_time, high_price, high_price_time, low_price, low_price_time, trading_volume, trading_volume_time, vwap, trading_value, bid_qty, bid_price, bid_time, bid_sign, market_order_sell_qty, sell1, sell2, sell3, sell4, sell5, sell6, sell7, sell8, sell9, sell10, ask_qty, ask_price, ask_time, ask_sign, market_order_buy_qty, buy1, buy2, buy3, buy4, buy5, buy6, buy7, buy8, buy9, buy10, over_sell_qty, under_buy_qty, total_market_value, clearing_price, iv, gamma, theta, vega, delta, security_type].hash
700
+ end
701
+
702
+ # Builds the object from hash
703
+ # @param [Hash] attributes Model attributes in the form of hash
704
+ # @return [Object] Returns the model itself
705
+ def self.build_from_hash(attributes)
706
+ return nil unless attributes.is_a?(Hash)
707
+ attributes = attributes.transform_keys(&:to_sym)
708
+ transformed_hash = {}
709
+ openapi_types.each_pair do |key, type|
710
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
711
+ transformed_hash["#{key}"] = nil
712
+ elsif type =~ /\AArray<(.*)>/i
713
+ # check to ensure the input is an array given that the attribute
714
+ # is documented as an array but the input is not
715
+ if attributes[attribute_map[key]].is_a?(Array)
716
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
717
+ end
718
+ elsif !attributes[attribute_map[key]].nil?
719
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
720
+ end
721
+ end
722
+ new(transformed_hash)
723
+ end
724
+
725
+ # Deserializes the data based on type
726
+ # @param string type Data type
727
+ # @param string value Value to be deserialized
728
+ # @return [Object] Deserialized data
729
+ def self._deserialize(type, value)
730
+ case type.to_sym
731
+ when :Time
732
+ Time.parse(value)
733
+ when :Date
734
+ Date.parse(value)
735
+ when :String
736
+ value.to_s
737
+ when :Integer
738
+ value.to_i
739
+ when :Float
740
+ value.to_f
741
+ when :Boolean
742
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
743
+ true
744
+ else
745
+ false
746
+ end
747
+ when :Object
748
+ # generic object (usually a Hash), return directly
749
+ value
750
+ when /\AArray<(?<inner_type>.+)>\z/
751
+ inner_type = Regexp.last_match[:inner_type]
752
+ value.map { |v| _deserialize(inner_type, v) }
753
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
754
+ k_type = Regexp.last_match[:k_type]
755
+ v_type = Regexp.last_match[:v_type]
756
+ {}.tap do |hash|
757
+ value.each do |k, v|
758
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
759
+ end
760
+ end
761
+ else # model
762
+ # models (e.g. Pet) or oneOf
763
+ klass = KabustationClient.const_get(type)
764
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
765
+ end
766
+ end
767
+
768
+ # Returns the string representation of the object
769
+ # @return [String] String presentation of the object
770
+ def to_s
771
+ to_hash.to_s
772
+ end
773
+
774
+ # to_body is an alias to to_hash (backward compatibility)
775
+ # @return [Hash] Returns the object in the form of hash
776
+ def to_body
777
+ to_hash
778
+ end
779
+
780
+ # Returns the object in the form of hash
781
+ # @return [Hash] Returns the object in the form of hash
782
+ def to_hash
783
+ hash = {}
784
+ self.class.attribute_map.each_pair do |attr, param|
785
+ value = self.send(attr)
786
+ if value.nil?
787
+ is_nullable = self.class.openapi_nullable.include?(attr)
788
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
789
+ end
790
+
791
+ hash[param] = _to_hash(value)
792
+ end
793
+ hash
794
+ end
795
+
796
+ # Outputs non-array value in the form of hash
797
+ # For object, use to_hash. Otherwise, just return the value
798
+ # @param [Object] value Any valid value
799
+ # @return [Hash] Returns the value in the form of hash
800
+ def _to_hash(value)
801
+ if value.is_a?(Array)
802
+ value.compact.map { |v| _to_hash(v) }
803
+ elsif value.is_a?(Hash)
804
+ {}.tap do |hash|
805
+ value.each { |k, v| hash[k] = _to_hash(v) }
806
+ end
807
+ elsif value.respond_to? :to_hash
808
+ value.to_hash
809
+ else
810
+ value
811
+ end
812
+ end
813
+
814
+ end
815
+
816
+ end