├── .gitignore ├── .swagger-codegen-ignore ├── .swagger-codegen └── VERSION ├── .travis.yml ├── README.md ├── docs ├── Currencies.md ├── Currency.md ├── CurrencyPosition.md ├── Empty.md ├── Error.md ├── ErrorPayload.md ├── InstrumentType.md ├── LimitOrderRequest.md ├── LimitOrderResponse.md ├── MarketApi.md ├── MarketInstrument.md ├── MarketInstrumentList.md ├── MarketInstrumentListResponse.md ├── MarketInstrumentResponse.md ├── MoneyAmount.md ├── Operation.md ├── OperationInterval.md ├── OperationStatus.md ├── OperationTrade.md ├── OperationType.md ├── OperationTypeWithCommission.md ├── Operations.md ├── OperationsApi.md ├── OperationsResponse.md ├── Order.md ├── OrderStatus.md ├── OrderType.md ├── OrdersApi.md ├── OrdersResponse.md ├── PlacedLimitOrder.md ├── Portfolio.md ├── PortfolioApi.md ├── PortfolioCurrenciesResponse.md ├── PortfolioPosition.md ├── PortfolioResponse.md ├── SandboxApi.md ├── SandboxCurrency.md ├── SandboxSetCurrencyBalanceRequest.md └── SandboxSetPositionBalanceRequest.md ├── git_push.sh ├── requirements.txt ├── setup.py ├── test-requirements.txt ├── test ├── __init__.py ├── test_currencies.py ├── test_currency.py ├── test_currency_position.py ├── test_empty.py ├── test_error.py ├── test_error_payload.py ├── test_instrument_type.py ├── test_limit_order_request.py ├── test_limit_order_response.py ├── test_market_api.py ├── test_market_instrument.py ├── test_market_instrument_list.py ├── test_market_instrument_list_response.py ├── test_market_instrument_response.py ├── test_money_amount.py ├── test_operation.py ├── test_operation_interval.py ├── test_operation_status.py ├── test_operation_trade.py ├── test_operation_type.py ├── test_operation_type_with_commission.py ├── test_operations.py ├── test_operations_api.py ├── test_operations_response.py ├── test_order.py ├── test_order_status.py ├── test_order_type.py ├── test_orders_api.py ├── test_orders_response.py ├── test_placed_limit_order.py ├── test_portfolio.py ├── test_portfolio_api.py ├── test_portfolio_currencies_response.py ├── test_portfolio_position.py ├── test_portfolio_response.py ├── test_sandbox_api.py ├── test_sandbox_currency.py ├── test_sandbox_set_currency_balance_request.py └── test_sandbox_set_position_balance_request.py ├── tinkoff_api_client ├── __init__.py ├── api │ ├── __init__.py │ ├── market_api.py │ ├── operations_api.py │ ├── orders_api.py │ ├── portfolio_api.py │ └── sandbox_api.py ├── api_client.py ├── configuration.py ├── models │ ├── __init__.py │ ├── currencies.py │ ├── currency.py │ ├── currency_position.py │ ├── empty.py │ ├── error.py │ ├── error_payload.py │ ├── instrument_type.py │ ├── limit_order_request.py │ ├── limit_order_response.py │ ├── market_instrument.py │ ├── market_instrument_list.py │ ├── market_instrument_list_response.py │ ├── market_instrument_response.py │ ├── money_amount.py │ ├── operation.py │ ├── operation_interval.py │ ├── operation_status.py │ ├── operation_trade.py │ ├── operation_type.py │ ├── operation_type_with_commission.py │ ├── operations.py │ ├── operations_response.py │ ├── order.py │ ├── order_status.py │ ├── order_type.py │ ├── orders_response.py │ ├── placed_limit_order.py │ ├── portfolio.py │ ├── portfolio_currencies_response.py │ ├── portfolio_position.py │ ├── portfolio_response.py │ ├── sandbox_currency.py │ ├── sandbox_set_currency_balance_request.py │ └── sandbox_set_position_balance_request.py └── rest.py └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | venv/ 48 | .python-version 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | 57 | # Sphinx documentation 58 | docs/_build/ 59 | 60 | # PyBuilder 61 | target/ 62 | 63 | #Ipython Notebook 64 | .ipynb_checkpoints 65 | -------------------------------------------------------------------------------- /.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | # Swagger Codegen Ignore 2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 3.0.10 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "2.7" 5 | - "3.2" 6 | - "3.3" 7 | - "3.4" 8 | - "3.5" 9 | #- "3.5-dev" # 3.5 development branch 10 | #- "nightly" # points to the latest development branch e.g. 3.6-dev 11 | # command to install dependencies 12 | install: "pip install -r requirements.txt" 13 | # command to run tests 14 | script: nosetests 15 | -------------------------------------------------------------------------------- /docs/Currencies.md: -------------------------------------------------------------------------------- 1 | # Currencies 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **currencies** | [**list[CurrencyPosition]**](CurrencyPosition.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/Currency.md: -------------------------------------------------------------------------------- 1 | # Currency 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/CurrencyPosition.md: -------------------------------------------------------------------------------- 1 | # CurrencyPosition 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **currency** | [**Currency**](Currency.md) | | 7 | **balance** | **float** | | 8 | **blocked** | **float** | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Empty.md: -------------------------------------------------------------------------------- 1 | # Empty 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **payload** | **object** | | 8 | **status** | **str** | | [default to 'Ok'] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Error.md: -------------------------------------------------------------------------------- 1 | # Error 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Error'] 8 | **payload** | [**ErrorPayload**](ErrorPayload.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/ErrorPayload.md: -------------------------------------------------------------------------------- 1 | # ErrorPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **message** | **str** | | [optional] 7 | **code** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/InstrumentType.md: -------------------------------------------------------------------------------- 1 | # InstrumentType 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/LimitOrderRequest.md: -------------------------------------------------------------------------------- 1 | # LimitOrderRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **lots** | **int** | | 7 | **operation** | [**OperationType**](OperationType.md) | | 8 | **price** | **float** | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/LimitOrderResponse.md: -------------------------------------------------------------------------------- 1 | # LimitOrderResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Ok'] 8 | **payload** | [**PlacedLimitOrder**](PlacedLimitOrder.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/MarketInstrument.md: -------------------------------------------------------------------------------- 1 | # MarketInstrument 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **figi** | **str** | | 7 | **ticker** | **str** | | 8 | **isin** | **str** | | [optional] 9 | **min_price_increment** | **float** | | [optional] 10 | **lot** | **int** | | 11 | **currency** | [**Currency**](Currency.md) | | [optional] 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | -------------------------------------------------------------------------------- /docs/MarketInstrumentList.md: -------------------------------------------------------------------------------- 1 | # MarketInstrumentList 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **total** | [**BigDecimal**](BigDecimal.md) | | 7 | **instruments** | [**list[MarketInstrument]**](MarketInstrument.md) | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/MarketInstrumentListResponse.md: -------------------------------------------------------------------------------- 1 | # MarketInstrumentListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Ok'] 8 | **payload** | [**MarketInstrumentList**](MarketInstrumentList.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/MarketInstrumentResponse.md: -------------------------------------------------------------------------------- 1 | # MarketInstrumentResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Ok'] 8 | **payload** | [**MarketInstrument**](MarketInstrument.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/MoneyAmount.md: -------------------------------------------------------------------------------- 1 | # MoneyAmount 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **currency** | [**Currency**](Currency.md) | | 7 | **value** | **float** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/Operation.md: -------------------------------------------------------------------------------- 1 | # Operation 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | 7 | **status** | [**OperationStatus**](OperationStatus.md) | | 8 | **trades** | [**list[OperationTrade]**](OperationTrade.md) | | [optional] 9 | **commission** | [**MoneyAmount**](MoneyAmount.md) | | [optional] 10 | **currency** | [**Currency**](Currency.md) | | 11 | **payment** | **float** | | 12 | **price** | **float** | | [optional] 13 | **quantity** | **int** | | [optional] 14 | **figi** | **str** | | [optional] 15 | **instrument_type** | [**InstrumentType**](InstrumentType.md) | | [optional] 16 | **is_margin_call** | **bool** | | 17 | **_date** | **datetime** | ISO8601 | 18 | **operation_type** | [**OperationTypeWithCommission**](OperationTypeWithCommission.md) | | [optional] 19 | 20 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 21 | 22 | -------------------------------------------------------------------------------- /docs/OperationInterval.md: -------------------------------------------------------------------------------- 1 | # OperationInterval 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/OperationStatus.md: -------------------------------------------------------------------------------- 1 | # OperationStatus 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/OperationTrade.md: -------------------------------------------------------------------------------- 1 | # OperationTrade 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **trade_id** | **str** | | 7 | **_date** | **datetime** | ISO8601 | 8 | **price** | **float** | | 9 | **quantity** | **int** | | 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | -------------------------------------------------------------------------------- /docs/OperationType.md: -------------------------------------------------------------------------------- 1 | # OperationType 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/OperationTypeWithCommission.md: -------------------------------------------------------------------------------- 1 | # OperationTypeWithCommission 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/Operations.md: -------------------------------------------------------------------------------- 1 | # Operations 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **operations** | [**list[Operation]**](Operation.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/OperationsApi.md: -------------------------------------------------------------------------------- 1 | # tinkoff_api_client.OperationsApi 2 | 3 | All URIs are relative to *https://api-invest.tinkoff.ru/openapi/* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**operations_get**](OperationsApi.md#operations_get) | **GET** /operations | Получение списка операций 8 | 9 | # **operations_get** 10 | > OperationsResponse operations_get(_from, interval, figi=figi) 11 | 12 | Получение списка операций 13 | 14 | ### Example 15 | ```python 16 | from __future__ import print_function 17 | import time 18 | import tinkoff_api_client 19 | from tinkoff_api_client.rest import ApiException 20 | from pprint import pprint 21 | 22 | 23 | # create an instance of the API class 24 | api_instance = tinkoff_api_client.OperationsApi(tinkoff_api_client.ApiClient(configuration)) 25 | _from = '2013-10-20' # date | Начало временного промежутка 26 | interval = tinkoff_api_client.OperationInterval() # OperationInterval | Длительность временного промежутка 27 | figi = 'figi_example' # str | Figi инструмента для фильтрации (optional) 28 | 29 | try: 30 | # Получение списка операций 31 | api_response = api_instance.operations_get(_from, interval, figi=figi) 32 | pprint(api_response) 33 | except ApiException as e: 34 | print("Exception when calling OperationsApi->operations_get: %s\n" % e) 35 | ``` 36 | 37 | ### Parameters 38 | 39 | Name | Type | Description | Notes 40 | ------------- | ------------- | ------------- | ------------- 41 | **_from** | **date**| Начало временного промежутка | 42 | **interval** | [**OperationInterval**](.md)| Длительность временного промежутка | 43 | **figi** | **str**| Figi инструмента для фильтрации | [optional] 44 | 45 | ### Return type 46 | 47 | [**OperationsResponse**](OperationsResponse.md) 48 | 49 | ### Authorization 50 | 51 | [sso_auth](../README.md#sso_auth) 52 | 53 | ### HTTP request headers 54 | 55 | - **Content-Type**: Not defined 56 | - **Accept**: application/json 57 | 58 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 59 | 60 | -------------------------------------------------------------------------------- /docs/OperationsResponse.md: -------------------------------------------------------------------------------- 1 | # OperationsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Ok'] 8 | **payload** | [**Operations**](Operations.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/Order.md: -------------------------------------------------------------------------------- 1 | # Order 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **order_id** | **str** | | 7 | **figi** | **str** | | 8 | **operation** | [**OperationType**](OperationType.md) | | 9 | **status** | [**OrderStatus**](OrderStatus.md) | | 10 | **requested_lots** | **int** | | 11 | **executed_lots** | **int** | | 12 | **type** | [**OrderType**](OrderType.md) | | 13 | **price** | **float** | | 14 | 15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 16 | 17 | -------------------------------------------------------------------------------- /docs/OrderStatus.md: -------------------------------------------------------------------------------- 1 | # OrderStatus 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/OrderType.md: -------------------------------------------------------------------------------- 1 | # OrderType 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/OrdersApi.md: -------------------------------------------------------------------------------- 1 | # tinkoff_api_client.OrdersApi 2 | 3 | All URIs are relative to *https://api-invest.tinkoff.ru/openapi/* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**orders_cancel_post**](OrdersApi.md#orders_cancel_post) | **POST** /orders/cancel | Отмена заявки 8 | [**orders_get**](OrdersApi.md#orders_get) | **GET** /orders | Получение списка активных заявок 9 | [**orders_limit_order_post**](OrdersApi.md#orders_limit_order_post) | **POST** /orders/limit-order | Создание лимитной заявки 10 | 11 | # **orders_cancel_post** 12 | > Empty orders_cancel_post(order_id, body=body) 13 | 14 | Отмена заявки 15 | 16 | ### Example 17 | ```python 18 | from __future__ import print_function 19 | import time 20 | import tinkoff_api_client 21 | from tinkoff_api_client.rest import ApiException 22 | from pprint import pprint 23 | 24 | 25 | # create an instance of the API class 26 | api_instance = tinkoff_api_client.OrdersApi(tinkoff_api_client.ApiClient(configuration)) 27 | order_id = 'order_id_example' # str | ID заявки 28 | body = tinkoff_api_client.Empty() # Empty | (optional) 29 | 30 | try: 31 | # Отмена заявки 32 | api_response = api_instance.orders_cancel_post(order_id, body=body) 33 | pprint(api_response) 34 | except ApiException as e: 35 | print("Exception when calling OrdersApi->orders_cancel_post: %s\n" % e) 36 | ``` 37 | 38 | ### Parameters 39 | 40 | Name | Type | Description | Notes 41 | ------------- | ------------- | ------------- | ------------- 42 | **order_id** | **str**| ID заявки | 43 | **body** | [**Empty**](Empty.md)| | [optional] 44 | 45 | ### Return type 46 | 47 | [**Empty**](Empty.md) 48 | 49 | ### Authorization 50 | 51 | [sso_auth](../README.md#sso_auth) 52 | 53 | ### HTTP request headers 54 | 55 | - **Content-Type**: application/json 56 | - **Accept**: application/json 57 | 58 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 59 | 60 | # **orders_get** 61 | > OrdersResponse orders_get() 62 | 63 | Получение списка активных заявок 64 | 65 | ### Example 66 | ```python 67 | from __future__ import print_function 68 | import time 69 | import tinkoff_api_client 70 | from tinkoff_api_client.rest import ApiException 71 | from pprint import pprint 72 | 73 | 74 | # create an instance of the API class 75 | api_instance = tinkoff_api_client.OrdersApi(tinkoff_api_client.ApiClient(configuration)) 76 | 77 | try: 78 | # Получение списка активных заявок 79 | api_response = api_instance.orders_get() 80 | pprint(api_response) 81 | except ApiException as e: 82 | print("Exception when calling OrdersApi->orders_get: %s\n" % e) 83 | ``` 84 | 85 | ### Parameters 86 | This endpoint does not need any parameter. 87 | 88 | ### Return type 89 | 90 | [**OrdersResponse**](OrdersResponse.md) 91 | 92 | ### Authorization 93 | 94 | [sso_auth](../README.md#sso_auth) 95 | 96 | ### HTTP request headers 97 | 98 | - **Content-Type**: Not defined 99 | - **Accept**: application/json 100 | 101 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 102 | 103 | # **orders_limit_order_post** 104 | > LimitOrderResponse orders_limit_order_post(body, figi) 105 | 106 | Создание лимитной заявки 107 | 108 | ### Example 109 | ```python 110 | from __future__ import print_function 111 | import time 112 | import tinkoff_api_client 113 | from tinkoff_api_client.rest import ApiException 114 | from pprint import pprint 115 | 116 | 117 | # create an instance of the API class 118 | api_instance = tinkoff_api_client.OrdersApi(tinkoff_api_client.ApiClient(configuration)) 119 | body = tinkoff_api_client.LimitOrderRequest() # LimitOrderRequest | 120 | figi = 'figi_example' # str | FIGI инструмента 121 | 122 | try: 123 | # Создание лимитной заявки 124 | api_response = api_instance.orders_limit_order_post(body, figi) 125 | pprint(api_response) 126 | except ApiException as e: 127 | print("Exception when calling OrdersApi->orders_limit_order_post: %s\n" % e) 128 | ``` 129 | 130 | ### Parameters 131 | 132 | Name | Type | Description | Notes 133 | ------------- | ------------- | ------------- | ------------- 134 | **body** | [**LimitOrderRequest**](LimitOrderRequest.md)| | 135 | **figi** | **str**| FIGI инструмента | 136 | 137 | ### Return type 138 | 139 | [**LimitOrderResponse**](LimitOrderResponse.md) 140 | 141 | ### Authorization 142 | 143 | [sso_auth](../README.md#sso_auth) 144 | 145 | ### HTTP request headers 146 | 147 | - **Content-Type**: application/json 148 | - **Accept**: application/json 149 | 150 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 151 | 152 | -------------------------------------------------------------------------------- /docs/OrdersResponse.md: -------------------------------------------------------------------------------- 1 | # OrdersResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Ok'] 8 | **payload** | [**list[Order]**](Order.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/PlacedLimitOrder.md: -------------------------------------------------------------------------------- 1 | # PlacedLimitOrder 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **order_id** | **str** | | 7 | **operation** | [**OperationType**](OperationType.md) | | 8 | **status** | [**OrderStatus**](OrderStatus.md) | | 9 | **reject_reason** | **str** | | [optional] 10 | **requested_lots** | **int** | | 11 | **executed_lots** | **int** | | 12 | **commission** | [**MoneyAmount**](MoneyAmount.md) | | [optional] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | -------------------------------------------------------------------------------- /docs/Portfolio.md: -------------------------------------------------------------------------------- 1 | # Portfolio 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **positions** | [**list[PortfolioPosition]**](PortfolioPosition.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | -------------------------------------------------------------------------------- /docs/PortfolioApi.md: -------------------------------------------------------------------------------- 1 | # tinkoff_api_client.PortfolioApi 2 | 3 | All URIs are relative to *https://api-invest.tinkoff.ru/openapi/* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**portfolio_currencies_get**](PortfolioApi.md#portfolio_currencies_get) | **GET** /portfolio/currencies | Получение валютных активов клиента 8 | [**portfolio_get**](PortfolioApi.md#portfolio_get) | **GET** /portfolio | Получение портфеля клиента 9 | 10 | # **portfolio_currencies_get** 11 | > PortfolioCurrenciesResponse portfolio_currencies_get() 12 | 13 | Получение валютных активов клиента 14 | 15 | ### Example 16 | ```python 17 | from __future__ import print_function 18 | import time 19 | import tinkoff_api_client 20 | from tinkoff_api_client.rest import ApiException 21 | from pprint import pprint 22 | 23 | 24 | # create an instance of the API class 25 | api_instance = tinkoff_api_client.PortfolioApi(tinkoff_api_client.ApiClient(configuration)) 26 | 27 | try: 28 | # Получение валютных активов клиента 29 | api_response = api_instance.portfolio_currencies_get() 30 | pprint(api_response) 31 | except ApiException as e: 32 | print("Exception when calling PortfolioApi->portfolio_currencies_get: %s\n" % e) 33 | ``` 34 | 35 | ### Parameters 36 | This endpoint does not need any parameter. 37 | 38 | ### Return type 39 | 40 | [**PortfolioCurrenciesResponse**](PortfolioCurrenciesResponse.md) 41 | 42 | ### Authorization 43 | 44 | [sso_auth](../README.md#sso_auth) 45 | 46 | ### HTTP request headers 47 | 48 | - **Content-Type**: Not defined 49 | - **Accept**: application/json 50 | 51 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 52 | 53 | # **portfolio_get** 54 | > PortfolioResponse portfolio_get() 55 | 56 | Получение портфеля клиента 57 | 58 | ### Example 59 | ```python 60 | from __future__ import print_function 61 | import time 62 | import tinkoff_api_client 63 | from tinkoff_api_client.rest import ApiException 64 | from pprint import pprint 65 | 66 | 67 | # create an instance of the API class 68 | api_instance = tinkoff_api_client.PortfolioApi(tinkoff_api_client.ApiClient(configuration)) 69 | 70 | try: 71 | # Получение портфеля клиента 72 | api_response = api_instance.portfolio_get() 73 | pprint(api_response) 74 | except ApiException as e: 75 | print("Exception when calling PortfolioApi->portfolio_get: %s\n" % e) 76 | ``` 77 | 78 | ### Parameters 79 | This endpoint does not need any parameter. 80 | 81 | ### Return type 82 | 83 | [**PortfolioResponse**](PortfolioResponse.md) 84 | 85 | ### Authorization 86 | 87 | [sso_auth](../README.md#sso_auth) 88 | 89 | ### HTTP request headers 90 | 91 | - **Content-Type**: Not defined 92 | - **Accept**: application/json 93 | 94 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 95 | 96 | -------------------------------------------------------------------------------- /docs/PortfolioCurrenciesResponse.md: -------------------------------------------------------------------------------- 1 | # PortfolioCurrenciesResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Ok'] 8 | **payload** | [**Currencies**](Currencies.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/PortfolioPosition.md: -------------------------------------------------------------------------------- 1 | # PortfolioPosition 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **figi** | **str** | | 7 | **ticker** | **str** | | [optional] 8 | **isin** | **str** | | [optional] 9 | **instrument_type** | [**InstrumentType**](InstrumentType.md) | | 10 | **balance** | **float** | | 11 | **blocked** | **float** | | [optional] 12 | **expected_yield** | [**MoneyAmount**](MoneyAmount.md) | | [optional] 13 | **lots** | **int** | | 14 | 15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 16 | 17 | -------------------------------------------------------------------------------- /docs/PortfolioResponse.md: -------------------------------------------------------------------------------- 1 | # PortfolioResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tracking_id** | **str** | | 7 | **status** | **str** | | [default to 'Ok'] 8 | **payload** | [**Portfolio**](Portfolio.md) | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | -------------------------------------------------------------------------------- /docs/SandboxCurrency.md: -------------------------------------------------------------------------------- 1 | # SandboxCurrency 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | -------------------------------------------------------------------------------- /docs/SandboxSetCurrencyBalanceRequest.md: -------------------------------------------------------------------------------- 1 | # SandboxSetCurrencyBalanceRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **currency** | [**SandboxCurrency**](SandboxCurrency.md) | | 7 | **balance** | **float** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | -------------------------------------------------------------------------------- /docs/SandboxSetPositionBalanceRequest.md: -------------------------------------------------------------------------------- 1 | # SandboxSetPositionBalanceRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **figi** | **str** | | [optional] 7 | **balance** | **float** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | -------------------------------------------------------------------------------- /git_push.sh: -------------------------------------------------------------------------------- 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 swagger-petstore-perl "minor update" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | 10 | if [ "$git_user_id" = "" ]; then 11 | git_user_id="GIT_USER_ID" 12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 13 | fi 14 | 15 | if [ "$git_repo_id" = "" ]; then 16 | git_repo_id="GIT_REPO_ID" 17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 18 | fi 19 | 20 | if [ "$release_note" = "" ]; then 21 | release_note="Minor update" 22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 23 | fi 24 | 25 | # Initialize the local directory as a Git repository 26 | git init 27 | 28 | # Adds the files in the local repository and stages them for commit. 29 | git add . 30 | 31 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 32 | git commit -m "$release_note" 33 | 34 | # Sets the new remote 35 | git_remote=`git remote` 36 | if [ "$git_remote" = "" ]; then # git remote not defined 37 | 38 | if [ "$GIT_TOKEN" = "" ]; then 39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 41 | else 42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 43 | fi 44 | 45 | fi 46 | 47 | git pull origin master 48 | 49 | # Pushes (Forces) the changes in the local repository up to the remote repository 50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 51 | git push origin master 2>&1 | grep -v 'To https' 52 | 53 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi >= 14.05.14 2 | six >= 1.10 3 | python_dateutil >= 2.5.3 4 | setuptools >= 21.0.0 5 | urllib3 >= 1.15.1 6 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from setuptools import setup, find_packages # noqa: H301 14 | 15 | NAME = "tinkoff-api-client" 16 | VERSION = "1.0.0" 17 | # To install the library, run the following 18 | # 19 | # python setup.py install 20 | # 21 | # prerequisite: setuptools 22 | # http://pypi.python.org/pypi/setuptools 23 | 24 | REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] 25 | 26 | setup( 27 | name=NAME, 28 | version=VERSION, 29 | description="OpenAPI", 30 | author_email="n.v.melnikov@tinkoff.ru", 31 | url="", 32 | keywords=["Swagger", "OpenAPI"], 33 | install_requires=REQUIRES, 34 | packages=find_packages(), 35 | include_package_data=True, 36 | long_description="""\ 37 | tinkoff.ru/invest OpenAPI. # noqa: E501 38 | """ 39 | ) 40 | -------------------------------------------------------------------------------- /test-requirements.txt: -------------------------------------------------------------------------------- 1 | coverage>=4.0.3 2 | nose>=1.3.7 3 | pluggy>=0.3.1 4 | py>=1.4.31 5 | randomize>=0.13 6 | -------------------------------------------------------------------------------- /test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reflash/tinkoff-python-api/4d0d0fc4fbe734c9c3d66256cce2ef8fcef73d1d/test/__init__.py -------------------------------------------------------------------------------- /test/test_currencies.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.currencies import Currencies # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestCurrencies(unittest.TestCase): 23 | """Currencies unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testCurrencies(self): 32 | """Test Currencies""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.currencies.Currencies() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_currency.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.currency import Currency # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestCurrency(unittest.TestCase): 23 | """Currency unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testCurrency(self): 32 | """Test Currency""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.currency.Currency() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_currency_position.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.currency_position import CurrencyPosition # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestCurrencyPosition(unittest.TestCase): 23 | """CurrencyPosition unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testCurrencyPosition(self): 32 | """Test CurrencyPosition""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.currency_position.CurrencyPosition() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_empty.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.empty import Empty # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestEmpty(unittest.TestCase): 23 | """Empty unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testEmpty(self): 32 | """Test Empty""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.empty.Empty() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_error.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.error import Error # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestError(unittest.TestCase): 23 | """Error unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testError(self): 32 | """Test Error""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.error.Error() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_error_payload.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.error_payload import ErrorPayload # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestErrorPayload(unittest.TestCase): 23 | """ErrorPayload unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testErrorPayload(self): 32 | """Test ErrorPayload""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.error_payload.ErrorPayload() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_instrument_type.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.instrument_type import InstrumentType # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestInstrumentType(unittest.TestCase): 23 | """InstrumentType unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testInstrumentType(self): 32 | """Test InstrumentType""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.instrument_type.InstrumentType() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_limit_order_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.limit_order_request import LimitOrderRequest # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestLimitOrderRequest(unittest.TestCase): 23 | """LimitOrderRequest unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testLimitOrderRequest(self): 32 | """Test LimitOrderRequest""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.limit_order_request.LimitOrderRequest() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_limit_order_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.limit_order_response import LimitOrderResponse # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestLimitOrderResponse(unittest.TestCase): 23 | """LimitOrderResponse unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testLimitOrderResponse(self): 32 | """Test LimitOrderResponse""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.limit_order_response.LimitOrderResponse() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_market_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from api.market_api import MarketApi # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestMarketApi(unittest.TestCase): 23 | """MarketApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = api.market_api.MarketApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_market_bonds_get(self): 32 | """Test case for market_bonds_get 33 | 34 | Получение списка облигаций # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_market_currencies_get(self): 39 | """Test case for market_currencies_get 40 | 41 | Получение списка валютных пар # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_market_etfs_get(self): 46 | """Test case for market_etfs_get 47 | 48 | Получение списка ETF # noqa: E501 49 | """ 50 | pass 51 | 52 | def test_market_search_by_figi_get(self): 53 | """Test case for market_search_by_figi_get 54 | 55 | Получение инструмента по FIGI # noqa: E501 56 | """ 57 | pass 58 | 59 | def test_market_search_by_ticker_get(self): 60 | """Test case for market_search_by_ticker_get 61 | 62 | Получение инструмента по тикеру # noqa: E501 63 | """ 64 | pass 65 | 66 | def test_market_stocks_get(self): 67 | """Test case for market_stocks_get 68 | 69 | Получение списка акций # noqa: E501 70 | """ 71 | pass 72 | 73 | 74 | if __name__ == '__main__': 75 | unittest.main() 76 | -------------------------------------------------------------------------------- /test/test_market_instrument.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.market_instrument import MarketInstrument # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestMarketInstrument(unittest.TestCase): 23 | """MarketInstrument unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testMarketInstrument(self): 32 | """Test MarketInstrument""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.market_instrument.MarketInstrument() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_market_instrument_list.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.market_instrument_list import MarketInstrumentList # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestMarketInstrumentList(unittest.TestCase): 23 | """MarketInstrumentList unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testMarketInstrumentList(self): 32 | """Test MarketInstrumentList""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.market_instrument_list.MarketInstrumentList() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_market_instrument_list_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.market_instrument_list_response import MarketInstrumentListResponse # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestMarketInstrumentListResponse(unittest.TestCase): 23 | """MarketInstrumentListResponse unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testMarketInstrumentListResponse(self): 32 | """Test MarketInstrumentListResponse""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.market_instrument_list_response.MarketInstrumentListResponse() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_market_instrument_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.market_instrument_response import MarketInstrumentResponse # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestMarketInstrumentResponse(unittest.TestCase): 23 | """MarketInstrumentResponse unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testMarketInstrumentResponse(self): 32 | """Test MarketInstrumentResponse""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.market_instrument_response.MarketInstrumentResponse() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_money_amount.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.money_amount import MoneyAmount # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestMoneyAmount(unittest.TestCase): 23 | """MoneyAmount unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testMoneyAmount(self): 32 | """Test MoneyAmount""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.money_amount.MoneyAmount() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operation.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operation import Operation # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperation(unittest.TestCase): 23 | """Operation unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperation(self): 32 | """Test Operation""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operation.Operation() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operation_interval.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operation_interval import OperationInterval # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperationInterval(unittest.TestCase): 23 | """OperationInterval unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperationInterval(self): 32 | """Test OperationInterval""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operation_interval.OperationInterval() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operation_status.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operation_status import OperationStatus # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperationStatus(unittest.TestCase): 23 | """OperationStatus unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperationStatus(self): 32 | """Test OperationStatus""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operation_status.OperationStatus() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operation_trade.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operation_trade import OperationTrade # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperationTrade(unittest.TestCase): 23 | """OperationTrade unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperationTrade(self): 32 | """Test OperationTrade""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operation_trade.OperationTrade() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operation_type.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operation_type import OperationType # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperationType(unittest.TestCase): 23 | """OperationType unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperationType(self): 32 | """Test OperationType""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operation_type.OperationType() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operation_type_with_commission.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operation_type_with_commission import OperationTypeWithCommission # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperationTypeWithCommission(unittest.TestCase): 23 | """OperationTypeWithCommission unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperationTypeWithCommission(self): 32 | """Test OperationTypeWithCommission""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operation_type_with_commission.OperationTypeWithCommission() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operations.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operations import Operations # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperations(unittest.TestCase): 23 | """Operations unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperations(self): 32 | """Test Operations""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operations.Operations() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_operations_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from api.operations_api import OperationsApi # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperationsApi(unittest.TestCase): 23 | """OperationsApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = api.operations_api.OperationsApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_operations_get(self): 32 | """Test case for operations_get 33 | 34 | Получение списка операций # noqa: E501 35 | """ 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_operations_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.operations_response import OperationsResponse # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOperationsResponse(unittest.TestCase): 23 | """OperationsResponse unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOperationsResponse(self): 32 | """Test OperationsResponse""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.operations_response.OperationsResponse() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_order.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.order import Order # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOrder(unittest.TestCase): 23 | """Order unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOrder(self): 32 | """Test Order""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.order.Order() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_order_status.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.order_status import OrderStatus # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOrderStatus(unittest.TestCase): 23 | """OrderStatus unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOrderStatus(self): 32 | """Test OrderStatus""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.order_status.OrderStatus() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_order_type.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.order_type import OrderType # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOrderType(unittest.TestCase): 23 | """OrderType unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOrderType(self): 32 | """Test OrderType""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.order_type.OrderType() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_orders_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from api.orders_api import OrdersApi # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOrdersApi(unittest.TestCase): 23 | """OrdersApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = api.orders_api.OrdersApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_orders_cancel_post(self): 32 | """Test case for orders_cancel_post 33 | 34 | Отмена заявки # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_orders_get(self): 39 | """Test case for orders_get 40 | 41 | Получение списка активных заявок # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_orders_limit_order_post(self): 46 | """Test case for orders_limit_order_post 47 | 48 | Создание лимитной заявки # noqa: E501 49 | """ 50 | pass 51 | 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /test/test_orders_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.orders_response import OrdersResponse # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestOrdersResponse(unittest.TestCase): 23 | """OrdersResponse unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testOrdersResponse(self): 32 | """Test OrdersResponse""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.orders_response.OrdersResponse() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_placed_limit_order.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.placed_limit_order import PlacedLimitOrder # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestPlacedLimitOrder(unittest.TestCase): 23 | """PlacedLimitOrder unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testPlacedLimitOrder(self): 32 | """Test PlacedLimitOrder""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.placed_limit_order.PlacedLimitOrder() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_portfolio.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.portfolio import Portfolio # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestPortfolio(unittest.TestCase): 23 | """Portfolio unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testPortfolio(self): 32 | """Test Portfolio""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.portfolio.Portfolio() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_portfolio_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from api.portfolio_api import PortfolioApi # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestPortfolioApi(unittest.TestCase): 23 | """PortfolioApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = api.portfolio_api.PortfolioApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_portfolio_currencies_get(self): 32 | """Test case for portfolio_currencies_get 33 | 34 | Получение валютных активов клиента # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_portfolio_get(self): 39 | """Test case for portfolio_get 40 | 41 | Получение портфеля клиента # noqa: E501 42 | """ 43 | pass 44 | 45 | 46 | if __name__ == '__main__': 47 | unittest.main() 48 | -------------------------------------------------------------------------------- /test/test_portfolio_currencies_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.portfolio_currencies_response import PortfolioCurrenciesResponse # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestPortfolioCurrenciesResponse(unittest.TestCase): 23 | """PortfolioCurrenciesResponse unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testPortfolioCurrenciesResponse(self): 32 | """Test PortfolioCurrenciesResponse""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.portfolio_currencies_response.PortfolioCurrenciesResponse() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_portfolio_position.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.portfolio_position import PortfolioPosition # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestPortfolioPosition(unittest.TestCase): 23 | """PortfolioPosition unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testPortfolioPosition(self): 32 | """Test PortfolioPosition""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.portfolio_position.PortfolioPosition() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_portfolio_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.portfolio_response import PortfolioResponse # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestPortfolioResponse(unittest.TestCase): 23 | """PortfolioResponse unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testPortfolioResponse(self): 32 | """Test PortfolioResponse""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.portfolio_response.PortfolioResponse() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_sandbox_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from api.sandbox_api import SandboxApi # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestSandboxApi(unittest.TestCase): 23 | """SandboxApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = api.sandbox_api.SandboxApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_sandbox_clear_post(self): 32 | """Test case for sandbox_clear_post 33 | 34 | Удаление всех позиций # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_sandbox_currencies_balance_post(self): 39 | """Test case for sandbox_currencies_balance_post 40 | 41 | Выставление баланса по валютным позициям # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_sandbox_positions_balance_post(self): 46 | """Test case for sandbox_positions_balance_post 47 | 48 | Выставление баланса по инструментным позициям # noqa: E501 49 | """ 50 | pass 51 | 52 | def test_sandbox_register_post(self): 53 | """Test case for sandbox_register_post 54 | 55 | Регистрация клиента в sandbox # noqa: E501 56 | """ 57 | pass 58 | 59 | 60 | if __name__ == '__main__': 61 | unittest.main() 62 | -------------------------------------------------------------------------------- /test/test_sandbox_currency.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.sandbox_currency import SandboxCurrency # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestSandboxCurrency(unittest.TestCase): 23 | """SandboxCurrency unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testSandboxCurrency(self): 32 | """Test SandboxCurrency""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.sandbox_currency.SandboxCurrency() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_sandbox_set_currency_balance_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.sandbox_set_currency_balance_request import SandboxSetCurrencyBalanceRequest # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestSandboxSetCurrencyBalanceRequest(unittest.TestCase): 23 | """SandboxSetCurrencyBalanceRequest unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testSandboxSetCurrencyBalanceRequest(self): 32 | """Test SandboxSetCurrencyBalanceRequest""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.sandbox_set_currency_balance_request.SandboxSetCurrencyBalanceRequest() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /test/test_sandbox_set_position_balance_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import unittest 16 | 17 | import tinkoff_api_client 18 | from models.sandbox_set_position_balance_request import SandboxSetPositionBalanceRequest # noqa: E501 19 | from tinkoff_api_client.rest import ApiException 20 | 21 | 22 | class TestSandboxSetPositionBalanceRequest(unittest.TestCase): 23 | """SandboxSetPositionBalanceRequest unit test stubs""" 24 | 25 | def setUp(self): 26 | pass 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def testSandboxSetPositionBalanceRequest(self): 32 | """Test SandboxSetPositionBalanceRequest""" 33 | # FIXME: construct object with mandatory attributes with example values 34 | # model = tinkoff_api_client.models.sandbox_set_position_balance_request.SandboxSetPositionBalanceRequest() # noqa: E501 35 | pass 36 | 37 | 38 | if __name__ == '__main__': 39 | unittest.main() 40 | -------------------------------------------------------------------------------- /tinkoff_api_client/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | 5 | """ 6 | OpenAPI 7 | 8 | tinkoff.ru/invest OpenAPI. # noqa: E501 9 | 10 | OpenAPI spec version: 1.0.0 11 | Contact: n.v.melnikov@tinkoff.ru 12 | Generated by: https://github.com/swagger-api/swagger-codegen.git 13 | """ 14 | 15 | from __future__ import absolute_import 16 | 17 | # import apis into sdk package 18 | from tinkoff_api_client.api.market_api import MarketApi 19 | from tinkoff_api_client.api.operations_api import OperationsApi 20 | from tinkoff_api_client.api.orders_api import OrdersApi 21 | from tinkoff_api_client.api.portfolio_api import PortfolioApi 22 | from tinkoff_api_client.api.sandbox_api import SandboxApi 23 | # import ApiClient 24 | from tinkoff_api_client.api_client import ApiClient 25 | from tinkoff_api_client.configuration import Configuration 26 | # import models into sdk package 27 | from tinkoff_api_client.models.currencies import Currencies 28 | from tinkoff_api_client.models.currency import Currency 29 | from tinkoff_api_client.models.currency_position import CurrencyPosition 30 | from tinkoff_api_client.models.empty import Empty 31 | from tinkoff_api_client.models.error import Error 32 | from tinkoff_api_client.models.error_payload import ErrorPayload 33 | from tinkoff_api_client.models.instrument_type import InstrumentType 34 | from tinkoff_api_client.models.limit_order_request import LimitOrderRequest 35 | from tinkoff_api_client.models.limit_order_response import LimitOrderResponse 36 | from tinkoff_api_client.models.market_instrument import MarketInstrument 37 | from tinkoff_api_client.models.market_instrument_list import MarketInstrumentList 38 | from tinkoff_api_client.models.market_instrument_list_response import MarketInstrumentListResponse 39 | from tinkoff_api_client.models.market_instrument_response import MarketInstrumentResponse 40 | from tinkoff_api_client.models.money_amount import MoneyAmount 41 | from tinkoff_api_client.models.operation import Operation 42 | from tinkoff_api_client.models.operation_interval import OperationInterval 43 | from tinkoff_api_client.models.operation_status import OperationStatus 44 | from tinkoff_api_client.models.operation_trade import OperationTrade 45 | from tinkoff_api_client.models.operation_type import OperationType 46 | from tinkoff_api_client.models.operation_type_with_commission import OperationTypeWithCommission 47 | from tinkoff_api_client.models.operations import Operations 48 | from tinkoff_api_client.models.operations_response import OperationsResponse 49 | from tinkoff_api_client.models.order import Order 50 | from tinkoff_api_client.models.order_status import OrderStatus 51 | from tinkoff_api_client.models.order_type import OrderType 52 | from tinkoff_api_client.models.orders_response import OrdersResponse 53 | from tinkoff_api_client.models.placed_limit_order import PlacedLimitOrder 54 | from tinkoff_api_client.models.portfolio import Portfolio 55 | from tinkoff_api_client.models.portfolio_currencies_response import PortfolioCurrenciesResponse 56 | from tinkoff_api_client.models.portfolio_position import PortfolioPosition 57 | from tinkoff_api_client.models.portfolio_response import PortfolioResponse 58 | from tinkoff_api_client.models.sandbox_currency import SandboxCurrency 59 | from tinkoff_api_client.models.sandbox_set_currency_balance_request import SandboxSetCurrencyBalanceRequest 60 | from tinkoff_api_client.models.sandbox_set_position_balance_request import SandboxSetPositionBalanceRequest 61 | -------------------------------------------------------------------------------- /tinkoff_api_client/api/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | from tinkoff_api_client.api.market_api import MarketApi 7 | from tinkoff_api_client.api.operations_api import OperationsApi 8 | from tinkoff_api_client.api.orders_api import OrdersApi 9 | from tinkoff_api_client.api.portfolio_api import PortfolioApi 10 | from tinkoff_api_client.api.sandbox_api import SandboxApi 11 | -------------------------------------------------------------------------------- /tinkoff_api_client/api/operations_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | from __future__ import absolute_import 14 | 15 | import re # noqa: F401 16 | 17 | # python 2 and python 3 compatibility library 18 | import six 19 | 20 | from tinkoff_api_client.api_client import ApiClient 21 | 22 | 23 | class OperationsApi(object): 24 | """NOTE: This class is auto generated by the swagger code generator program. 25 | 26 | Do not edit the class manually. 27 | Ref: https://github.com/swagger-api/swagger-codegen 28 | """ 29 | 30 | def __init__(self, api_client=None): 31 | if api_client is None: 32 | api_client = ApiClient() 33 | self.api_client = api_client 34 | 35 | def operations_get(self, _from, interval, **kwargs): # noqa: E501 36 | """Получение списка операций # noqa: E501 37 | 38 | This method makes a synchronous HTTP request by default. To make an 39 | asynchronous HTTP request, please pass async_req=True 40 | >>> thread = api.operations_get(_from, interval, async_req=True) 41 | >>> result = thread.get() 42 | 43 | :param async_req bool 44 | :param date _from: Начало временного промежутка (required) 45 | :param OperationInterval interval: Длительность временного промежутка (required) 46 | :param str figi: Figi инструмента для фильтрации 47 | :return: OperationsResponse 48 | If the method is called asynchronously, 49 | returns the request thread. 50 | """ 51 | kwargs['_return_http_data_only'] = True 52 | if kwargs.get('async_req'): 53 | return self.operations_get_with_http_info(_from, interval, **kwargs) # noqa: E501 54 | else: 55 | (data) = self.operations_get_with_http_info(_from, interval, **kwargs) # noqa: E501 56 | return data 57 | 58 | def operations_get_with_http_info(self, _from, interval, **kwargs): # noqa: E501 59 | """Получение списка операций # noqa: E501 60 | 61 | This method makes a synchronous HTTP request by default. To make an 62 | asynchronous HTTP request, please pass async_req=True 63 | >>> thread = api.operations_get_with_http_info(_from, interval, async_req=True) 64 | >>> result = thread.get() 65 | 66 | :param async_req bool 67 | :param date _from: Начало временного промежутка (required) 68 | :param OperationInterval interval: Длительность временного промежутка (required) 69 | :param str figi: Figi инструмента для фильтрации 70 | :return: OperationsResponse 71 | If the method is called asynchronously, 72 | returns the request thread. 73 | """ 74 | 75 | all_params = ['_from', 'interval', 'figi'] # noqa: E501 76 | all_params.append('async_req') 77 | all_params.append('_return_http_data_only') 78 | all_params.append('_preload_content') 79 | all_params.append('_request_timeout') 80 | 81 | params = locals() 82 | for key, val in six.iteritems(params['kwargs']): 83 | if key not in all_params: 84 | raise TypeError( 85 | "Got an unexpected keyword argument '%s'" 86 | " to method operations_get" % key 87 | ) 88 | params[key] = val 89 | del params['kwargs'] 90 | # verify the required parameter '_from' is set 91 | if ('_from' not in params or 92 | params['_from'] is None): 93 | raise ValueError("Missing the required parameter `_from` when calling `operations_get`") # noqa: E501 94 | # verify the required parameter 'interval' is set 95 | if ('interval' not in params or 96 | params['interval'] is None): 97 | raise ValueError("Missing the required parameter `interval` when calling `operations_get`") # noqa: E501 98 | 99 | collection_formats = {} 100 | 101 | path_params = {} 102 | 103 | query_params = [] 104 | if '_from' in params: 105 | query_params.append(('from', params['_from'])) # noqa: E501 106 | if 'interval' in params: 107 | query_params.append(('interval', params['interval'])) # noqa: E501 108 | if 'figi' in params: 109 | query_params.append(('figi', params['figi'])) # noqa: E501 110 | 111 | header_params = {} 112 | 113 | form_params = [] 114 | local_var_files = {} 115 | 116 | body_params = None 117 | # HTTP header `Accept` 118 | header_params['Accept'] = self.api_client.select_header_accept( 119 | ['application/json']) # noqa: E501 120 | 121 | # Authentication setting 122 | auth_settings = ['sso_auth'] # noqa: E501 123 | 124 | return self.api_client.call_api( 125 | '/operations', 'GET', 126 | path_params, 127 | query_params, 128 | header_params, 129 | body=body_params, 130 | post_params=form_params, 131 | files=local_var_files, 132 | response_type='OperationsResponse', # noqa: E501 133 | auth_settings=auth_settings, 134 | async_req=params.get('async_req'), 135 | _return_http_data_only=params.get('_return_http_data_only'), 136 | _preload_content=params.get('_preload_content', True), 137 | _request_timeout=params.get('_request_timeout'), 138 | collection_formats=collection_formats) 139 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | """ 5 | OpenAPI 6 | 7 | tinkoff.ru/invest OpenAPI. # noqa: E501 8 | 9 | OpenAPI spec version: 1.0.0 10 | Contact: n.v.melnikov@tinkoff.ru 11 | Generated by: https://github.com/swagger-api/swagger-codegen.git 12 | """ 13 | 14 | from __future__ import absolute_import 15 | 16 | # import models into model package 17 | from tinkoff_api_client.models.currencies import Currencies 18 | from tinkoff_api_client.models.currency import Currency 19 | from tinkoff_api_client.models.currency_position import CurrencyPosition 20 | from tinkoff_api_client.models.empty import Empty 21 | from tinkoff_api_client.models.error import Error 22 | from tinkoff_api_client.models.error_payload import ErrorPayload 23 | from tinkoff_api_client.models.instrument_type import InstrumentType 24 | from tinkoff_api_client.models.limit_order_request import LimitOrderRequest 25 | from tinkoff_api_client.models.limit_order_response import LimitOrderResponse 26 | from tinkoff_api_client.models.market_instrument import MarketInstrument 27 | from tinkoff_api_client.models.market_instrument_list import MarketInstrumentList 28 | from tinkoff_api_client.models.market_instrument_list_response import MarketInstrumentListResponse 29 | from tinkoff_api_client.models.market_instrument_response import MarketInstrumentResponse 30 | from tinkoff_api_client.models.money_amount import MoneyAmount 31 | from tinkoff_api_client.models.operation import Operation 32 | from tinkoff_api_client.models.operation_interval import OperationInterval 33 | from tinkoff_api_client.models.operation_status import OperationStatus 34 | from tinkoff_api_client.models.operation_trade import OperationTrade 35 | from tinkoff_api_client.models.operation_type import OperationType 36 | from tinkoff_api_client.models.operation_type_with_commission import OperationTypeWithCommission 37 | from tinkoff_api_client.models.operations import Operations 38 | from tinkoff_api_client.models.operations_response import OperationsResponse 39 | from tinkoff_api_client.models.order import Order 40 | from tinkoff_api_client.models.order_status import OrderStatus 41 | from tinkoff_api_client.models.order_type import OrderType 42 | from tinkoff_api_client.models.orders_response import OrdersResponse 43 | from tinkoff_api_client.models.placed_limit_order import PlacedLimitOrder 44 | from tinkoff_api_client.models.portfolio import Portfolio 45 | from tinkoff_api_client.models.portfolio_currencies_response import PortfolioCurrenciesResponse 46 | from tinkoff_api_client.models.portfolio_position import PortfolioPosition 47 | from tinkoff_api_client.models.portfolio_response import PortfolioResponse 48 | from tinkoff_api_client.models.sandbox_currency import SandboxCurrency 49 | from tinkoff_api_client.models.sandbox_set_currency_balance_request import SandboxSetCurrencyBalanceRequest 50 | from tinkoff_api_client.models.sandbox_set_position_balance_request import SandboxSetPositionBalanceRequest 51 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/currencies.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.currency_position import CurrencyPosition # noqa: F401,E501 18 | 19 | 20 | class Currencies(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'currencies': 'list[CurrencyPosition]' 34 | } 35 | 36 | attribute_map = { 37 | 'currencies': 'currencies' 38 | } 39 | 40 | def __init__(self, currencies=None): # noqa: E501 41 | """Currencies - a model defined in Swagger""" # noqa: E501 42 | self._currencies = None 43 | self.discriminator = None 44 | self.currencies = currencies 45 | 46 | @property 47 | def currencies(self): 48 | """Gets the currencies of this Currencies. # noqa: E501 49 | 50 | 51 | :return: The currencies of this Currencies. # noqa: E501 52 | :rtype: list[CurrencyPosition] 53 | """ 54 | return self._currencies 55 | 56 | @currencies.setter 57 | def currencies(self, currencies): 58 | """Sets the currencies of this Currencies. 59 | 60 | 61 | :param currencies: The currencies of this Currencies. # noqa: E501 62 | :type: list[CurrencyPosition] 63 | """ 64 | if currencies is None: 65 | raise ValueError("Invalid value for `currencies`, must not be `None`") # noqa: E501 66 | 67 | self._currencies = currencies 68 | 69 | def to_dict(self): 70 | """Returns the model properties as a dict""" 71 | result = {} 72 | 73 | for attr, _ in six.iteritems(self.swagger_types): 74 | value = getattr(self, attr) 75 | if isinstance(value, list): 76 | result[attr] = list(map( 77 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 78 | value 79 | )) 80 | elif hasattr(value, "to_dict"): 81 | result[attr] = value.to_dict() 82 | elif isinstance(value, dict): 83 | result[attr] = dict(map( 84 | lambda item: (item[0], item[1].to_dict()) 85 | if hasattr(item[1], "to_dict") else item, 86 | value.items() 87 | )) 88 | else: 89 | result[attr] = value 90 | if issubclass(Currencies, dict): 91 | for key, value in self.items(): 92 | result[key] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, Currencies): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/currency.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class Currency(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | RUB = "RUB" 29 | USD = "USD" 30 | EUR = "EUR" 31 | """ 32 | Attributes: 33 | swagger_types (dict): The key is attribute name 34 | and the value is attribute type. 35 | attribute_map (dict): The key is attribute name 36 | and the value is json key in definition. 37 | """ 38 | swagger_types = { 39 | } 40 | 41 | attribute_map = { 42 | } 43 | 44 | def __init__(self): # noqa: E501 45 | """Currency - a model defined in Swagger""" # noqa: E501 46 | self.discriminator = None 47 | 48 | def to_dict(self): 49 | """Returns the model properties as a dict""" 50 | result = {} 51 | 52 | for attr, _ in six.iteritems(self.swagger_types): 53 | value = getattr(self, attr) 54 | if isinstance(value, list): 55 | result[attr] = list(map( 56 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 57 | value 58 | )) 59 | elif hasattr(value, "to_dict"): 60 | result[attr] = value.to_dict() 61 | elif isinstance(value, dict): 62 | result[attr] = dict(map( 63 | lambda item: (item[0], item[1].to_dict()) 64 | if hasattr(item[1], "to_dict") else item, 65 | value.items() 66 | )) 67 | else: 68 | result[attr] = value 69 | if issubclass(Currency, dict): 70 | for key, value in self.items(): 71 | result[key] = value 72 | 73 | return result 74 | 75 | def to_str(self): 76 | """Returns the string representation of the model""" 77 | return pprint.pformat(self.to_dict()) 78 | 79 | def __repr__(self): 80 | """For `print` and `pprint`""" 81 | return self.to_str() 82 | 83 | def __eq__(self, other): 84 | """Returns true if both objects are equal""" 85 | if not isinstance(other, Currency): 86 | return False 87 | 88 | return self.__dict__ == other.__dict__ 89 | 90 | def __ne__(self, other): 91 | """Returns true if both objects are not equal""" 92 | return not self == other 93 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/currency_position.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.currency import Currency # noqa: F401,E501 18 | 19 | 20 | class CurrencyPosition(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'currency': 'Currency', 34 | 'balance': 'float', 35 | 'blocked': 'float' 36 | } 37 | 38 | attribute_map = { 39 | 'currency': 'currency', 40 | 'balance': 'balance', 41 | 'blocked': 'blocked' 42 | } 43 | 44 | def __init__(self, currency=None, balance=None, blocked=None): # noqa: E501 45 | """CurrencyPosition - a model defined in Swagger""" # noqa: E501 46 | self._currency = None 47 | self._balance = None 48 | self._blocked = None 49 | self.discriminator = None 50 | self.currency = currency 51 | self.balance = balance 52 | self.blocked = blocked 53 | 54 | @property 55 | def currency(self): 56 | """Gets the currency of this CurrencyPosition. # noqa: E501 57 | 58 | 59 | :return: The currency of this CurrencyPosition. # noqa: E501 60 | :rtype: Currency 61 | """ 62 | return self._currency 63 | 64 | @currency.setter 65 | def currency(self, currency): 66 | """Sets the currency of this CurrencyPosition. 67 | 68 | 69 | :param currency: The currency of this CurrencyPosition. # noqa: E501 70 | :type: Currency 71 | """ 72 | if currency is None: 73 | raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 74 | 75 | self._currency = currency 76 | 77 | @property 78 | def balance(self): 79 | """Gets the balance of this CurrencyPosition. # noqa: E501 80 | 81 | 82 | :return: The balance of this CurrencyPosition. # noqa: E501 83 | :rtype: float 84 | """ 85 | return self._balance 86 | 87 | @balance.setter 88 | def balance(self, balance): 89 | """Sets the balance of this CurrencyPosition. 90 | 91 | 92 | :param balance: The balance of this CurrencyPosition. # noqa: E501 93 | :type: float 94 | """ 95 | if balance is None: 96 | raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 97 | 98 | self._balance = balance 99 | 100 | @property 101 | def blocked(self): 102 | """Gets the blocked of this CurrencyPosition. # noqa: E501 103 | 104 | 105 | :return: The blocked of this CurrencyPosition. # noqa: E501 106 | :rtype: float 107 | """ 108 | return self._blocked 109 | 110 | @blocked.setter 111 | def blocked(self, blocked): 112 | """Sets the blocked of this CurrencyPosition. 113 | 114 | 115 | :param blocked: The blocked of this CurrencyPosition. # noqa: E501 116 | :type: float 117 | """ 118 | if blocked is None: 119 | raise ValueError("Invalid value for `blocked`, must not be `None`") # noqa: E501 120 | 121 | self._blocked = blocked 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(CurrencyPosition, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, CurrencyPosition): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/empty.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class Empty(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | """ 25 | Attributes: 26 | swagger_types (dict): The key is attribute name 27 | and the value is attribute type. 28 | attribute_map (dict): The key is attribute name 29 | and the value is json key in definition. 30 | """ 31 | swagger_types = { 32 | 'tracking_id': 'str', 33 | 'payload': 'object', 34 | 'status': 'str' 35 | } 36 | 37 | attribute_map = { 38 | 'tracking_id': 'trackingId', 39 | 'payload': 'payload', 40 | 'status': 'status' 41 | } 42 | 43 | def __init__(self, tracking_id=None, payload=None, status='Ok'): # noqa: E501 44 | """Empty - a model defined in Swagger""" # noqa: E501 45 | self._tracking_id = None 46 | self._payload = None 47 | self._status = None 48 | self.discriminator = None 49 | self.tracking_id = tracking_id 50 | self.payload = payload 51 | self.status = status 52 | 53 | @property 54 | def tracking_id(self): 55 | """Gets the tracking_id of this Empty. # noqa: E501 56 | 57 | 58 | :return: The tracking_id of this Empty. # noqa: E501 59 | :rtype: str 60 | """ 61 | return self._tracking_id 62 | 63 | @tracking_id.setter 64 | def tracking_id(self, tracking_id): 65 | """Sets the tracking_id of this Empty. 66 | 67 | 68 | :param tracking_id: The tracking_id of this Empty. # noqa: E501 69 | :type: str 70 | """ 71 | if tracking_id is None: 72 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 73 | 74 | self._tracking_id = tracking_id 75 | 76 | @property 77 | def payload(self): 78 | """Gets the payload of this Empty. # noqa: E501 79 | 80 | 81 | :return: The payload of this Empty. # noqa: E501 82 | :rtype: object 83 | """ 84 | return self._payload 85 | 86 | @payload.setter 87 | def payload(self, payload): 88 | """Sets the payload of this Empty. 89 | 90 | 91 | :param payload: The payload of this Empty. # noqa: E501 92 | :type: object 93 | """ 94 | if payload is None: 95 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 96 | 97 | self._payload = payload 98 | 99 | @property 100 | def status(self): 101 | """Gets the status of this Empty. # noqa: E501 102 | 103 | 104 | :return: The status of this Empty. # noqa: E501 105 | :rtype: str 106 | """ 107 | return self._status 108 | 109 | @status.setter 110 | def status(self, status): 111 | """Sets the status of this Empty. 112 | 113 | 114 | :param status: The status of this Empty. # noqa: E501 115 | :type: str 116 | """ 117 | if status is None: 118 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 119 | 120 | self._status = status 121 | 122 | def to_dict(self): 123 | """Returns the model properties as a dict""" 124 | result = {} 125 | 126 | for attr, _ in six.iteritems(self.swagger_types): 127 | value = getattr(self, attr) 128 | if isinstance(value, list): 129 | result[attr] = list(map( 130 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 131 | value 132 | )) 133 | elif hasattr(value, "to_dict"): 134 | result[attr] = value.to_dict() 135 | elif isinstance(value, dict): 136 | result[attr] = dict(map( 137 | lambda item: (item[0], item[1].to_dict()) 138 | if hasattr(item[1], "to_dict") else item, 139 | value.items() 140 | )) 141 | else: 142 | result[attr] = value 143 | if issubclass(Empty, dict): 144 | for key, value in self.items(): 145 | result[key] = value 146 | 147 | return result 148 | 149 | def to_str(self): 150 | """Returns the string representation of the model""" 151 | return pprint.pformat(self.to_dict()) 152 | 153 | def __repr__(self): 154 | """For `print` and `pprint`""" 155 | return self.to_str() 156 | 157 | def __eq__(self, other): 158 | """Returns true if both objects are equal""" 159 | if not isinstance(other, Empty): 160 | return False 161 | 162 | return self.__dict__ == other.__dict__ 163 | 164 | def __ne__(self, other): 165 | """Returns true if both objects are not equal""" 166 | return not self == other 167 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/error.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.error_payload import ErrorPayload # noqa: F401,E501 18 | 19 | 20 | class Error(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'ErrorPayload' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Error', payload=None): # noqa: E501 45 | """Error - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this Error. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this Error. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this Error. 67 | 68 | 69 | :param tracking_id: The tracking_id of this Error. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this Error. # noqa: E501 80 | 81 | 82 | :return: The status of this Error. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this Error. 90 | 91 | 92 | :param status: The status of this Error. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this Error. # noqa: E501 103 | 104 | 105 | :return: The payload of this Error. # noqa: E501 106 | :rtype: ErrorPayload 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this Error. 113 | 114 | 115 | :param payload: The payload of this Error. # noqa: E501 116 | :type: ErrorPayload 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(Error, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, Error): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/error_payload.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class ErrorPayload(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | """ 25 | Attributes: 26 | swagger_types (dict): The key is attribute name 27 | and the value is attribute type. 28 | attribute_map (dict): The key is attribute name 29 | and the value is json key in definition. 30 | """ 31 | swagger_types = { 32 | 'message': 'str', 33 | 'code': 'str' 34 | } 35 | 36 | attribute_map = { 37 | 'message': 'message', 38 | 'code': 'code' 39 | } 40 | 41 | def __init__(self, message=None, code=None): # noqa: E501 42 | """ErrorPayload - a model defined in Swagger""" # noqa: E501 43 | self._message = None 44 | self._code = None 45 | self.discriminator = None 46 | if message is not None: 47 | self.message = message 48 | if code is not None: 49 | self.code = code 50 | 51 | @property 52 | def message(self): 53 | """Gets the message of this ErrorPayload. # noqa: E501 54 | 55 | 56 | :return: The message of this ErrorPayload. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._message 60 | 61 | @message.setter 62 | def message(self, message): 63 | """Sets the message of this ErrorPayload. 64 | 65 | 66 | :param message: The message of this ErrorPayload. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._message = message 71 | 72 | @property 73 | def code(self): 74 | """Gets the code of this ErrorPayload. # noqa: E501 75 | 76 | 77 | :return: The code of this ErrorPayload. # noqa: E501 78 | :rtype: str 79 | """ 80 | return self._code 81 | 82 | @code.setter 83 | def code(self, code): 84 | """Sets the code of this ErrorPayload. 85 | 86 | 87 | :param code: The code of this ErrorPayload. # noqa: E501 88 | :type: str 89 | """ 90 | 91 | self._code = code 92 | 93 | def to_dict(self): 94 | """Returns the model properties as a dict""" 95 | result = {} 96 | 97 | for attr, _ in six.iteritems(self.swagger_types): 98 | value = getattr(self, attr) 99 | if isinstance(value, list): 100 | result[attr] = list(map( 101 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 102 | value 103 | )) 104 | elif hasattr(value, "to_dict"): 105 | result[attr] = value.to_dict() 106 | elif isinstance(value, dict): 107 | result[attr] = dict(map( 108 | lambda item: (item[0], item[1].to_dict()) 109 | if hasattr(item[1], "to_dict") else item, 110 | value.items() 111 | )) 112 | else: 113 | result[attr] = value 114 | if issubclass(ErrorPayload, dict): 115 | for key, value in self.items(): 116 | result[key] = value 117 | 118 | return result 119 | 120 | def to_str(self): 121 | """Returns the string representation of the model""" 122 | return pprint.pformat(self.to_dict()) 123 | 124 | def __repr__(self): 125 | """For `print` and `pprint`""" 126 | return self.to_str() 127 | 128 | def __eq__(self, other): 129 | """Returns true if both objects are equal""" 130 | if not isinstance(other, ErrorPayload): 131 | return False 132 | 133 | return self.__dict__ == other.__dict__ 134 | 135 | def __ne__(self, other): 136 | """Returns true if both objects are not equal""" 137 | return not self == other 138 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/instrument_type.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class InstrumentType(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | STOCK = "Stock" 29 | CURRENCY = "Currency" 30 | BOND = "Bond" 31 | ETF = "Etf" 32 | """ 33 | Attributes: 34 | swagger_types (dict): The key is attribute name 35 | and the value is attribute type. 36 | attribute_map (dict): The key is attribute name 37 | and the value is json key in definition. 38 | """ 39 | swagger_types = { 40 | } 41 | 42 | attribute_map = { 43 | } 44 | 45 | def __init__(self): # noqa: E501 46 | """InstrumentType - a model defined in Swagger""" # noqa: E501 47 | self.discriminator = None 48 | 49 | def to_dict(self): 50 | """Returns the model properties as a dict""" 51 | result = {} 52 | 53 | for attr, _ in six.iteritems(self.swagger_types): 54 | value = getattr(self, attr) 55 | if isinstance(value, list): 56 | result[attr] = list(map( 57 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 58 | value 59 | )) 60 | elif hasattr(value, "to_dict"): 61 | result[attr] = value.to_dict() 62 | elif isinstance(value, dict): 63 | result[attr] = dict(map( 64 | lambda item: (item[0], item[1].to_dict()) 65 | if hasattr(item[1], "to_dict") else item, 66 | value.items() 67 | )) 68 | else: 69 | result[attr] = value 70 | if issubclass(InstrumentType, dict): 71 | for key, value in self.items(): 72 | result[key] = value 73 | 74 | return result 75 | 76 | def to_str(self): 77 | """Returns the string representation of the model""" 78 | return pprint.pformat(self.to_dict()) 79 | 80 | def __repr__(self): 81 | """For `print` and `pprint`""" 82 | return self.to_str() 83 | 84 | def __eq__(self, other): 85 | """Returns true if both objects are equal""" 86 | if not isinstance(other, InstrumentType): 87 | return False 88 | 89 | return self.__dict__ == other.__dict__ 90 | 91 | def __ne__(self, other): 92 | """Returns true if both objects are not equal""" 93 | return not self == other 94 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/limit_order_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.operation_type import OperationType # noqa: F401,E501 18 | 19 | 20 | class LimitOrderRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'lots': 'int', 34 | 'operation': 'OperationType', 35 | 'price': 'float' 36 | } 37 | 38 | attribute_map = { 39 | 'lots': 'lots', 40 | 'operation': 'operation', 41 | 'price': 'price' 42 | } 43 | 44 | def __init__(self, lots=None, operation=None, price=None): # noqa: E501 45 | """LimitOrderRequest - a model defined in Swagger""" # noqa: E501 46 | self._lots = None 47 | self._operation = None 48 | self._price = None 49 | self.discriminator = None 50 | self.lots = lots 51 | self.operation = operation 52 | self.price = price 53 | 54 | @property 55 | def lots(self): 56 | """Gets the lots of this LimitOrderRequest. # noqa: E501 57 | 58 | 59 | :return: The lots of this LimitOrderRequest. # noqa: E501 60 | :rtype: int 61 | """ 62 | return self._lots 63 | 64 | @lots.setter 65 | def lots(self, lots): 66 | """Sets the lots of this LimitOrderRequest. 67 | 68 | 69 | :param lots: The lots of this LimitOrderRequest. # noqa: E501 70 | :type: int 71 | """ 72 | if lots is None: 73 | raise ValueError("Invalid value for `lots`, must not be `None`") # noqa: E501 74 | 75 | self._lots = lots 76 | 77 | @property 78 | def operation(self): 79 | """Gets the operation of this LimitOrderRequest. # noqa: E501 80 | 81 | 82 | :return: The operation of this LimitOrderRequest. # noqa: E501 83 | :rtype: OperationType 84 | """ 85 | return self._operation 86 | 87 | @operation.setter 88 | def operation(self, operation): 89 | """Sets the operation of this LimitOrderRequest. 90 | 91 | 92 | :param operation: The operation of this LimitOrderRequest. # noqa: E501 93 | :type: OperationType 94 | """ 95 | if operation is None: 96 | raise ValueError("Invalid value for `operation`, must not be `None`") # noqa: E501 97 | 98 | self._operation = operation 99 | 100 | @property 101 | def price(self): 102 | """Gets the price of this LimitOrderRequest. # noqa: E501 103 | 104 | 105 | :return: The price of this LimitOrderRequest. # noqa: E501 106 | :rtype: float 107 | """ 108 | return self._price 109 | 110 | @price.setter 111 | def price(self, price): 112 | """Sets the price of this LimitOrderRequest. 113 | 114 | 115 | :param price: The price of this LimitOrderRequest. # noqa: E501 116 | :type: float 117 | """ 118 | if price is None: 119 | raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 120 | 121 | self._price = price 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(LimitOrderRequest, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, LimitOrderRequest): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/limit_order_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.placed_limit_order import PlacedLimitOrder # noqa: F401,E501 18 | 19 | 20 | class LimitOrderResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'PlacedLimitOrder' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Ok', payload=None): # noqa: E501 45 | """LimitOrderResponse - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this LimitOrderResponse. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this LimitOrderResponse. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this LimitOrderResponse. 67 | 68 | 69 | :param tracking_id: The tracking_id of this LimitOrderResponse. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this LimitOrderResponse. # noqa: E501 80 | 81 | 82 | :return: The status of this LimitOrderResponse. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this LimitOrderResponse. 90 | 91 | 92 | :param status: The status of this LimitOrderResponse. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this LimitOrderResponse. # noqa: E501 103 | 104 | 105 | :return: The payload of this LimitOrderResponse. # noqa: E501 106 | :rtype: PlacedLimitOrder 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this LimitOrderResponse. 113 | 114 | 115 | :param payload: The payload of this LimitOrderResponse. # noqa: E501 116 | :type: PlacedLimitOrder 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(LimitOrderResponse, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, LimitOrderResponse): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/market_instrument_list.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.market_instrument import MarketInstrument # noqa: F401,E501 18 | 19 | 20 | class MarketInstrumentList(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'total': 'BigDecimal', 34 | 'instruments': 'list[MarketInstrument]' 35 | } 36 | 37 | attribute_map = { 38 | 'total': 'total', 39 | 'instruments': 'instruments' 40 | } 41 | 42 | def __init__(self, total=None, instruments=None): # noqa: E501 43 | """MarketInstrumentList - a model defined in Swagger""" # noqa: E501 44 | self._total = None 45 | self._instruments = None 46 | self.discriminator = None 47 | self.total = total 48 | self.instruments = instruments 49 | 50 | @property 51 | def total(self): 52 | """Gets the total of this MarketInstrumentList. # noqa: E501 53 | 54 | 55 | :return: The total of this MarketInstrumentList. # noqa: E501 56 | :rtype: BigDecimal 57 | """ 58 | return self._total 59 | 60 | @total.setter 61 | def total(self, total): 62 | """Sets the total of this MarketInstrumentList. 63 | 64 | 65 | :param total: The total of this MarketInstrumentList. # noqa: E501 66 | :type: BigDecimal 67 | """ 68 | if total is None: 69 | raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 70 | 71 | self._total = total 72 | 73 | @property 74 | def instruments(self): 75 | """Gets the instruments of this MarketInstrumentList. # noqa: E501 76 | 77 | 78 | :return: The instruments of this MarketInstrumentList. # noqa: E501 79 | :rtype: list[MarketInstrument] 80 | """ 81 | return self._instruments 82 | 83 | @instruments.setter 84 | def instruments(self, instruments): 85 | """Sets the instruments of this MarketInstrumentList. 86 | 87 | 88 | :param instruments: The instruments of this MarketInstrumentList. # noqa: E501 89 | :type: list[MarketInstrument] 90 | """ 91 | if instruments is None: 92 | raise ValueError("Invalid value for `instruments`, must not be `None`") # noqa: E501 93 | 94 | self._instruments = instruments 95 | 96 | def to_dict(self): 97 | """Returns the model properties as a dict""" 98 | result = {} 99 | 100 | for attr, _ in six.iteritems(self.swagger_types): 101 | value = getattr(self, attr) 102 | if isinstance(value, list): 103 | result[attr] = list(map( 104 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 105 | value 106 | )) 107 | elif hasattr(value, "to_dict"): 108 | result[attr] = value.to_dict() 109 | elif isinstance(value, dict): 110 | result[attr] = dict(map( 111 | lambda item: (item[0], item[1].to_dict()) 112 | if hasattr(item[1], "to_dict") else item, 113 | value.items() 114 | )) 115 | else: 116 | result[attr] = value 117 | if issubclass(MarketInstrumentList, dict): 118 | for key, value in self.items(): 119 | result[key] = value 120 | 121 | return result 122 | 123 | def to_str(self): 124 | """Returns the string representation of the model""" 125 | return pprint.pformat(self.to_dict()) 126 | 127 | def __repr__(self): 128 | """For `print` and `pprint`""" 129 | return self.to_str() 130 | 131 | def __eq__(self, other): 132 | """Returns true if both objects are equal""" 133 | if not isinstance(other, MarketInstrumentList): 134 | return False 135 | 136 | return self.__dict__ == other.__dict__ 137 | 138 | def __ne__(self, other): 139 | """Returns true if both objects are not equal""" 140 | return not self == other 141 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/market_instrument_list_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.market_instrument_list import MarketInstrumentList # noqa: F401,E501 18 | 19 | 20 | class MarketInstrumentListResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'MarketInstrumentList' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Ok', payload=None): # noqa: E501 45 | """MarketInstrumentListResponse - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this MarketInstrumentListResponse. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this MarketInstrumentListResponse. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this MarketInstrumentListResponse. 67 | 68 | 69 | :param tracking_id: The tracking_id of this MarketInstrumentListResponse. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this MarketInstrumentListResponse. # noqa: E501 80 | 81 | 82 | :return: The status of this MarketInstrumentListResponse. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this MarketInstrumentListResponse. 90 | 91 | 92 | :param status: The status of this MarketInstrumentListResponse. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this MarketInstrumentListResponse. # noqa: E501 103 | 104 | 105 | :return: The payload of this MarketInstrumentListResponse. # noqa: E501 106 | :rtype: MarketInstrumentList 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this MarketInstrumentListResponse. 113 | 114 | 115 | :param payload: The payload of this MarketInstrumentListResponse. # noqa: E501 116 | :type: MarketInstrumentList 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(MarketInstrumentListResponse, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, MarketInstrumentListResponse): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/market_instrument_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.market_instrument import MarketInstrument # noqa: F401,E501 18 | 19 | 20 | class MarketInstrumentResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'MarketInstrument' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Ok', payload=None): # noqa: E501 45 | """MarketInstrumentResponse - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this MarketInstrumentResponse. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this MarketInstrumentResponse. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this MarketInstrumentResponse. 67 | 68 | 69 | :param tracking_id: The tracking_id of this MarketInstrumentResponse. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this MarketInstrumentResponse. # noqa: E501 80 | 81 | 82 | :return: The status of this MarketInstrumentResponse. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this MarketInstrumentResponse. 90 | 91 | 92 | :param status: The status of this MarketInstrumentResponse. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this MarketInstrumentResponse. # noqa: E501 103 | 104 | 105 | :return: The payload of this MarketInstrumentResponse. # noqa: E501 106 | :rtype: MarketInstrument 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this MarketInstrumentResponse. 113 | 114 | 115 | :param payload: The payload of this MarketInstrumentResponse. # noqa: E501 116 | :type: MarketInstrument 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(MarketInstrumentResponse, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, MarketInstrumentResponse): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/money_amount.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.currency import Currency # noqa: F401,E501 18 | 19 | 20 | class MoneyAmount(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'currency': 'Currency', 34 | 'value': 'float' 35 | } 36 | 37 | attribute_map = { 38 | 'currency': 'currency', 39 | 'value': 'value' 40 | } 41 | 42 | def __init__(self, currency=None, value=None): # noqa: E501 43 | """MoneyAmount - a model defined in Swagger""" # noqa: E501 44 | self._currency = None 45 | self._value = None 46 | self.discriminator = None 47 | self.currency = currency 48 | self.value = value 49 | 50 | @property 51 | def currency(self): 52 | """Gets the currency of this MoneyAmount. # noqa: E501 53 | 54 | 55 | :return: The currency of this MoneyAmount. # noqa: E501 56 | :rtype: Currency 57 | """ 58 | return self._currency 59 | 60 | @currency.setter 61 | def currency(self, currency): 62 | """Sets the currency of this MoneyAmount. 63 | 64 | 65 | :param currency: The currency of this MoneyAmount. # noqa: E501 66 | :type: Currency 67 | """ 68 | if currency is None: 69 | raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 70 | 71 | self._currency = currency 72 | 73 | @property 74 | def value(self): 75 | """Gets the value of this MoneyAmount. # noqa: E501 76 | 77 | 78 | :return: The value of this MoneyAmount. # noqa: E501 79 | :rtype: float 80 | """ 81 | return self._value 82 | 83 | @value.setter 84 | def value(self, value): 85 | """Sets the value of this MoneyAmount. 86 | 87 | 88 | :param value: The value of this MoneyAmount. # noqa: E501 89 | :type: float 90 | """ 91 | if value is None: 92 | raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 93 | 94 | self._value = value 95 | 96 | def to_dict(self): 97 | """Returns the model properties as a dict""" 98 | result = {} 99 | 100 | for attr, _ in six.iteritems(self.swagger_types): 101 | value = getattr(self, attr) 102 | if isinstance(value, list): 103 | result[attr] = list(map( 104 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 105 | value 106 | )) 107 | elif hasattr(value, "to_dict"): 108 | result[attr] = value.to_dict() 109 | elif isinstance(value, dict): 110 | result[attr] = dict(map( 111 | lambda item: (item[0], item[1].to_dict()) 112 | if hasattr(item[1], "to_dict") else item, 113 | value.items() 114 | )) 115 | else: 116 | result[attr] = value 117 | if issubclass(MoneyAmount, dict): 118 | for key, value in self.items(): 119 | result[key] = value 120 | 121 | return result 122 | 123 | def to_str(self): 124 | """Returns the string representation of the model""" 125 | return pprint.pformat(self.to_dict()) 126 | 127 | def __repr__(self): 128 | """For `print` and `pprint`""" 129 | return self.to_str() 130 | 131 | def __eq__(self, other): 132 | """Returns true if both objects are equal""" 133 | if not isinstance(other, MoneyAmount): 134 | return False 135 | 136 | return self.__dict__ == other.__dict__ 137 | 138 | def __ne__(self, other): 139 | """Returns true if both objects are not equal""" 140 | return not self == other 141 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/operation_interval.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class OperationInterval(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | _1DAY = "1day" 29 | _7DAYS = "7days" 30 | _14DAYS = "14days" 31 | _30DAYS = "30days" 32 | """ 33 | Attributes: 34 | swagger_types (dict): The key is attribute name 35 | and the value is attribute type. 36 | attribute_map (dict): The key is attribute name 37 | and the value is json key in definition. 38 | """ 39 | swagger_types = { 40 | } 41 | 42 | attribute_map = { 43 | } 44 | 45 | def __init__(self): # noqa: E501 46 | """OperationInterval - a model defined in Swagger""" # noqa: E501 47 | self.discriminator = None 48 | 49 | def to_dict(self): 50 | """Returns the model properties as a dict""" 51 | result = {} 52 | 53 | for attr, _ in six.iteritems(self.swagger_types): 54 | value = getattr(self, attr) 55 | if isinstance(value, list): 56 | result[attr] = list(map( 57 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 58 | value 59 | )) 60 | elif hasattr(value, "to_dict"): 61 | result[attr] = value.to_dict() 62 | elif isinstance(value, dict): 63 | result[attr] = dict(map( 64 | lambda item: (item[0], item[1].to_dict()) 65 | if hasattr(item[1], "to_dict") else item, 66 | value.items() 67 | )) 68 | else: 69 | result[attr] = value 70 | if issubclass(OperationInterval, dict): 71 | for key, value in self.items(): 72 | result[key] = value 73 | 74 | return result 75 | 76 | def to_str(self): 77 | """Returns the string representation of the model""" 78 | return pprint.pformat(self.to_dict()) 79 | 80 | def __repr__(self): 81 | """For `print` and `pprint`""" 82 | return self.to_str() 83 | 84 | def __eq__(self, other): 85 | """Returns true if both objects are equal""" 86 | if not isinstance(other, OperationInterval): 87 | return False 88 | 89 | return self.__dict__ == other.__dict__ 90 | 91 | def __ne__(self, other): 92 | """Returns true if both objects are not equal""" 93 | return not self == other 94 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/operation_status.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class OperationStatus(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | DONE = "Done" 29 | DECLINE = "Decline" 30 | PROGRESS = "Progress" 31 | """ 32 | Attributes: 33 | swagger_types (dict): The key is attribute name 34 | and the value is attribute type. 35 | attribute_map (dict): The key is attribute name 36 | and the value is json key in definition. 37 | """ 38 | swagger_types = { 39 | } 40 | 41 | attribute_map = { 42 | } 43 | 44 | def __init__(self): # noqa: E501 45 | """OperationStatus - a model defined in Swagger""" # noqa: E501 46 | self.discriminator = None 47 | 48 | def to_dict(self): 49 | """Returns the model properties as a dict""" 50 | result = {} 51 | 52 | for attr, _ in six.iteritems(self.swagger_types): 53 | value = getattr(self, attr) 54 | if isinstance(value, list): 55 | result[attr] = list(map( 56 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 57 | value 58 | )) 59 | elif hasattr(value, "to_dict"): 60 | result[attr] = value.to_dict() 61 | elif isinstance(value, dict): 62 | result[attr] = dict(map( 63 | lambda item: (item[0], item[1].to_dict()) 64 | if hasattr(item[1], "to_dict") else item, 65 | value.items() 66 | )) 67 | else: 68 | result[attr] = value 69 | if issubclass(OperationStatus, dict): 70 | for key, value in self.items(): 71 | result[key] = value 72 | 73 | return result 74 | 75 | def to_str(self): 76 | """Returns the string representation of the model""" 77 | return pprint.pformat(self.to_dict()) 78 | 79 | def __repr__(self): 80 | """For `print` and `pprint`""" 81 | return self.to_str() 82 | 83 | def __eq__(self, other): 84 | """Returns true if both objects are equal""" 85 | if not isinstance(other, OperationStatus): 86 | return False 87 | 88 | return self.__dict__ == other.__dict__ 89 | 90 | def __ne__(self, other): 91 | """Returns true if both objects are not equal""" 92 | return not self == other 93 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/operation_trade.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class OperationTrade(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | """ 25 | Attributes: 26 | swagger_types (dict): The key is attribute name 27 | and the value is attribute type. 28 | attribute_map (dict): The key is attribute name 29 | and the value is json key in definition. 30 | """ 31 | swagger_types = { 32 | 'trade_id': 'str', 33 | '_date': 'datetime', 34 | 'price': 'float', 35 | 'quantity': 'int' 36 | } 37 | 38 | attribute_map = { 39 | 'trade_id': 'tradeId', 40 | '_date': 'date', 41 | 'price': 'price', 42 | 'quantity': 'quantity' 43 | } 44 | 45 | def __init__(self, trade_id=None, _date=None, price=None, quantity=None): # noqa: E501 46 | """OperationTrade - a model defined in Swagger""" # noqa: E501 47 | self._trade_id = None 48 | self.__date = None 49 | self._price = None 50 | self._quantity = None 51 | self.discriminator = None 52 | self.trade_id = trade_id 53 | self._date = _date 54 | self.price = price 55 | self.quantity = quantity 56 | 57 | @property 58 | def trade_id(self): 59 | """Gets the trade_id of this OperationTrade. # noqa: E501 60 | 61 | 62 | :return: The trade_id of this OperationTrade. # noqa: E501 63 | :rtype: str 64 | """ 65 | return self._trade_id 66 | 67 | @trade_id.setter 68 | def trade_id(self, trade_id): 69 | """Sets the trade_id of this OperationTrade. 70 | 71 | 72 | :param trade_id: The trade_id of this OperationTrade. # noqa: E501 73 | :type: str 74 | """ 75 | if trade_id is None: 76 | raise ValueError("Invalid value for `trade_id`, must not be `None`") # noqa: E501 77 | 78 | self._trade_id = trade_id 79 | 80 | @property 81 | def _date(self): 82 | """Gets the _date of this OperationTrade. # noqa: E501 83 | 84 | ISO8601 # noqa: E501 85 | 86 | :return: The _date of this OperationTrade. # noqa: E501 87 | :rtype: datetime 88 | """ 89 | return self.__date 90 | 91 | @_date.setter 92 | def _date(self, _date): 93 | """Sets the _date of this OperationTrade. 94 | 95 | ISO8601 # noqa: E501 96 | 97 | :param _date: The _date of this OperationTrade. # noqa: E501 98 | :type: datetime 99 | """ 100 | if _date is None: 101 | raise ValueError("Invalid value for `_date`, must not be `None`") # noqa: E501 102 | 103 | self.__date = _date 104 | 105 | @property 106 | def price(self): 107 | """Gets the price of this OperationTrade. # noqa: E501 108 | 109 | 110 | :return: The price of this OperationTrade. # noqa: E501 111 | :rtype: float 112 | """ 113 | return self._price 114 | 115 | @price.setter 116 | def price(self, price): 117 | """Sets the price of this OperationTrade. 118 | 119 | 120 | :param price: The price of this OperationTrade. # noqa: E501 121 | :type: float 122 | """ 123 | if price is None: 124 | raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 125 | 126 | self._price = price 127 | 128 | @property 129 | def quantity(self): 130 | """Gets the quantity of this OperationTrade. # noqa: E501 131 | 132 | 133 | :return: The quantity of this OperationTrade. # noqa: E501 134 | :rtype: int 135 | """ 136 | return self._quantity 137 | 138 | @quantity.setter 139 | def quantity(self, quantity): 140 | """Sets the quantity of this OperationTrade. 141 | 142 | 143 | :param quantity: The quantity of this OperationTrade. # noqa: E501 144 | :type: int 145 | """ 146 | if quantity is None: 147 | raise ValueError("Invalid value for `quantity`, must not be `None`") # noqa: E501 148 | 149 | self._quantity = quantity 150 | 151 | def to_dict(self): 152 | """Returns the model properties as a dict""" 153 | result = {} 154 | 155 | for attr, _ in six.iteritems(self.swagger_types): 156 | value = getattr(self, attr) 157 | if isinstance(value, list): 158 | result[attr] = list(map( 159 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 160 | value 161 | )) 162 | elif hasattr(value, "to_dict"): 163 | result[attr] = value.to_dict() 164 | elif isinstance(value, dict): 165 | result[attr] = dict(map( 166 | lambda item: (item[0], item[1].to_dict()) 167 | if hasattr(item[1], "to_dict") else item, 168 | value.items() 169 | )) 170 | else: 171 | result[attr] = value 172 | if issubclass(OperationTrade, dict): 173 | for key, value in self.items(): 174 | result[key] = value 175 | 176 | return result 177 | 178 | def to_str(self): 179 | """Returns the string representation of the model""" 180 | return pprint.pformat(self.to_dict()) 181 | 182 | def __repr__(self): 183 | """For `print` and `pprint`""" 184 | return self.to_str() 185 | 186 | def __eq__(self, other): 187 | """Returns true if both objects are equal""" 188 | if not isinstance(other, OperationTrade): 189 | return False 190 | 191 | return self.__dict__ == other.__dict__ 192 | 193 | def __ne__(self, other): 194 | """Returns true if both objects are not equal""" 195 | return not self == other 196 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/operation_type.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class OperationType(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | BUY = "Buy" 29 | SELL = "Sell" 30 | """ 31 | Attributes: 32 | swagger_types (dict): The key is attribute name 33 | and the value is attribute type. 34 | attribute_map (dict): The key is attribute name 35 | and the value is json key in definition. 36 | """ 37 | swagger_types = { 38 | } 39 | 40 | attribute_map = { 41 | } 42 | 43 | def __init__(self): # noqa: E501 44 | """OperationType - a model defined in Swagger""" # noqa: E501 45 | self.discriminator = None 46 | 47 | def to_dict(self): 48 | """Returns the model properties as a dict""" 49 | result = {} 50 | 51 | for attr, _ in six.iteritems(self.swagger_types): 52 | value = getattr(self, attr) 53 | if isinstance(value, list): 54 | result[attr] = list(map( 55 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 56 | value 57 | )) 58 | elif hasattr(value, "to_dict"): 59 | result[attr] = value.to_dict() 60 | elif isinstance(value, dict): 61 | result[attr] = dict(map( 62 | lambda item: (item[0], item[1].to_dict()) 63 | if hasattr(item[1], "to_dict") else item, 64 | value.items() 65 | )) 66 | else: 67 | result[attr] = value 68 | if issubclass(OperationType, dict): 69 | for key, value in self.items(): 70 | result[key] = value 71 | 72 | return result 73 | 74 | def to_str(self): 75 | """Returns the string representation of the model""" 76 | return pprint.pformat(self.to_dict()) 77 | 78 | def __repr__(self): 79 | """For `print` and `pprint`""" 80 | return self.to_str() 81 | 82 | def __eq__(self, other): 83 | """Returns true if both objects are equal""" 84 | if not isinstance(other, OperationType): 85 | return False 86 | 87 | return self.__dict__ == other.__dict__ 88 | 89 | def __ne__(self, other): 90 | """Returns true if both objects are not equal""" 91 | return not self == other 92 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/operation_type_with_commission.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class OperationTypeWithCommission(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | BUY = "Buy" 29 | SELL = "Sell" 30 | BROKERCOMMISSION = "BrokerCommission" 31 | EXCHANGECOMMISSION = "ExchangeCommission" 32 | SERVICECOMMISSION = "ServiceCommission" 33 | MARGINCOMMISSION = "MarginCommission" 34 | """ 35 | Attributes: 36 | swagger_types (dict): The key is attribute name 37 | and the value is attribute type. 38 | attribute_map (dict): The key is attribute name 39 | and the value is json key in definition. 40 | """ 41 | swagger_types = { 42 | } 43 | 44 | attribute_map = { 45 | } 46 | 47 | def __init__(self): # noqa: E501 48 | """OperationTypeWithCommission - a model defined in Swagger""" # noqa: E501 49 | self.discriminator = None 50 | 51 | def to_dict(self): 52 | """Returns the model properties as a dict""" 53 | result = {} 54 | 55 | for attr, _ in six.iteritems(self.swagger_types): 56 | value = getattr(self, attr) 57 | if isinstance(value, list): 58 | result[attr] = list(map( 59 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 60 | value 61 | )) 62 | elif hasattr(value, "to_dict"): 63 | result[attr] = value.to_dict() 64 | elif isinstance(value, dict): 65 | result[attr] = dict(map( 66 | lambda item: (item[0], item[1].to_dict()) 67 | if hasattr(item[1], "to_dict") else item, 68 | value.items() 69 | )) 70 | else: 71 | result[attr] = value 72 | if issubclass(OperationTypeWithCommission, dict): 73 | for key, value in self.items(): 74 | result[key] = value 75 | 76 | return result 77 | 78 | def to_str(self): 79 | """Returns the string representation of the model""" 80 | return pprint.pformat(self.to_dict()) 81 | 82 | def __repr__(self): 83 | """For `print` and `pprint`""" 84 | return self.to_str() 85 | 86 | def __eq__(self, other): 87 | """Returns true if both objects are equal""" 88 | if not isinstance(other, OperationTypeWithCommission): 89 | return False 90 | 91 | return self.__dict__ == other.__dict__ 92 | 93 | def __ne__(self, other): 94 | """Returns true if both objects are not equal""" 95 | return not self == other 96 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/operations.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.operation import Operation # noqa: F401,E501 18 | 19 | 20 | class Operations(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'operations': 'list[Operation]' 34 | } 35 | 36 | attribute_map = { 37 | 'operations': 'operations' 38 | } 39 | 40 | def __init__(self, operations=None): # noqa: E501 41 | """Operations - a model defined in Swagger""" # noqa: E501 42 | self._operations = None 43 | self.discriminator = None 44 | self.operations = operations 45 | 46 | @property 47 | def operations(self): 48 | """Gets the operations of this Operations. # noqa: E501 49 | 50 | 51 | :return: The operations of this Operations. # noqa: E501 52 | :rtype: list[Operation] 53 | """ 54 | return self._operations 55 | 56 | @operations.setter 57 | def operations(self, operations): 58 | """Sets the operations of this Operations. 59 | 60 | 61 | :param operations: The operations of this Operations. # noqa: E501 62 | :type: list[Operation] 63 | """ 64 | if operations is None: 65 | raise ValueError("Invalid value for `operations`, must not be `None`") # noqa: E501 66 | 67 | self._operations = operations 68 | 69 | def to_dict(self): 70 | """Returns the model properties as a dict""" 71 | result = {} 72 | 73 | for attr, _ in six.iteritems(self.swagger_types): 74 | value = getattr(self, attr) 75 | if isinstance(value, list): 76 | result[attr] = list(map( 77 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 78 | value 79 | )) 80 | elif hasattr(value, "to_dict"): 81 | result[attr] = value.to_dict() 82 | elif isinstance(value, dict): 83 | result[attr] = dict(map( 84 | lambda item: (item[0], item[1].to_dict()) 85 | if hasattr(item[1], "to_dict") else item, 86 | value.items() 87 | )) 88 | else: 89 | result[attr] = value 90 | if issubclass(Operations, dict): 91 | for key, value in self.items(): 92 | result[key] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, Operations): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/operations_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.operations import Operations # noqa: F401,E501 18 | 19 | 20 | class OperationsResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'Operations' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Ok', payload=None): # noqa: E501 45 | """OperationsResponse - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this OperationsResponse. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this OperationsResponse. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this OperationsResponse. 67 | 68 | 69 | :param tracking_id: The tracking_id of this OperationsResponse. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this OperationsResponse. # noqa: E501 80 | 81 | 82 | :return: The status of this OperationsResponse. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this OperationsResponse. 90 | 91 | 92 | :param status: The status of this OperationsResponse. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this OperationsResponse. # noqa: E501 103 | 104 | 105 | :return: The payload of this OperationsResponse. # noqa: E501 106 | :rtype: Operations 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this OperationsResponse. 113 | 114 | 115 | :param payload: The payload of this OperationsResponse. # noqa: E501 116 | :type: Operations 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(OperationsResponse, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, OperationsResponse): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/order_status.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class OrderStatus(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | NEW = "New" 29 | PARTIALLYFILL = "PartiallyFill" 30 | FILL = "Fill" 31 | CANCELLED = "Cancelled" 32 | REPLACED = "Replaced" 33 | PENDINGCANCEL = "PendingCancel" 34 | REJECTED = "Rejected" 35 | PENDINGREPLACE = "PendingReplace" 36 | PENDINGNEW = "PendingNew" 37 | """ 38 | Attributes: 39 | swagger_types (dict): The key is attribute name 40 | and the value is attribute type. 41 | attribute_map (dict): The key is attribute name 42 | and the value is json key in definition. 43 | """ 44 | swagger_types = { 45 | } 46 | 47 | attribute_map = { 48 | } 49 | 50 | def __init__(self): # noqa: E501 51 | """OrderStatus - a model defined in Swagger""" # noqa: E501 52 | self.discriminator = None 53 | 54 | def to_dict(self): 55 | """Returns the model properties as a dict""" 56 | result = {} 57 | 58 | for attr, _ in six.iteritems(self.swagger_types): 59 | value = getattr(self, attr) 60 | if isinstance(value, list): 61 | result[attr] = list(map( 62 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 63 | value 64 | )) 65 | elif hasattr(value, "to_dict"): 66 | result[attr] = value.to_dict() 67 | elif isinstance(value, dict): 68 | result[attr] = dict(map( 69 | lambda item: (item[0], item[1].to_dict()) 70 | if hasattr(item[1], "to_dict") else item, 71 | value.items() 72 | )) 73 | else: 74 | result[attr] = value 75 | if issubclass(OrderStatus, dict): 76 | for key, value in self.items(): 77 | result[key] = value 78 | 79 | return result 80 | 81 | def to_str(self): 82 | """Returns the string representation of the model""" 83 | return pprint.pformat(self.to_dict()) 84 | 85 | def __repr__(self): 86 | """For `print` and `pprint`""" 87 | return self.to_str() 88 | 89 | def __eq__(self, other): 90 | """Returns true if both objects are equal""" 91 | if not isinstance(other, OrderStatus): 92 | return False 93 | 94 | return self.__dict__ == other.__dict__ 95 | 96 | def __ne__(self, other): 97 | """Returns true if both objects are not equal""" 98 | return not self == other 99 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/order_type.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class OrderType(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | LIMIT = "Limit" 29 | MARKET = "Market" 30 | """ 31 | Attributes: 32 | swagger_types (dict): The key is attribute name 33 | and the value is attribute type. 34 | attribute_map (dict): The key is attribute name 35 | and the value is json key in definition. 36 | """ 37 | swagger_types = { 38 | } 39 | 40 | attribute_map = { 41 | } 42 | 43 | def __init__(self): # noqa: E501 44 | """OrderType - a model defined in Swagger""" # noqa: E501 45 | self.discriminator = None 46 | 47 | def to_dict(self): 48 | """Returns the model properties as a dict""" 49 | result = {} 50 | 51 | for attr, _ in six.iteritems(self.swagger_types): 52 | value = getattr(self, attr) 53 | if isinstance(value, list): 54 | result[attr] = list(map( 55 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 56 | value 57 | )) 58 | elif hasattr(value, "to_dict"): 59 | result[attr] = value.to_dict() 60 | elif isinstance(value, dict): 61 | result[attr] = dict(map( 62 | lambda item: (item[0], item[1].to_dict()) 63 | if hasattr(item[1], "to_dict") else item, 64 | value.items() 65 | )) 66 | else: 67 | result[attr] = value 68 | if issubclass(OrderType, dict): 69 | for key, value in self.items(): 70 | result[key] = value 71 | 72 | return result 73 | 74 | def to_str(self): 75 | """Returns the string representation of the model""" 76 | return pprint.pformat(self.to_dict()) 77 | 78 | def __repr__(self): 79 | """For `print` and `pprint`""" 80 | return self.to_str() 81 | 82 | def __eq__(self, other): 83 | """Returns true if both objects are equal""" 84 | if not isinstance(other, OrderType): 85 | return False 86 | 87 | return self.__dict__ == other.__dict__ 88 | 89 | def __ne__(self, other): 90 | """Returns true if both objects are not equal""" 91 | return not self == other 92 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/orders_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.order import Order # noqa: F401,E501 18 | 19 | 20 | class OrdersResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'list[Order]' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Ok', payload=None): # noqa: E501 45 | """OrdersResponse - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this OrdersResponse. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this OrdersResponse. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this OrdersResponse. 67 | 68 | 69 | :param tracking_id: The tracking_id of this OrdersResponse. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this OrdersResponse. # noqa: E501 80 | 81 | 82 | :return: The status of this OrdersResponse. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this OrdersResponse. 90 | 91 | 92 | :param status: The status of this OrdersResponse. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this OrdersResponse. # noqa: E501 103 | 104 | 105 | :return: The payload of this OrdersResponse. # noqa: E501 106 | :rtype: list[Order] 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this OrdersResponse. 113 | 114 | 115 | :param payload: The payload of this OrdersResponse. # noqa: E501 116 | :type: list[Order] 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(OrdersResponse, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, OrdersResponse): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/portfolio.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.portfolio_position import PortfolioPosition # noqa: F401,E501 18 | 19 | 20 | class Portfolio(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'positions': 'list[PortfolioPosition]' 34 | } 35 | 36 | attribute_map = { 37 | 'positions': 'positions' 38 | } 39 | 40 | def __init__(self, positions=None): # noqa: E501 41 | """Portfolio - a model defined in Swagger""" # noqa: E501 42 | self._positions = None 43 | self.discriminator = None 44 | self.positions = positions 45 | 46 | @property 47 | def positions(self): 48 | """Gets the positions of this Portfolio. # noqa: E501 49 | 50 | 51 | :return: The positions of this Portfolio. # noqa: E501 52 | :rtype: list[PortfolioPosition] 53 | """ 54 | return self._positions 55 | 56 | @positions.setter 57 | def positions(self, positions): 58 | """Sets the positions of this Portfolio. 59 | 60 | 61 | :param positions: The positions of this Portfolio. # noqa: E501 62 | :type: list[PortfolioPosition] 63 | """ 64 | if positions is None: 65 | raise ValueError("Invalid value for `positions`, must not be `None`") # noqa: E501 66 | 67 | self._positions = positions 68 | 69 | def to_dict(self): 70 | """Returns the model properties as a dict""" 71 | result = {} 72 | 73 | for attr, _ in six.iteritems(self.swagger_types): 74 | value = getattr(self, attr) 75 | if isinstance(value, list): 76 | result[attr] = list(map( 77 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 78 | value 79 | )) 80 | elif hasattr(value, "to_dict"): 81 | result[attr] = value.to_dict() 82 | elif isinstance(value, dict): 83 | result[attr] = dict(map( 84 | lambda item: (item[0], item[1].to_dict()) 85 | if hasattr(item[1], "to_dict") else item, 86 | value.items() 87 | )) 88 | else: 89 | result[attr] = value 90 | if issubclass(Portfolio, dict): 91 | for key, value in self.items(): 92 | result[key] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, Portfolio): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/portfolio_currencies_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.currencies import Currencies # noqa: F401,E501 18 | 19 | 20 | class PortfolioCurrenciesResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'Currencies' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Ok', payload=None): # noqa: E501 45 | """PortfolioCurrenciesResponse - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this PortfolioCurrenciesResponse. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this PortfolioCurrenciesResponse. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this PortfolioCurrenciesResponse. 67 | 68 | 69 | :param tracking_id: The tracking_id of this PortfolioCurrenciesResponse. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this PortfolioCurrenciesResponse. # noqa: E501 80 | 81 | 82 | :return: The status of this PortfolioCurrenciesResponse. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this PortfolioCurrenciesResponse. 90 | 91 | 92 | :param status: The status of this PortfolioCurrenciesResponse. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this PortfolioCurrenciesResponse. # noqa: E501 103 | 104 | 105 | :return: The payload of this PortfolioCurrenciesResponse. # noqa: E501 106 | :rtype: Currencies 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this PortfolioCurrenciesResponse. 113 | 114 | 115 | :param payload: The payload of this PortfolioCurrenciesResponse. # noqa: E501 116 | :type: Currencies 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(PortfolioCurrenciesResponse, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, PortfolioCurrenciesResponse): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/portfolio_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.portfolio import Portfolio # noqa: F401,E501 18 | 19 | 20 | class PortfolioResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'tracking_id': 'str', 34 | 'status': 'str', 35 | 'payload': 'Portfolio' 36 | } 37 | 38 | attribute_map = { 39 | 'tracking_id': 'trackingId', 40 | 'status': 'status', 41 | 'payload': 'payload' 42 | } 43 | 44 | def __init__(self, tracking_id=None, status='Ok', payload=None): # noqa: E501 45 | """PortfolioResponse - a model defined in Swagger""" # noqa: E501 46 | self._tracking_id = None 47 | self._status = None 48 | self._payload = None 49 | self.discriminator = None 50 | self.tracking_id = tracking_id 51 | self.status = status 52 | self.payload = payload 53 | 54 | @property 55 | def tracking_id(self): 56 | """Gets the tracking_id of this PortfolioResponse. # noqa: E501 57 | 58 | 59 | :return: The tracking_id of this PortfolioResponse. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._tracking_id 63 | 64 | @tracking_id.setter 65 | def tracking_id(self, tracking_id): 66 | """Sets the tracking_id of this PortfolioResponse. 67 | 68 | 69 | :param tracking_id: The tracking_id of this PortfolioResponse. # noqa: E501 70 | :type: str 71 | """ 72 | if tracking_id is None: 73 | raise ValueError("Invalid value for `tracking_id`, must not be `None`") # noqa: E501 74 | 75 | self._tracking_id = tracking_id 76 | 77 | @property 78 | def status(self): 79 | """Gets the status of this PortfolioResponse. # noqa: E501 80 | 81 | 82 | :return: The status of this PortfolioResponse. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._status 86 | 87 | @status.setter 88 | def status(self, status): 89 | """Sets the status of this PortfolioResponse. 90 | 91 | 92 | :param status: The status of this PortfolioResponse. # noqa: E501 93 | :type: str 94 | """ 95 | if status is None: 96 | raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 97 | 98 | self._status = status 99 | 100 | @property 101 | def payload(self): 102 | """Gets the payload of this PortfolioResponse. # noqa: E501 103 | 104 | 105 | :return: The payload of this PortfolioResponse. # noqa: E501 106 | :rtype: Portfolio 107 | """ 108 | return self._payload 109 | 110 | @payload.setter 111 | def payload(self, payload): 112 | """Sets the payload of this PortfolioResponse. 113 | 114 | 115 | :param payload: The payload of this PortfolioResponse. # noqa: E501 116 | :type: Portfolio 117 | """ 118 | if payload is None: 119 | raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 120 | 121 | self._payload = payload 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(PortfolioResponse, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, PortfolioResponse): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/sandbox_currency.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class SandboxCurrency(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | 25 | """ 26 | allowed enum values 27 | """ 28 | RUB = "RUB" 29 | USD = "USD" 30 | EUR = "EUR" 31 | """ 32 | Attributes: 33 | swagger_types (dict): The key is attribute name 34 | and the value is attribute type. 35 | attribute_map (dict): The key is attribute name 36 | and the value is json key in definition. 37 | """ 38 | swagger_types = { 39 | } 40 | 41 | attribute_map = { 42 | } 43 | 44 | def __init__(self): # noqa: E501 45 | """SandboxCurrency - a model defined in Swagger""" # noqa: E501 46 | self.discriminator = None 47 | 48 | def to_dict(self): 49 | """Returns the model properties as a dict""" 50 | result = {} 51 | 52 | for attr, _ in six.iteritems(self.swagger_types): 53 | value = getattr(self, attr) 54 | if isinstance(value, list): 55 | result[attr] = list(map( 56 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 57 | value 58 | )) 59 | elif hasattr(value, "to_dict"): 60 | result[attr] = value.to_dict() 61 | elif isinstance(value, dict): 62 | result[attr] = dict(map( 63 | lambda item: (item[0], item[1].to_dict()) 64 | if hasattr(item[1], "to_dict") else item, 65 | value.items() 66 | )) 67 | else: 68 | result[attr] = value 69 | if issubclass(SandboxCurrency, dict): 70 | for key, value in self.items(): 71 | result[key] = value 72 | 73 | return result 74 | 75 | def to_str(self): 76 | """Returns the string representation of the model""" 77 | return pprint.pformat(self.to_dict()) 78 | 79 | def __repr__(self): 80 | """For `print` and `pprint`""" 81 | return self.to_str() 82 | 83 | def __eq__(self, other): 84 | """Returns true if both objects are equal""" 85 | if not isinstance(other, SandboxCurrency): 86 | return False 87 | 88 | return self.__dict__ == other.__dict__ 89 | 90 | def __ne__(self, other): 91 | """Returns true if both objects are not equal""" 92 | return not self == other 93 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/sandbox_set_currency_balance_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | from tinkoff_api_client.models.sandbox_currency import SandboxCurrency # noqa: F401,E501 18 | 19 | 20 | class SandboxSetCurrencyBalanceRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | """ 26 | Attributes: 27 | swagger_types (dict): The key is attribute name 28 | and the value is attribute type. 29 | attribute_map (dict): The key is attribute name 30 | and the value is json key in definition. 31 | """ 32 | swagger_types = { 33 | 'currency': 'SandboxCurrency', 34 | 'balance': 'float' 35 | } 36 | 37 | attribute_map = { 38 | 'currency': 'currency', 39 | 'balance': 'balance' 40 | } 41 | 42 | def __init__(self, currency=None, balance=None): # noqa: E501 43 | """SandboxSetCurrencyBalanceRequest - a model defined in Swagger""" # noqa: E501 44 | self._currency = None 45 | self._balance = None 46 | self.discriminator = None 47 | self.currency = currency 48 | self.balance = balance 49 | 50 | @property 51 | def currency(self): 52 | """Gets the currency of this SandboxSetCurrencyBalanceRequest. # noqa: E501 53 | 54 | 55 | :return: The currency of this SandboxSetCurrencyBalanceRequest. # noqa: E501 56 | :rtype: SandboxCurrency 57 | """ 58 | return self._currency 59 | 60 | @currency.setter 61 | def currency(self, currency): 62 | """Sets the currency of this SandboxSetCurrencyBalanceRequest. 63 | 64 | 65 | :param currency: The currency of this SandboxSetCurrencyBalanceRequest. # noqa: E501 66 | :type: SandboxCurrency 67 | """ 68 | if currency is None: 69 | raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501 70 | 71 | self._currency = currency 72 | 73 | @property 74 | def balance(self): 75 | """Gets the balance of this SandboxSetCurrencyBalanceRequest. # noqa: E501 76 | 77 | 78 | :return: The balance of this SandboxSetCurrencyBalanceRequest. # noqa: E501 79 | :rtype: float 80 | """ 81 | return self._balance 82 | 83 | @balance.setter 84 | def balance(self, balance): 85 | """Sets the balance of this SandboxSetCurrencyBalanceRequest. 86 | 87 | 88 | :param balance: The balance of this SandboxSetCurrencyBalanceRequest. # noqa: E501 89 | :type: float 90 | """ 91 | if balance is None: 92 | raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 93 | 94 | self._balance = balance 95 | 96 | def to_dict(self): 97 | """Returns the model properties as a dict""" 98 | result = {} 99 | 100 | for attr, _ in six.iteritems(self.swagger_types): 101 | value = getattr(self, attr) 102 | if isinstance(value, list): 103 | result[attr] = list(map( 104 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 105 | value 106 | )) 107 | elif hasattr(value, "to_dict"): 108 | result[attr] = value.to_dict() 109 | elif isinstance(value, dict): 110 | result[attr] = dict(map( 111 | lambda item: (item[0], item[1].to_dict()) 112 | if hasattr(item[1], "to_dict") else item, 113 | value.items() 114 | )) 115 | else: 116 | result[attr] = value 117 | if issubclass(SandboxSetCurrencyBalanceRequest, dict): 118 | for key, value in self.items(): 119 | result[key] = value 120 | 121 | return result 122 | 123 | def to_str(self): 124 | """Returns the string representation of the model""" 125 | return pprint.pformat(self.to_dict()) 126 | 127 | def __repr__(self): 128 | """For `print` and `pprint`""" 129 | return self.to_str() 130 | 131 | def __eq__(self, other): 132 | """Returns true if both objects are equal""" 133 | if not isinstance(other, SandboxSetCurrencyBalanceRequest): 134 | return False 135 | 136 | return self.__dict__ == other.__dict__ 137 | 138 | def __ne__(self, other): 139 | """Returns true if both objects are not equal""" 140 | return not self == other 141 | -------------------------------------------------------------------------------- /tinkoff_api_client/models/sandbox_set_position_balance_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | OpenAPI 5 | 6 | tinkoff.ru/invest OpenAPI. # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | Contact: n.v.melnikov@tinkoff.ru 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | import pprint 14 | import re # noqa: F401 15 | 16 | import six 17 | 18 | 19 | class SandboxSetPositionBalanceRequest(object): 20 | """NOTE: This class is auto generated by the swagger code generator program. 21 | 22 | Do not edit the class manually. 23 | """ 24 | """ 25 | Attributes: 26 | swagger_types (dict): The key is attribute name 27 | and the value is attribute type. 28 | attribute_map (dict): The key is attribute name 29 | and the value is json key in definition. 30 | """ 31 | swagger_types = { 32 | 'figi': 'str', 33 | 'balance': 'float' 34 | } 35 | 36 | attribute_map = { 37 | 'figi': 'figi', 38 | 'balance': 'balance' 39 | } 40 | 41 | def __init__(self, figi=None, balance=None): # noqa: E501 42 | """SandboxSetPositionBalanceRequest - a model defined in Swagger""" # noqa: E501 43 | self._figi = None 44 | self._balance = None 45 | self.discriminator = None 46 | if figi is not None: 47 | self.figi = figi 48 | self.balance = balance 49 | 50 | @property 51 | def figi(self): 52 | """Gets the figi of this SandboxSetPositionBalanceRequest. # noqa: E501 53 | 54 | 55 | :return: The figi of this SandboxSetPositionBalanceRequest. # noqa: E501 56 | :rtype: str 57 | """ 58 | return self._figi 59 | 60 | @figi.setter 61 | def figi(self, figi): 62 | """Sets the figi of this SandboxSetPositionBalanceRequest. 63 | 64 | 65 | :param figi: The figi of this SandboxSetPositionBalanceRequest. # noqa: E501 66 | :type: str 67 | """ 68 | 69 | self._figi = figi 70 | 71 | @property 72 | def balance(self): 73 | """Gets the balance of this SandboxSetPositionBalanceRequest. # noqa: E501 74 | 75 | 76 | :return: The balance of this SandboxSetPositionBalanceRequest. # noqa: E501 77 | :rtype: float 78 | """ 79 | return self._balance 80 | 81 | @balance.setter 82 | def balance(self, balance): 83 | """Sets the balance of this SandboxSetPositionBalanceRequest. 84 | 85 | 86 | :param balance: The balance of this SandboxSetPositionBalanceRequest. # noqa: E501 87 | :type: float 88 | """ 89 | if balance is None: 90 | raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 91 | 92 | self._balance = balance 93 | 94 | def to_dict(self): 95 | """Returns the model properties as a dict""" 96 | result = {} 97 | 98 | for attr, _ in six.iteritems(self.swagger_types): 99 | value = getattr(self, attr) 100 | if isinstance(value, list): 101 | result[attr] = list(map( 102 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 103 | value 104 | )) 105 | elif hasattr(value, "to_dict"): 106 | result[attr] = value.to_dict() 107 | elif isinstance(value, dict): 108 | result[attr] = dict(map( 109 | lambda item: (item[0], item[1].to_dict()) 110 | if hasattr(item[1], "to_dict") else item, 111 | value.items() 112 | )) 113 | else: 114 | result[attr] = value 115 | if issubclass(SandboxSetPositionBalanceRequest, dict): 116 | for key, value in self.items(): 117 | result[key] = value 118 | 119 | return result 120 | 121 | def to_str(self): 122 | """Returns the string representation of the model""" 123 | return pprint.pformat(self.to_dict()) 124 | 125 | def __repr__(self): 126 | """For `print` and `pprint`""" 127 | return self.to_str() 128 | 129 | def __eq__(self, other): 130 | """Returns true if both objects are equal""" 131 | if not isinstance(other, SandboxSetPositionBalanceRequest): 132 | return False 133 | 134 | return self.__dict__ == other.__dict__ 135 | 136 | def __ne__(self, other): 137 | """Returns true if both objects are not equal""" 138 | return not self == other 139 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py27, py3 3 | 4 | [testenv] 5 | deps=-r{toxinidir}/requirements.txt 6 | -r{toxinidir}/test-requirements.txt 7 | 8 | commands= 9 | nosetests \ 10 | [] 11 | --------------------------------------------------------------------------------