tinkoff_invest_client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +169 -0
  4. data/Rakefile +10 -0
  5. data/docs/BrokerAccountType.md +15 -0
  6. data/docs/Candle.md +32 -0
  7. data/docs/CandleResolution.md +15 -0
  8. data/docs/Candles.md +22 -0
  9. data/docs/CandlesResponse.md +22 -0
  10. data/docs/Currencies.md +18 -0
  11. data/docs/Currency.md +15 -0
  12. data/docs/CurrencyPosition.md +22 -0
  13. data/docs/Empty.md +22 -0
  14. data/docs/Error.md +22 -0
  15. data/docs/ErrorPayload.md +20 -0
  16. data/docs/InstrumentType.md +15 -0
  17. data/docs/LimitOrderRequest.md +22 -0
  18. data/docs/LimitOrderResponse.md +22 -0
  19. data/docs/MarketApi.md +547 -0
  20. data/docs/MarketInstrument.md +34 -0
  21. data/docs/MarketInstrumentList.md +20 -0
  22. data/docs/MarketInstrumentListResponse.md +22 -0
  23. data/docs/MarketInstrumentResponse.md +22 -0
  24. data/docs/MarketOrderRequest.md +20 -0
  25. data/docs/MarketOrderResponse.md +22 -0
  26. data/docs/MoneyAmount.md +20 -0
  27. data/docs/Operation.md +44 -0
  28. data/docs/OperationStatus.md +15 -0
  29. data/docs/OperationTrade.md +24 -0
  30. data/docs/OperationType.md +15 -0
  31. data/docs/OperationTypeWithCommission.md +15 -0
  32. data/docs/Operations.md +18 -0
  33. data/docs/OperationsApi.md +83 -0
  34. data/docs/OperationsResponse.md +22 -0
  35. data/docs/Order.md +32 -0
  36. data/docs/OrderResponse.md +20 -0
  37. data/docs/OrderStatus.md +15 -0
  38. data/docs/OrderType.md +15 -0
  39. data/docs/Orderbook.md +38 -0
  40. data/docs/OrderbookResponse.md +22 -0
  41. data/docs/OrdersApi.md +297 -0
  42. data/docs/OrdersResponse.md +22 -0
  43. data/docs/PlacedLimitOrder.md +32 -0
  44. data/docs/PlacedMarketOrder.md +32 -0
  45. data/docs/Portfolio.md +18 -0
  46. data/docs/PortfolioApi.md +147 -0
  47. data/docs/PortfolioCurrenciesResponse.md +22 -0
  48. data/docs/PortfolioPosition.md +38 -0
  49. data/docs/PortfolioResponse.md +22 -0
  50. data/docs/SandboxAccount.md +20 -0
  51. data/docs/SandboxApi.md +367 -0
  52. data/docs/SandboxCurrency.md +15 -0
  53. data/docs/SandboxRegisterRequest.md +18 -0
  54. data/docs/SandboxRegisterResponse.md +22 -0
  55. data/docs/SandboxSetCurrencyBalanceRequest.md +20 -0
  56. data/docs/SandboxSetPositionBalanceRequest.md +20 -0
  57. data/docs/SearchMarketInstrument.md +32 -0
  58. data/docs/SearchMarketInstrumentResponse.md +22 -0
  59. data/docs/TradeStatus.md +15 -0
  60. data/docs/UserAccount.md +20 -0
  61. data/docs/UserAccounts.md +18 -0
  62. data/docs/UserAccountsResponse.md +22 -0
  63. data/docs/UserApi.md +72 -0
  64. data/generator_options.md +1 -0
  65. data/git_push.sh +58 -0
  66. data/lib/tinkoff_invest_client.rb +98 -0
  67. data/lib/tinkoff_invest_client/api/market_api.rb +518 -0
  68. data/lib/tinkoff_invest_client/api/operations_api.rb +97 -0
  69. data/lib/tinkoff_invest_client/api/orders_api.rb +291 -0
  70. data/lib/tinkoff_invest_client/api/portfolio_api.rb +138 -0
  71. data/lib/tinkoff_invest_client/api/sandbox_api.rb +335 -0
  72. data/lib/tinkoff_invest_client/api/user_api.rb +77 -0
  73. data/lib/tinkoff_invest_client/api_client.rb +390 -0
  74. data/lib/tinkoff_invest_client/api_error.rb +57 -0
  75. data/lib/tinkoff_invest_client/configuration.rb +281 -0
  76. data/lib/tinkoff_invest_client/models/broker_account_type.rb +37 -0
  77. data/lib/tinkoff_invest_client/models/candle.rb +322 -0
  78. data/lib/tinkoff_invest_client/models/candle_resolution.rb +46 -0
  79. data/lib/tinkoff_invest_client/models/candles.rb +253 -0
  80. data/lib/tinkoff_invest_client/models/candles_response.rb +253 -0
  81. data/lib/tinkoff_invest_client/models/currencies.rb +225 -0
  82. data/lib/tinkoff_invest_client/models/currency.rb +44 -0
  83. data/lib/tinkoff_invest_client/models/currency_position.rb +246 -0
  84. data/lib/tinkoff_invest_client/models/empty.rb +253 -0
  85. data/lib/tinkoff_invest_client/models/error.rb +253 -0
  86. data/lib/tinkoff_invest_client/models/error_payload.rb +227 -0
  87. data/lib/tinkoff_invest_client/models/instrument_type.rb +39 -0
  88. data/lib/tinkoff_invest_client/models/limit_order_request.rb +251 -0
  89. data/lib/tinkoff_invest_client/models/limit_order_response.rb +253 -0
  90. data/lib/tinkoff_invest_client/models/market_instrument.rb +317 -0
  91. data/lib/tinkoff_invest_client/models/market_instrument_list.rb +239 -0
  92. data/lib/tinkoff_invest_client/models/market_instrument_list_response.rb +253 -0
  93. data/lib/tinkoff_invest_client/models/market_instrument_response.rb +253 -0
  94. data/lib/tinkoff_invest_client/models/market_order_request.rb +237 -0
  95. data/lib/tinkoff_invest_client/models/market_order_response.rb +253 -0
  96. data/lib/tinkoff_invest_client/models/money_amount.rb +237 -0
  97. data/lib/tinkoff_invest_client/models/operation.rb +370 -0
  98. data/lib/tinkoff_invest_client/models/operation_status.rb +38 -0
  99. data/lib/tinkoff_invest_client/models/operation_trade.rb +266 -0
  100. data/lib/tinkoff_invest_client/models/operation_type.rb +37 -0
  101. data/lib/tinkoff_invest_client/models/operation_type_with_commission.rb +56 -0
  102. data/lib/tinkoff_invest_client/models/operations.rb +225 -0
  103. data/lib/tinkoff_invest_client/models/operations_response.rb +253 -0
  104. data/lib/tinkoff_invest_client/models/order.rb +321 -0
  105. data/lib/tinkoff_invest_client/models/order_response.rb +237 -0
  106. data/lib/tinkoff_invest_client/models/order_status.rb +44 -0
  107. data/lib/tinkoff_invest_client/models/order_type.rb +37 -0
  108. data/lib/tinkoff_invest_client/models/orderbook.rb +346 -0
  109. data/lib/tinkoff_invest_client/models/orderbook_response.rb +253 -0
  110. data/lib/tinkoff_invest_client/models/orders_response.rb +255 -0
  111. data/lib/tinkoff_invest_client/models/placed_limit_order.rb +307 -0
  112. data/lib/tinkoff_invest_client/models/placed_market_order.rb +307 -0
  113. data/lib/tinkoff_invest_client/models/portfolio.rb +225 -0
  114. data/lib/tinkoff_invest_client/models/portfolio_currencies_response.rb +253 -0
  115. data/lib/tinkoff_invest_client/models/portfolio_position.rb +333 -0
  116. data/lib/tinkoff_invest_client/models/portfolio_response.rb +253 -0
  117. data/lib/tinkoff_invest_client/models/sandbox_account.rb +237 -0
  118. data/lib/tinkoff_invest_client/models/sandbox_currency.rb +44 -0
  119. data/lib/tinkoff_invest_client/models/sandbox_register_request.rb +218 -0
  120. data/lib/tinkoff_invest_client/models/sandbox_register_response.rb +253 -0
  121. data/lib/tinkoff_invest_client/models/sandbox_set_currency_balance_request.rb +237 -0
  122. data/lib/tinkoff_invest_client/models/sandbox_set_position_balance_request.rb +232 -0
  123. data/lib/tinkoff_invest_client/models/search_market_instrument.rb +307 -0
  124. data/lib/tinkoff_invest_client/models/search_market_instrument_response.rb +253 -0
  125. data/lib/tinkoff_invest_client/models/trade_status.rb +37 -0
  126. data/lib/tinkoff_invest_client/models/user_account.rb +237 -0
  127. data/lib/tinkoff_invest_client/models/user_accounts.rb +225 -0
  128. data/lib/tinkoff_invest_client/models/user_accounts_response.rb +253 -0
  129. data/lib/tinkoff_invest_client/version.rb +15 -0
  130. data/spec/api/market_api_spec.rb +123 -0
  131. data/spec/api/operations_api_spec.rb +49 -0
  132. data/spec/api/orders_api_spec.rb +84 -0
  133. data/spec/api/portfolio_api_spec.rb +57 -0
  134. data/spec/api/sandbox_api_spec.rb +95 -0
  135. data/spec/api/user_api_spec.rb +45 -0
  136. data/spec/api_client_spec.rb +226 -0
  137. data/spec/configuration_spec.rb +42 -0
  138. data/spec/models/broker_account_type_spec.rb +28 -0
  139. data/spec/models/candle_resolution_spec.rb +28 -0
  140. data/spec/models/candle_spec.rb +76 -0
  141. data/spec/models/candles_response_spec.rb +46 -0
  142. data/spec/models/candles_spec.rb +46 -0
  143. data/spec/models/currencies_spec.rb +34 -0
  144. data/spec/models/currency_position_spec.rb +46 -0
  145. data/spec/models/currency_spec.rb +28 -0
  146. data/spec/models/empty_spec.rb +46 -0
  147. data/spec/models/error_payload_spec.rb +40 -0
  148. data/spec/models/error_spec.rb +46 -0
  149. data/spec/models/instrument_type_spec.rb +28 -0
  150. data/spec/models/limit_order_request_spec.rb +46 -0
  151. data/spec/models/limit_order_response_spec.rb +46 -0
  152. data/spec/models/market_instrument_list_response_spec.rb +46 -0
  153. data/spec/models/market_instrument_list_spec.rb +40 -0
  154. data/spec/models/market_instrument_response_spec.rb +46 -0
  155. data/spec/models/market_instrument_spec.rb +82 -0
  156. data/spec/models/market_order_request_spec.rb +40 -0
  157. data/spec/models/market_order_response_spec.rb +46 -0
  158. data/spec/models/money_amount_spec.rb +40 -0
  159. data/spec/models/operation_spec.rb +112 -0
  160. data/spec/models/operation_status_spec.rb +28 -0
  161. data/spec/models/operation_trade_spec.rb +52 -0
  162. data/spec/models/operation_type_spec.rb +28 -0
  163. data/spec/models/operation_type_with_commission_spec.rb +28 -0
  164. data/spec/models/operations_response_spec.rb +46 -0
  165. data/spec/models/operations_spec.rb +34 -0
  166. data/spec/models/order_response_spec.rb +40 -0
  167. data/spec/models/order_spec.rb +76 -0
  168. data/spec/models/order_status_spec.rb +28 -0
  169. data/spec/models/order_type_spec.rb +28 -0
  170. data/spec/models/orderbook_response_spec.rb +46 -0
  171. data/spec/models/orderbook_spec.rb +94 -0
  172. data/spec/models/orders_response_spec.rb +46 -0
  173. data/spec/models/placed_limit_order_spec.rb +76 -0
  174. data/spec/models/placed_market_order_spec.rb +76 -0
  175. data/spec/models/portfolio_currencies_response_spec.rb +46 -0
  176. data/spec/models/portfolio_position_spec.rb +94 -0
  177. data/spec/models/portfolio_response_spec.rb +46 -0
  178. data/spec/models/portfolio_spec.rb +34 -0
  179. data/spec/models/sandbox_account_spec.rb +40 -0
  180. data/spec/models/sandbox_currency_spec.rb +28 -0
  181. data/spec/models/sandbox_register_request_spec.rb +34 -0
  182. data/spec/models/sandbox_register_response_spec.rb +46 -0
  183. data/spec/models/sandbox_set_currency_balance_request_spec.rb +40 -0
  184. data/spec/models/sandbox_set_position_balance_request_spec.rb +40 -0
  185. data/spec/models/search_market_instrument_response_spec.rb +46 -0
  186. data/spec/models/search_market_instrument_spec.rb +76 -0
  187. data/spec/models/trade_status_spec.rb +28 -0
  188. data/spec/models/user_account_spec.rb +40 -0
  189. data/spec/models/user_accounts_response_spec.rb +46 -0
  190. data/spec/models/user_accounts_spec.rb +34 -0
  191. data/spec/spec_helper.rb +111 -0
  192. data/tinkoff_invest_client.gemspec +38 -0
  193. metadata +336 -0
@@ -0,0 +1,15 @@
1
+ # TinkoffInvestClient::InstrumentType
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'tinkoff_invest_client'
12
+
13
+ instance = TinkoffInvestClient::InstrumentType.new()
14
+ ```
15
+
@@ -0,0 +1,22 @@
1
+ # TinkoffInvestClient::LimitOrderRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **lots** | **Integer** | | |
8
+ | **operation** | [**OperationType**](OperationType.md) | | |
9
+ | **price** | **Float** | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'tinkoff_invest_client'
15
+
16
+ instance = TinkoffInvestClient::LimitOrderRequest.new(
17
+ lots: null,
18
+ operation: null,
19
+ price: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # TinkoffInvestClient::LimitOrderResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **tracking_id** | **String** | | |
8
+ | **status** | **String** | | [default to 'Ok'] |
9
+ | **payload** | [**PlacedLimitOrder**](PlacedLimitOrder.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'tinkoff_invest_client'
15
+
16
+ instance = TinkoffInvestClient::LimitOrderResponse.new(
17
+ tracking_id: null,
18
+ status: null,
19
+ payload: null
20
+ )
21
+ ```
22
+
data/docs/MarketApi.md ADDED
@@ -0,0 +1,547 @@
1
+ # TinkoffInvestClient::MarketApi
2
+
3
+ All URIs are relative to *https://api-invest.tinkoff.ru/openapi*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**market_bonds_get**](MarketApi.md#market_bonds_get) | **GET** /market/bonds | Получение списка облигаций |
8
+ | [**market_candles_get**](MarketApi.md#market_candles_get) | **GET** /market/candles | Получение исторических свечей по FIGI |
9
+ | [**market_currencies_get**](MarketApi.md#market_currencies_get) | **GET** /market/currencies | Получение списка валютных пар |
10
+ | [**market_etfs_get**](MarketApi.md#market_etfs_get) | **GET** /market/etfs | Получение списка ETF |
11
+ | [**market_orderbook_get**](MarketApi.md#market_orderbook_get) | **GET** /market/orderbook | Получение стакана по FIGI |
12
+ | [**market_search_by_figi_get**](MarketApi.md#market_search_by_figi_get) | **GET** /market/search/by-figi | Получение инструмента по FIGI |
13
+ | [**market_search_by_ticker_get**](MarketApi.md#market_search_by_ticker_get) | **GET** /market/search/by-ticker | Получение инструмента по тикеру |
14
+ | [**market_stocks_get**](MarketApi.md#market_stocks_get) | **GET** /market/stocks | Получение списка акций |
15
+
16
+
17
+ ## market_bonds_get
18
+
19
+ > <MarketInstrumentListResponse> market_bonds_get
20
+
21
+ Получение списка облигаций
22
+
23
+ ### Examples
24
+
25
+ ```ruby
26
+ require 'time'
27
+ require 'tinkoff_invest_client'
28
+ # setup authorization
29
+ TinkoffInvestClient.configure do |config|
30
+ # Configure Bearer authorization: sso_auth
31
+ config.access_token = 'YOUR_BEARER_TOKEN'
32
+ end
33
+
34
+ api_instance = TinkoffInvestClient::MarketApi.new
35
+
36
+ begin
37
+ # Получение списка облигаций
38
+ result = api_instance.market_bonds_get
39
+ p result
40
+ rescue TinkoffInvestClient::ApiError => e
41
+ puts "Error when calling MarketApi->market_bonds_get: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the market_bonds_get_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<MarketInstrumentListResponse>, Integer, Hash)> market_bonds_get_with_http_info
50
+
51
+ ```ruby
52
+ begin
53
+ # Получение списка облигаций
54
+ data, status_code, headers = api_instance.market_bonds_get_with_http_info
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <MarketInstrumentListResponse>
58
+ rescue TinkoffInvestClient::ApiError => e
59
+ puts "Error when calling MarketApi->market_bonds_get_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ This endpoint does not need any parameter.
66
+
67
+ ### Return type
68
+
69
+ [**MarketInstrumentListResponse**](MarketInstrumentListResponse.md)
70
+
71
+ ### Authorization
72
+
73
+ [sso_auth](../README.md#sso_auth)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: Not defined
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## market_candles_get
82
+
83
+ > <CandlesResponse> market_candles_get(figi, from, to, interval)
84
+
85
+ Получение исторических свечей по FIGI
86
+
87
+ ### Examples
88
+
89
+ ```ruby
90
+ require 'time'
91
+ require 'tinkoff_invest_client'
92
+ # setup authorization
93
+ TinkoffInvestClient.configure do |config|
94
+ # Configure Bearer authorization: sso_auth
95
+ config.access_token = 'YOUR_BEARER_TOKEN'
96
+ end
97
+
98
+ api_instance = TinkoffInvestClient::MarketApi.new
99
+ figi = 'figi_example' # String | FIGI
100
+ from = Time.parse('2019-08-19T18:38:33.131642+03:00') # Time | Начало временного промежутка
101
+ to = Time.parse('2019-08-19T18:38:33.131642+03:00') # Time | Конец временного промежутка
102
+ interval = TinkoffInvestClient::CandleResolution::N1MIN # CandleResolution | Интервал свечи
103
+
104
+ begin
105
+ # Получение исторических свечей по FIGI
106
+ result = api_instance.market_candles_get(figi, from, to, interval)
107
+ p result
108
+ rescue TinkoffInvestClient::ApiError => e
109
+ puts "Error when calling MarketApi->market_candles_get: #{e}"
110
+ end
111
+ ```
112
+
113
+ #### Using the market_candles_get_with_http_info variant
114
+
115
+ This returns an Array which contains the response data, status code and headers.
116
+
117
+ > <Array(<CandlesResponse>, Integer, Hash)> market_candles_get_with_http_info(figi, from, to, interval)
118
+
119
+ ```ruby
120
+ begin
121
+ # Получение исторических свечей по FIGI
122
+ data, status_code, headers = api_instance.market_candles_get_with_http_info(figi, from, to, interval)
123
+ p status_code # => 2xx
124
+ p headers # => { ... }
125
+ p data # => <CandlesResponse>
126
+ rescue TinkoffInvestClient::ApiError => e
127
+ puts "Error when calling MarketApi->market_candles_get_with_http_info: #{e}"
128
+ end
129
+ ```
130
+
131
+ ### Parameters
132
+
133
+ | Name | Type | Description | Notes |
134
+ | ---- | ---- | ----------- | ----- |
135
+ | **figi** | **String** | FIGI | |
136
+ | **from** | **Time** | Начало временного промежутка | |
137
+ | **to** | **Time** | Конец временного промежутка | |
138
+ | **interval** | [**CandleResolution**](.md) | Интервал свечи | |
139
+
140
+ ### Return type
141
+
142
+ [**CandlesResponse**](CandlesResponse.md)
143
+
144
+ ### Authorization
145
+
146
+ [sso_auth](../README.md#sso_auth)
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: Not defined
151
+ - **Accept**: application/json
152
+
153
+
154
+ ## market_currencies_get
155
+
156
+ > <MarketInstrumentListResponse> market_currencies_get
157
+
158
+ Получение списка валютных пар
159
+
160
+ ### Examples
161
+
162
+ ```ruby
163
+ require 'time'
164
+ require 'tinkoff_invest_client'
165
+ # setup authorization
166
+ TinkoffInvestClient.configure do |config|
167
+ # Configure Bearer authorization: sso_auth
168
+ config.access_token = 'YOUR_BEARER_TOKEN'
169
+ end
170
+
171
+ api_instance = TinkoffInvestClient::MarketApi.new
172
+
173
+ begin
174
+ # Получение списка валютных пар
175
+ result = api_instance.market_currencies_get
176
+ p result
177
+ rescue TinkoffInvestClient::ApiError => e
178
+ puts "Error when calling MarketApi->market_currencies_get: #{e}"
179
+ end
180
+ ```
181
+
182
+ #### Using the market_currencies_get_with_http_info variant
183
+
184
+ This returns an Array which contains the response data, status code and headers.
185
+
186
+ > <Array(<MarketInstrumentListResponse>, Integer, Hash)> market_currencies_get_with_http_info
187
+
188
+ ```ruby
189
+ begin
190
+ # Получение списка валютных пар
191
+ data, status_code, headers = api_instance.market_currencies_get_with_http_info
192
+ p status_code # => 2xx
193
+ p headers # => { ... }
194
+ p data # => <MarketInstrumentListResponse>
195
+ rescue TinkoffInvestClient::ApiError => e
196
+ puts "Error when calling MarketApi->market_currencies_get_with_http_info: #{e}"
197
+ end
198
+ ```
199
+
200
+ ### Parameters
201
+
202
+ This endpoint does not need any parameter.
203
+
204
+ ### Return type
205
+
206
+ [**MarketInstrumentListResponse**](MarketInstrumentListResponse.md)
207
+
208
+ ### Authorization
209
+
210
+ [sso_auth](../README.md#sso_auth)
211
+
212
+ ### HTTP request headers
213
+
214
+ - **Content-Type**: Not defined
215
+ - **Accept**: application/json
216
+
217
+
218
+ ## market_etfs_get
219
+
220
+ > <MarketInstrumentListResponse> market_etfs_get
221
+
222
+ Получение списка ETF
223
+
224
+ ### Examples
225
+
226
+ ```ruby
227
+ require 'time'
228
+ require 'tinkoff_invest_client'
229
+ # setup authorization
230
+ TinkoffInvestClient.configure do |config|
231
+ # Configure Bearer authorization: sso_auth
232
+ config.access_token = 'YOUR_BEARER_TOKEN'
233
+ end
234
+
235
+ api_instance = TinkoffInvestClient::MarketApi.new
236
+
237
+ begin
238
+ # Получение списка ETF
239
+ result = api_instance.market_etfs_get
240
+ p result
241
+ rescue TinkoffInvestClient::ApiError => e
242
+ puts "Error when calling MarketApi->market_etfs_get: #{e}"
243
+ end
244
+ ```
245
+
246
+ #### Using the market_etfs_get_with_http_info variant
247
+
248
+ This returns an Array which contains the response data, status code and headers.
249
+
250
+ > <Array(<MarketInstrumentListResponse>, Integer, Hash)> market_etfs_get_with_http_info
251
+
252
+ ```ruby
253
+ begin
254
+ # Получение списка ETF
255
+ data, status_code, headers = api_instance.market_etfs_get_with_http_info
256
+ p status_code # => 2xx
257
+ p headers # => { ... }
258
+ p data # => <MarketInstrumentListResponse>
259
+ rescue TinkoffInvestClient::ApiError => e
260
+ puts "Error when calling MarketApi->market_etfs_get_with_http_info: #{e}"
261
+ end
262
+ ```
263
+
264
+ ### Parameters
265
+
266
+ This endpoint does not need any parameter.
267
+
268
+ ### Return type
269
+
270
+ [**MarketInstrumentListResponse**](MarketInstrumentListResponse.md)
271
+
272
+ ### Authorization
273
+
274
+ [sso_auth](../README.md#sso_auth)
275
+
276
+ ### HTTP request headers
277
+
278
+ - **Content-Type**: Not defined
279
+ - **Accept**: application/json
280
+
281
+
282
+ ## market_orderbook_get
283
+
284
+ > <OrderbookResponse> market_orderbook_get(figi, depth)
285
+
286
+ Получение стакана по FIGI
287
+
288
+ ### Examples
289
+
290
+ ```ruby
291
+ require 'time'
292
+ require 'tinkoff_invest_client'
293
+ # setup authorization
294
+ TinkoffInvestClient.configure do |config|
295
+ # Configure Bearer authorization: sso_auth
296
+ config.access_token = 'YOUR_BEARER_TOKEN'
297
+ end
298
+
299
+ api_instance = TinkoffInvestClient::MarketApi.new
300
+ figi = 'figi_example' # String | FIGI
301
+ depth = 56 # Integer | Глубина стакана [1..20]
302
+
303
+ begin
304
+ # Получение стакана по FIGI
305
+ result = api_instance.market_orderbook_get(figi, depth)
306
+ p result
307
+ rescue TinkoffInvestClient::ApiError => e
308
+ puts "Error when calling MarketApi->market_orderbook_get: #{e}"
309
+ end
310
+ ```
311
+
312
+ #### Using the market_orderbook_get_with_http_info variant
313
+
314
+ This returns an Array which contains the response data, status code and headers.
315
+
316
+ > <Array(<OrderbookResponse>, Integer, Hash)> market_orderbook_get_with_http_info(figi, depth)
317
+
318
+ ```ruby
319
+ begin
320
+ # Получение стакана по FIGI
321
+ data, status_code, headers = api_instance.market_orderbook_get_with_http_info(figi, depth)
322
+ p status_code # => 2xx
323
+ p headers # => { ... }
324
+ p data # => <OrderbookResponse>
325
+ rescue TinkoffInvestClient::ApiError => e
326
+ puts "Error when calling MarketApi->market_orderbook_get_with_http_info: #{e}"
327
+ end
328
+ ```
329
+
330
+ ### Parameters
331
+
332
+ | Name | Type | Description | Notes |
333
+ | ---- | ---- | ----------- | ----- |
334
+ | **figi** | **String** | FIGI | |
335
+ | **depth** | **Integer** | Глубина стакана [1..20] | |
336
+
337
+ ### Return type
338
+
339
+ [**OrderbookResponse**](OrderbookResponse.md)
340
+
341
+ ### Authorization
342
+
343
+ [sso_auth](../README.md#sso_auth)
344
+
345
+ ### HTTP request headers
346
+
347
+ - **Content-Type**: Not defined
348
+ - **Accept**: application/json
349
+
350
+
351
+ ## market_search_by_figi_get
352
+
353
+ > <SearchMarketInstrumentResponse> market_search_by_figi_get(figi)
354
+
355
+ Получение инструмента по FIGI
356
+
357
+ ### Examples
358
+
359
+ ```ruby
360
+ require 'time'
361
+ require 'tinkoff_invest_client'
362
+ # setup authorization
363
+ TinkoffInvestClient.configure do |config|
364
+ # Configure Bearer authorization: sso_auth
365
+ config.access_token = 'YOUR_BEARER_TOKEN'
366
+ end
367
+
368
+ api_instance = TinkoffInvestClient::MarketApi.new
369
+ figi = 'figi_example' # String | FIGI
370
+
371
+ begin
372
+ # Получение инструмента по FIGI
373
+ result = api_instance.market_search_by_figi_get(figi)
374
+ p result
375
+ rescue TinkoffInvestClient::ApiError => e
376
+ puts "Error when calling MarketApi->market_search_by_figi_get: #{e}"
377
+ end
378
+ ```
379
+
380
+ #### Using the market_search_by_figi_get_with_http_info variant
381
+
382
+ This returns an Array which contains the response data, status code and headers.
383
+
384
+ > <Array(<SearchMarketInstrumentResponse>, Integer, Hash)> market_search_by_figi_get_with_http_info(figi)
385
+
386
+ ```ruby
387
+ begin
388
+ # Получение инструмента по FIGI
389
+ data, status_code, headers = api_instance.market_search_by_figi_get_with_http_info(figi)
390
+ p status_code # => 2xx
391
+ p headers # => { ... }
392
+ p data # => <SearchMarketInstrumentResponse>
393
+ rescue TinkoffInvestClient::ApiError => e
394
+ puts "Error when calling MarketApi->market_search_by_figi_get_with_http_info: #{e}"
395
+ end
396
+ ```
397
+
398
+ ### Parameters
399
+
400
+ | Name | Type | Description | Notes |
401
+ | ---- | ---- | ----------- | ----- |
402
+ | **figi** | **String** | FIGI | |
403
+
404
+ ### Return type
405
+
406
+ [**SearchMarketInstrumentResponse**](SearchMarketInstrumentResponse.md)
407
+
408
+ ### Authorization
409
+
410
+ [sso_auth](../README.md#sso_auth)
411
+
412
+ ### HTTP request headers
413
+
414
+ - **Content-Type**: Not defined
415
+ - **Accept**: application/json
416
+
417
+
418
+ ## market_search_by_ticker_get
419
+
420
+ > <MarketInstrumentListResponse> market_search_by_ticker_get(ticker)
421
+
422
+ Получение инструмента по тикеру
423
+
424
+ ### Examples
425
+
426
+ ```ruby
427
+ require 'time'
428
+ require 'tinkoff_invest_client'
429
+ # setup authorization
430
+ TinkoffInvestClient.configure do |config|
431
+ # Configure Bearer authorization: sso_auth
432
+ config.access_token = 'YOUR_BEARER_TOKEN'
433
+ end
434
+
435
+ api_instance = TinkoffInvestClient::MarketApi.new
436
+ ticker = 'ticker_example' # String | Тикер инструмента
437
+
438
+ begin
439
+ # Получение инструмента по тикеру
440
+ result = api_instance.market_search_by_ticker_get(ticker)
441
+ p result
442
+ rescue TinkoffInvestClient::ApiError => e
443
+ puts "Error when calling MarketApi->market_search_by_ticker_get: #{e}"
444
+ end
445
+ ```
446
+
447
+ #### Using the market_search_by_ticker_get_with_http_info variant
448
+
449
+ This returns an Array which contains the response data, status code and headers.
450
+
451
+ > <Array(<MarketInstrumentListResponse>, Integer, Hash)> market_search_by_ticker_get_with_http_info(ticker)
452
+
453
+ ```ruby
454
+ begin
455
+ # Получение инструмента по тикеру
456
+ data, status_code, headers = api_instance.market_search_by_ticker_get_with_http_info(ticker)
457
+ p status_code # => 2xx
458
+ p headers # => { ... }
459
+ p data # => <MarketInstrumentListResponse>
460
+ rescue TinkoffInvestClient::ApiError => e
461
+ puts "Error when calling MarketApi->market_search_by_ticker_get_with_http_info: #{e}"
462
+ end
463
+ ```
464
+
465
+ ### Parameters
466
+
467
+ | Name | Type | Description | Notes |
468
+ | ---- | ---- | ----------- | ----- |
469
+ | **ticker** | **String** | Тикер инструмента | |
470
+
471
+ ### Return type
472
+
473
+ [**MarketInstrumentListResponse**](MarketInstrumentListResponse.md)
474
+
475
+ ### Authorization
476
+
477
+ [sso_auth](../README.md#sso_auth)
478
+
479
+ ### HTTP request headers
480
+
481
+ - **Content-Type**: Not defined
482
+ - **Accept**: application/json
483
+
484
+
485
+ ## market_stocks_get
486
+
487
+ > <MarketInstrumentListResponse> market_stocks_get
488
+
489
+ Получение списка акций
490
+
491
+ ### Examples
492
+
493
+ ```ruby
494
+ require 'time'
495
+ require 'tinkoff_invest_client'
496
+ # setup authorization
497
+ TinkoffInvestClient.configure do |config|
498
+ # Configure Bearer authorization: sso_auth
499
+ config.access_token = 'YOUR_BEARER_TOKEN'
500
+ end
501
+
502
+ api_instance = TinkoffInvestClient::MarketApi.new
503
+
504
+ begin
505
+ # Получение списка акций
506
+ result = api_instance.market_stocks_get
507
+ p result
508
+ rescue TinkoffInvestClient::ApiError => e
509
+ puts "Error when calling MarketApi->market_stocks_get: #{e}"
510
+ end
511
+ ```
512
+
513
+ #### Using the market_stocks_get_with_http_info variant
514
+
515
+ This returns an Array which contains the response data, status code and headers.
516
+
517
+ > <Array(<MarketInstrumentListResponse>, Integer, Hash)> market_stocks_get_with_http_info
518
+
519
+ ```ruby
520
+ begin
521
+ # Получение списка акций
522
+ data, status_code, headers = api_instance.market_stocks_get_with_http_info
523
+ p status_code # => 2xx
524
+ p headers # => { ... }
525
+ p data # => <MarketInstrumentListResponse>
526
+ rescue TinkoffInvestClient::ApiError => e
527
+ puts "Error when calling MarketApi->market_stocks_get_with_http_info: #{e}"
528
+ end
529
+ ```
530
+
531
+ ### Parameters
532
+
533
+ This endpoint does not need any parameter.
534
+
535
+ ### Return type
536
+
537
+ [**MarketInstrumentListResponse**](MarketInstrumentListResponse.md)
538
+
539
+ ### Authorization
540
+
541
+ [sso_auth](../README.md#sso_auth)
542
+
543
+ ### HTTP request headers
544
+
545
+ - **Content-Type**: Not defined
546
+ - **Accept**: application/json
547
+