tinkoff_invest_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 +169 -0
- data/Rakefile +10 -0
- data/docs/BrokerAccountType.md +15 -0
- data/docs/Candle.md +32 -0
- data/docs/CandleResolution.md +15 -0
- data/docs/Candles.md +22 -0
- data/docs/CandlesResponse.md +22 -0
- data/docs/Currencies.md +18 -0
- data/docs/Currency.md +15 -0
- data/docs/CurrencyPosition.md +22 -0
- data/docs/Empty.md +22 -0
- data/docs/Error.md +22 -0
- data/docs/ErrorPayload.md +20 -0
- data/docs/InstrumentType.md +15 -0
- data/docs/LimitOrderRequest.md +22 -0
- data/docs/LimitOrderResponse.md +22 -0
- data/docs/MarketApi.md +547 -0
- data/docs/MarketInstrument.md +34 -0
- data/docs/MarketInstrumentList.md +20 -0
- data/docs/MarketInstrumentListResponse.md +22 -0
- data/docs/MarketInstrumentResponse.md +22 -0
- data/docs/MarketOrderRequest.md +20 -0
- data/docs/MarketOrderResponse.md +22 -0
- data/docs/MoneyAmount.md +20 -0
- data/docs/Operation.md +44 -0
- data/docs/OperationStatus.md +15 -0
- data/docs/OperationTrade.md +24 -0
- data/docs/OperationType.md +15 -0
- data/docs/OperationTypeWithCommission.md +15 -0
- data/docs/Operations.md +18 -0
- data/docs/OperationsApi.md +83 -0
- data/docs/OperationsResponse.md +22 -0
- data/docs/Order.md +32 -0
- data/docs/OrderResponse.md +20 -0
- data/docs/OrderStatus.md +15 -0
- data/docs/OrderType.md +15 -0
- data/docs/Orderbook.md +38 -0
- data/docs/OrderbookResponse.md +22 -0
- data/docs/OrdersApi.md +297 -0
- data/docs/OrdersResponse.md +22 -0
- data/docs/PlacedLimitOrder.md +32 -0
- data/docs/PlacedMarketOrder.md +32 -0
- data/docs/Portfolio.md +18 -0
- data/docs/PortfolioApi.md +147 -0
- data/docs/PortfolioCurrenciesResponse.md +22 -0
- data/docs/PortfolioPosition.md +38 -0
- data/docs/PortfolioResponse.md +22 -0
- data/docs/SandboxAccount.md +20 -0
- data/docs/SandboxApi.md +367 -0
- data/docs/SandboxCurrency.md +15 -0
- data/docs/SandboxRegisterRequest.md +18 -0
- data/docs/SandboxRegisterResponse.md +22 -0
- data/docs/SandboxSetCurrencyBalanceRequest.md +20 -0
- data/docs/SandboxSetPositionBalanceRequest.md +20 -0
- data/docs/SearchMarketInstrument.md +32 -0
- data/docs/SearchMarketInstrumentResponse.md +22 -0
- data/docs/TradeStatus.md +15 -0
- data/docs/UserAccount.md +20 -0
- data/docs/UserAccounts.md +18 -0
- data/docs/UserAccountsResponse.md +22 -0
- data/docs/UserApi.md +72 -0
- data/generator_options.md +1 -0
- data/git_push.sh +58 -0
- data/lib/tinkoff_invest_client.rb +98 -0
- data/lib/tinkoff_invest_client/api/market_api.rb +518 -0
- data/lib/tinkoff_invest_client/api/operations_api.rb +97 -0
- data/lib/tinkoff_invest_client/api/orders_api.rb +291 -0
- data/lib/tinkoff_invest_client/api/portfolio_api.rb +138 -0
- data/lib/tinkoff_invest_client/api/sandbox_api.rb +335 -0
- data/lib/tinkoff_invest_client/api/user_api.rb +77 -0
- data/lib/tinkoff_invest_client/api_client.rb +390 -0
- data/lib/tinkoff_invest_client/api_error.rb +57 -0
- data/lib/tinkoff_invest_client/configuration.rb +281 -0
- data/lib/tinkoff_invest_client/models/broker_account_type.rb +37 -0
- data/lib/tinkoff_invest_client/models/candle.rb +322 -0
- data/lib/tinkoff_invest_client/models/candle_resolution.rb +46 -0
- data/lib/tinkoff_invest_client/models/candles.rb +253 -0
- data/lib/tinkoff_invest_client/models/candles_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/currencies.rb +225 -0
- data/lib/tinkoff_invest_client/models/currency.rb +44 -0
- data/lib/tinkoff_invest_client/models/currency_position.rb +246 -0
- data/lib/tinkoff_invest_client/models/empty.rb +253 -0
- data/lib/tinkoff_invest_client/models/error.rb +253 -0
- data/lib/tinkoff_invest_client/models/error_payload.rb +227 -0
- data/lib/tinkoff_invest_client/models/instrument_type.rb +39 -0
- data/lib/tinkoff_invest_client/models/limit_order_request.rb +251 -0
- data/lib/tinkoff_invest_client/models/limit_order_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/market_instrument.rb +317 -0
- data/lib/tinkoff_invest_client/models/market_instrument_list.rb +239 -0
- data/lib/tinkoff_invest_client/models/market_instrument_list_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/market_instrument_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/market_order_request.rb +237 -0
- data/lib/tinkoff_invest_client/models/market_order_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/money_amount.rb +237 -0
- data/lib/tinkoff_invest_client/models/operation.rb +370 -0
- data/lib/tinkoff_invest_client/models/operation_status.rb +38 -0
- data/lib/tinkoff_invest_client/models/operation_trade.rb +266 -0
- data/lib/tinkoff_invest_client/models/operation_type.rb +37 -0
- data/lib/tinkoff_invest_client/models/operation_type_with_commission.rb +56 -0
- data/lib/tinkoff_invest_client/models/operations.rb +225 -0
- data/lib/tinkoff_invest_client/models/operations_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/order.rb +321 -0
- data/lib/tinkoff_invest_client/models/order_response.rb +237 -0
- data/lib/tinkoff_invest_client/models/order_status.rb +44 -0
- data/lib/tinkoff_invest_client/models/order_type.rb +37 -0
- data/lib/tinkoff_invest_client/models/orderbook.rb +346 -0
- data/lib/tinkoff_invest_client/models/orderbook_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/orders_response.rb +255 -0
- data/lib/tinkoff_invest_client/models/placed_limit_order.rb +307 -0
- data/lib/tinkoff_invest_client/models/placed_market_order.rb +307 -0
- data/lib/tinkoff_invest_client/models/portfolio.rb +225 -0
- data/lib/tinkoff_invest_client/models/portfolio_currencies_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/portfolio_position.rb +333 -0
- data/lib/tinkoff_invest_client/models/portfolio_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/sandbox_account.rb +237 -0
- data/lib/tinkoff_invest_client/models/sandbox_currency.rb +44 -0
- data/lib/tinkoff_invest_client/models/sandbox_register_request.rb +218 -0
- data/lib/tinkoff_invest_client/models/sandbox_register_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/sandbox_set_currency_balance_request.rb +237 -0
- data/lib/tinkoff_invest_client/models/sandbox_set_position_balance_request.rb +232 -0
- data/lib/tinkoff_invest_client/models/search_market_instrument.rb +307 -0
- data/lib/tinkoff_invest_client/models/search_market_instrument_response.rb +253 -0
- data/lib/tinkoff_invest_client/models/trade_status.rb +37 -0
- data/lib/tinkoff_invest_client/models/user_account.rb +237 -0
- data/lib/tinkoff_invest_client/models/user_accounts.rb +225 -0
- data/lib/tinkoff_invest_client/models/user_accounts_response.rb +253 -0
- data/lib/tinkoff_invest_client/version.rb +15 -0
- data/spec/api/market_api_spec.rb +123 -0
- data/spec/api/operations_api_spec.rb +49 -0
- data/spec/api/orders_api_spec.rb +84 -0
- data/spec/api/portfolio_api_spec.rb +57 -0
- data/spec/api/sandbox_api_spec.rb +95 -0
- data/spec/api/user_api_spec.rb +45 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/broker_account_type_spec.rb +28 -0
- data/spec/models/candle_resolution_spec.rb +28 -0
- data/spec/models/candle_spec.rb +76 -0
- data/spec/models/candles_response_spec.rb +46 -0
- data/spec/models/candles_spec.rb +46 -0
- data/spec/models/currencies_spec.rb +34 -0
- data/spec/models/currency_position_spec.rb +46 -0
- data/spec/models/currency_spec.rb +28 -0
- data/spec/models/empty_spec.rb +46 -0
- data/spec/models/error_payload_spec.rb +40 -0
- data/spec/models/error_spec.rb +46 -0
- data/spec/models/instrument_type_spec.rb +28 -0
- data/spec/models/limit_order_request_spec.rb +46 -0
- data/spec/models/limit_order_response_spec.rb +46 -0
- data/spec/models/market_instrument_list_response_spec.rb +46 -0
- data/spec/models/market_instrument_list_spec.rb +40 -0
- data/spec/models/market_instrument_response_spec.rb +46 -0
- data/spec/models/market_instrument_spec.rb +82 -0
- data/spec/models/market_order_request_spec.rb +40 -0
- data/spec/models/market_order_response_spec.rb +46 -0
- data/spec/models/money_amount_spec.rb +40 -0
- data/spec/models/operation_spec.rb +112 -0
- data/spec/models/operation_status_spec.rb +28 -0
- data/spec/models/operation_trade_spec.rb +52 -0
- data/spec/models/operation_type_spec.rb +28 -0
- data/spec/models/operation_type_with_commission_spec.rb +28 -0
- data/spec/models/operations_response_spec.rb +46 -0
- data/spec/models/operations_spec.rb +34 -0
- data/spec/models/order_response_spec.rb +40 -0
- data/spec/models/order_spec.rb +76 -0
- data/spec/models/order_status_spec.rb +28 -0
- data/spec/models/order_type_spec.rb +28 -0
- data/spec/models/orderbook_response_spec.rb +46 -0
- data/spec/models/orderbook_spec.rb +94 -0
- data/spec/models/orders_response_spec.rb +46 -0
- data/spec/models/placed_limit_order_spec.rb +76 -0
- data/spec/models/placed_market_order_spec.rb +76 -0
- data/spec/models/portfolio_currencies_response_spec.rb +46 -0
- data/spec/models/portfolio_position_spec.rb +94 -0
- data/spec/models/portfolio_response_spec.rb +46 -0
- data/spec/models/portfolio_spec.rb +34 -0
- data/spec/models/sandbox_account_spec.rb +40 -0
- data/spec/models/sandbox_currency_spec.rb +28 -0
- data/spec/models/sandbox_register_request_spec.rb +34 -0
- data/spec/models/sandbox_register_response_spec.rb +46 -0
- data/spec/models/sandbox_set_currency_balance_request_spec.rb +40 -0
- data/spec/models/sandbox_set_position_balance_request_spec.rb +40 -0
- data/spec/models/search_market_instrument_response_spec.rb +46 -0
- data/spec/models/search_market_instrument_spec.rb +76 -0
- data/spec/models/trade_status_spec.rb +28 -0
- data/spec/models/user_account_spec.rb +40 -0
- data/spec/models/user_accounts_response_spec.rb +46 -0
- data/spec/models/user_accounts_spec.rb +34 -0
- data/spec/spec_helper.rb +111 -0
- data/tinkoff_invest_client.gemspec +38 -0
- metadata +336 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
# TinkoffInvestClient::SandboxCurrency
|
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::SandboxCurrency.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TinkoffInvestClient::SandboxRegisterRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **broker_account_type** | [**BrokerAccountType**](BrokerAccountType.md) | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'tinkoff_invest_client'
|
13
|
+
|
14
|
+
instance = TinkoffInvestClient::SandboxRegisterRequest.new(
|
15
|
+
broker_account_type: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TinkoffInvestClient::SandboxRegisterResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **tracking_id** | **String** | | |
|
8
|
+
| **status** | **String** | | [default to 'Ok'] |
|
9
|
+
| **payload** | [**SandboxAccount**](SandboxAccount.md) | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'tinkoff_invest_client'
|
15
|
+
|
16
|
+
instance = TinkoffInvestClient::SandboxRegisterResponse.new(
|
17
|
+
tracking_id: null,
|
18
|
+
status: null,
|
19
|
+
payload: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TinkoffInvestClient::SandboxSetCurrencyBalanceRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **currency** | [**SandboxCurrency**](SandboxCurrency.md) | | |
|
8
|
+
| **balance** | **Float** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tinkoff_invest_client'
|
14
|
+
|
15
|
+
instance = TinkoffInvestClient::SandboxSetCurrencyBalanceRequest.new(
|
16
|
+
currency: null,
|
17
|
+
balance: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TinkoffInvestClient::SandboxSetPositionBalanceRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **figi** | **String** | | [optional] |
|
8
|
+
| **balance** | **Float** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tinkoff_invest_client'
|
14
|
+
|
15
|
+
instance = TinkoffInvestClient::SandboxSetPositionBalanceRequest.new(
|
16
|
+
figi: null,
|
17
|
+
balance: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# TinkoffInvestClient::SearchMarketInstrument
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **figi** | **String** | | |
|
8
|
+
| **ticker** | **String** | | |
|
9
|
+
| **isin** | **String** | | [optional] |
|
10
|
+
| **min_price_increment** | **Float** | Шаг цены | [optional] |
|
11
|
+
| **lot** | **Integer** | | |
|
12
|
+
| **currency** | [**Currency**](Currency.md) | | [optional] |
|
13
|
+
| **name** | **String** | | |
|
14
|
+
| **type** | [**InstrumentType**](InstrumentType.md) | | |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'tinkoff_invest_client'
|
20
|
+
|
21
|
+
instance = TinkoffInvestClient::SearchMarketInstrument.new(
|
22
|
+
figi: null,
|
23
|
+
ticker: null,
|
24
|
+
isin: null,
|
25
|
+
min_price_increment: null,
|
26
|
+
lot: null,
|
27
|
+
currency: null,
|
28
|
+
name: null,
|
29
|
+
type: null
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TinkoffInvestClient::SearchMarketInstrumentResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **tracking_id** | **String** | | |
|
8
|
+
| **status** | **String** | | [default to 'Ok'] |
|
9
|
+
| **payload** | [**SearchMarketInstrument**](SearchMarketInstrument.md) | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'tinkoff_invest_client'
|
15
|
+
|
16
|
+
instance = TinkoffInvestClient::SearchMarketInstrumentResponse.new(
|
17
|
+
tracking_id: null,
|
18
|
+
status: null,
|
19
|
+
payload: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/TradeStatus.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# TinkoffInvestClient::TradeStatus
|
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::TradeStatus.new()
|
14
|
+
```
|
15
|
+
|
data/docs/UserAccount.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# TinkoffInvestClient::UserAccount
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **broker_account_type** | [**BrokerAccountType**](BrokerAccountType.md) | | |
|
8
|
+
| **broker_account_id** | **String** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tinkoff_invest_client'
|
14
|
+
|
15
|
+
instance = TinkoffInvestClient::UserAccount.new(
|
16
|
+
broker_account_type: null,
|
17
|
+
broker_account_id: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TinkoffInvestClient::UserAccounts
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **accounts** | [**Array<UserAccount>**](UserAccount.md) | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'tinkoff_invest_client'
|
13
|
+
|
14
|
+
instance = TinkoffInvestClient::UserAccounts.new(
|
15
|
+
accounts: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TinkoffInvestClient::UserAccountsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **tracking_id** | **String** | | |
|
8
|
+
| **status** | **String** | | [default to 'Ok'] |
|
9
|
+
| **payload** | [**UserAccounts**](UserAccounts.md) | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'tinkoff_invest_client'
|
15
|
+
|
16
|
+
instance = TinkoffInvestClient::UserAccountsResponse.new(
|
17
|
+
tracking_id: null,
|
18
|
+
status: null,
|
19
|
+
payload: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/UserApi.md
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# TinkoffInvestClient::UserApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api-invest.tinkoff.ru/openapi*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**user_accounts_get**](UserApi.md#user_accounts_get) | **GET** /user/accounts | Получение брокерских счетов клиента |
|
8
|
+
|
9
|
+
|
10
|
+
## user_accounts_get
|
11
|
+
|
12
|
+
> <UserAccountsResponse> user_accounts_get
|
13
|
+
|
14
|
+
Получение брокерских счетов клиента
|
15
|
+
|
16
|
+
### Examples
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'time'
|
20
|
+
require 'tinkoff_invest_client'
|
21
|
+
# setup authorization
|
22
|
+
TinkoffInvestClient.configure do |config|
|
23
|
+
# Configure Bearer authorization: sso_auth
|
24
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
25
|
+
end
|
26
|
+
|
27
|
+
api_instance = TinkoffInvestClient::UserApi.new
|
28
|
+
|
29
|
+
begin
|
30
|
+
# Получение брокерских счетов клиента
|
31
|
+
result = api_instance.user_accounts_get
|
32
|
+
p result
|
33
|
+
rescue TinkoffInvestClient::ApiError => e
|
34
|
+
puts "Error when calling UserApi->user_accounts_get: #{e}"
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Using the user_accounts_get_with_http_info variant
|
39
|
+
|
40
|
+
This returns an Array which contains the response data, status code and headers.
|
41
|
+
|
42
|
+
> <Array(<UserAccountsResponse>, Integer, Hash)> user_accounts_get_with_http_info
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
begin
|
46
|
+
# Получение брокерских счетов клиента
|
47
|
+
data, status_code, headers = api_instance.user_accounts_get_with_http_info
|
48
|
+
p status_code # => 2xx
|
49
|
+
p headers # => { ... }
|
50
|
+
p data # => <UserAccountsResponse>
|
51
|
+
rescue TinkoffInvestClient::ApiError => e
|
52
|
+
puts "Error when calling UserApi->user_accounts_get_with_http_info: #{e}"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
### Parameters
|
57
|
+
|
58
|
+
This endpoint does not need any parameter.
|
59
|
+
|
60
|
+
### Return type
|
61
|
+
|
62
|
+
[**UserAccountsResponse**](UserAccountsResponse.md)
|
63
|
+
|
64
|
+
### Authorization
|
65
|
+
|
66
|
+
[sso_auth](../README.md#sso_auth)
|
67
|
+
|
68
|
+
### HTTP request headers
|
69
|
+
|
70
|
+
- **Content-Type**: Not defined
|
71
|
+
- **Accept**: application/json
|
72
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
openapi-generator generate -i https://tinkoffcreditsystems.github.io/invest-openapi/swagger-ui/swagger.yaml -g ruby --additional-properties gemAuthor='Oleg Belov' --additional-properties gemHomepage='https://github.com/ThinkAndRun/tinkoff_invest_client' --additional-properties moduleName=TinkoffInvestClient --additional-properties gemLicense=MIT --additional-properties gemSummary='Tinkoff Invest OpenAPI Ruby Gem' --additional-properties gemVersion=1.0.0 --git-repo-id=tinkoff_invest_client --git-user-id=ThinkAndRun --release-note 'Tinkoff Invest OpenAPI version 1.0.0'
|
data/git_push.sh
ADDED
@@ -0,0 +1,58 @@
|
|
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-pestore-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="ThinkAndRun"
|
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="tinkoff_invest_client"
|
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="Tinkoff Invest OpenAPI version 1.0.0"
|
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'
|
58
|
+
|
@@ -0,0 +1,98 @@
|
|
1
|
+
=begin
|
2
|
+
#OpenAPI
|
3
|
+
|
4
|
+
#tinkoff.ru/invest OpenAPI.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: al.a.volkov@tinkoff.ru
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'tinkoff_invest_client/api_client'
|
15
|
+
require 'tinkoff_invest_client/api_error'
|
16
|
+
require 'tinkoff_invest_client/version'
|
17
|
+
require 'tinkoff_invest_client/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'tinkoff_invest_client/models/broker_account_type'
|
21
|
+
require 'tinkoff_invest_client/models/candle'
|
22
|
+
require 'tinkoff_invest_client/models/candle_resolution'
|
23
|
+
require 'tinkoff_invest_client/models/candles'
|
24
|
+
require 'tinkoff_invest_client/models/candles_response'
|
25
|
+
require 'tinkoff_invest_client/models/currencies'
|
26
|
+
require 'tinkoff_invest_client/models/currency'
|
27
|
+
require 'tinkoff_invest_client/models/currency_position'
|
28
|
+
require 'tinkoff_invest_client/models/empty'
|
29
|
+
require 'tinkoff_invest_client/models/error'
|
30
|
+
require 'tinkoff_invest_client/models/error_payload'
|
31
|
+
require 'tinkoff_invest_client/models/instrument_type'
|
32
|
+
require 'tinkoff_invest_client/models/limit_order_request'
|
33
|
+
require 'tinkoff_invest_client/models/limit_order_response'
|
34
|
+
require 'tinkoff_invest_client/models/market_instrument'
|
35
|
+
require 'tinkoff_invest_client/models/market_instrument_list'
|
36
|
+
require 'tinkoff_invest_client/models/market_instrument_list_response'
|
37
|
+
require 'tinkoff_invest_client/models/market_instrument_response'
|
38
|
+
require 'tinkoff_invest_client/models/market_order_request'
|
39
|
+
require 'tinkoff_invest_client/models/market_order_response'
|
40
|
+
require 'tinkoff_invest_client/models/money_amount'
|
41
|
+
require 'tinkoff_invest_client/models/operation'
|
42
|
+
require 'tinkoff_invest_client/models/operation_status'
|
43
|
+
require 'tinkoff_invest_client/models/operation_trade'
|
44
|
+
require 'tinkoff_invest_client/models/operation_type'
|
45
|
+
require 'tinkoff_invest_client/models/operation_type_with_commission'
|
46
|
+
require 'tinkoff_invest_client/models/operations'
|
47
|
+
require 'tinkoff_invest_client/models/operations_response'
|
48
|
+
require 'tinkoff_invest_client/models/order'
|
49
|
+
require 'tinkoff_invest_client/models/order_response'
|
50
|
+
require 'tinkoff_invest_client/models/order_status'
|
51
|
+
require 'tinkoff_invest_client/models/order_type'
|
52
|
+
require 'tinkoff_invest_client/models/orderbook'
|
53
|
+
require 'tinkoff_invest_client/models/orderbook_response'
|
54
|
+
require 'tinkoff_invest_client/models/orders_response'
|
55
|
+
require 'tinkoff_invest_client/models/placed_limit_order'
|
56
|
+
require 'tinkoff_invest_client/models/placed_market_order'
|
57
|
+
require 'tinkoff_invest_client/models/portfolio'
|
58
|
+
require 'tinkoff_invest_client/models/portfolio_currencies_response'
|
59
|
+
require 'tinkoff_invest_client/models/portfolio_position'
|
60
|
+
require 'tinkoff_invest_client/models/portfolio_response'
|
61
|
+
require 'tinkoff_invest_client/models/sandbox_account'
|
62
|
+
require 'tinkoff_invest_client/models/sandbox_currency'
|
63
|
+
require 'tinkoff_invest_client/models/sandbox_register_request'
|
64
|
+
require 'tinkoff_invest_client/models/sandbox_register_response'
|
65
|
+
require 'tinkoff_invest_client/models/sandbox_set_currency_balance_request'
|
66
|
+
require 'tinkoff_invest_client/models/sandbox_set_position_balance_request'
|
67
|
+
require 'tinkoff_invest_client/models/search_market_instrument'
|
68
|
+
require 'tinkoff_invest_client/models/search_market_instrument_response'
|
69
|
+
require 'tinkoff_invest_client/models/trade_status'
|
70
|
+
require 'tinkoff_invest_client/models/user_account'
|
71
|
+
require 'tinkoff_invest_client/models/user_accounts'
|
72
|
+
require 'tinkoff_invest_client/models/user_accounts_response'
|
73
|
+
|
74
|
+
# APIs
|
75
|
+
require 'tinkoff_invest_client/api/market_api'
|
76
|
+
require 'tinkoff_invest_client/api/operations_api'
|
77
|
+
require 'tinkoff_invest_client/api/orders_api'
|
78
|
+
require 'tinkoff_invest_client/api/portfolio_api'
|
79
|
+
require 'tinkoff_invest_client/api/sandbox_api'
|
80
|
+
require 'tinkoff_invest_client/api/user_api'
|
81
|
+
|
82
|
+
module TinkoffInvestClient
|
83
|
+
class << self
|
84
|
+
# Customize default settings for the SDK using block.
|
85
|
+
# TinkoffInvestClient.configure do |config|
|
86
|
+
# config.username = "xxx"
|
87
|
+
# config.password = "xxx"
|
88
|
+
# end
|
89
|
+
# If no block given, return the default Configuration object.
|
90
|
+
def configure
|
91
|
+
if block_given?
|
92
|
+
yield(Configuration.default)
|
93
|
+
else
|
94
|
+
Configuration.default
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|