コード例 #1
0
    def __init__(self, order_id=None, operation=None, status=None, reject_reason=None, message=None, requested_lots=None, executed_lots=None, commission=None, local_vars_configuration=None):  # noqa: E501
        """PlacedLimitOrder - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._order_id = None
        self._operation = None
        self._status = None
        self._reject_reason = None
        self._message = None
        self._requested_lots = None
        self._executed_lots = None
        self._commission = None
        self.discriminator = None

        self.order_id = order_id
        self.operation = operation
        self.status = status
        if reject_reason is not None:
            self.reject_reason = reject_reason
        if message is not None:
            self.message = message
        self.requested_lots = requested_lots
        self.executed_lots = executed_lots
        if commission is not None:
            self.commission = commission
コード例 #2
0
    def __init__(self, figi=None, ticker=None, isin=None, min_price_increment=None, lot=None, currency=None, name=None, type=None, local_vars_configuration=None):  # noqa: E501
        """SearchMarketInstrument - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._figi = None
        self._ticker = None
        self._isin = None
        self._min_price_increment = None
        self._lot = None
        self._currency = None
        self._name = None
        self._type = None
        self.discriminator = None

        self.figi = figi
        self.ticker = ticker
        if isin is not None:
            self.isin = isin
        if min_price_increment is not None:
            self.min_price_increment = min_price_increment
        self.lot = lot
        if currency is not None:
            self.currency = currency
        self.name = name
        self.type = type
コード例 #3
0
    def __init__(self,
                 figi=None,
                 interval=None,
                 o=None,
                 c=None,
                 h=None,
                 l=None,
                 v=None,
                 time=None,
                 local_vars_configuration=None):  # noqa: E501
        """Candle - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._figi = None
        self._interval = None
        self._o = None
        self._c = None
        self._h = None
        self._l = None
        self._v = None
        self._time = None
        self.discriminator = None

        self.figi = figi
        self.interval = interval
        self.o = o
        self.c = c
        self.h = h
        self.l = l
        self.v = v
        self.time = time
コード例 #4
0
    def __init__(self, operations=None, local_vars_configuration=None):  # noqa: E501
        """Operations - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._operations = None
        self.discriminator = None

        self.operations = operations
コード例 #5
0
    def __init__(self,
                 id=None,
                 status=None,
                 trades=None,
                 commission=None,
                 currency=None,
                 payment=None,
                 price=None,
                 quantity=None,
                 figi=None,
                 instrument_type=None,
                 is_margin_call=None,
                 date=None,
                 operation_type=None,
                 local_vars_configuration=None):  # noqa: E501
        """Operation - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._status = None
        self._trades = None
        self._commission = None
        self._currency = None
        self._payment = None
        self._price = None
        self._quantity = None
        self._figi = None
        self._instrument_type = None
        self._is_margin_call = None
        self._date = None
        self._operation_type = None
        self.discriminator = None

        self.id = id
        self.status = status
        if trades is not None:
            self.trades = trades
        if commission is not None:
            self.commission = commission
        self.currency = currency
        self.payment = payment
        if price is not None:
            self.price = price
        if quantity is not None:
            self.quantity = quantity
        if figi is not None:
            self.figi = figi
        if instrument_type is not None:
            self.instrument_type = instrument_type
        self.is_margin_call = is_margin_call
        self.date = date
        if operation_type is not None:
            self.operation_type = operation_type
コード例 #6
0
    def __init__(self,
                 accounts=None,
                 local_vars_configuration=None):  # noqa: E501
        """UserAccounts - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._accounts = None
        self.discriminator = None

        self.accounts = accounts
コード例 #7
0
    def __init__(self,
                 positions=None,
                 local_vars_configuration=None):  # noqa: E501
        """Portfolio - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._positions = None
        self.discriminator = None

        self.positions = positions
コード例 #8
0
    def __init__(self, currency=None, value=None, local_vars_configuration=None):  # noqa: E501
        """MoneyAmount - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._currency = None
        self._value = None
        self.discriminator = None

        self.currency = currency
        self.value = value
コード例 #9
0
    def __init__(self,
                 currencies=None,
                 local_vars_configuration=None):  # noqa: E501
        """Currencies - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._currencies = None
        self.discriminator = None

        self.currencies = currencies
コード例 #10
0
    def __init__(self,
                 broker_account_type=None,
                 local_vars_configuration=None):  # noqa: E501
        """SandboxRegisterRequest - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._broker_account_type = None
        self.discriminator = None

        if broker_account_type is not None:
            self.broker_account_type = broker_account_type
コード例 #11
0
    def __init__(self, tracking_id=None, status='Ok', payload=None, local_vars_configuration=None):  # noqa: E501
        """LimitOrderResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._tracking_id = None
        self._status = None
        self._payload = None
        self.discriminator = None

        self.tracking_id = tracking_id
        self.status = status
        self.payload = payload
コード例 #12
0
    def __init__(self,
                 total=None,
                 instruments=None,
                 local_vars_configuration=None):  # noqa: E501
        """MarketInstrumentList - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._total = None
        self._instruments = None
        self.discriminator = None

        self.total = total
        self.instruments = instruments
コード例 #13
0
    def __init__(self,
                 price=None,
                 quantity=None,
                 local_vars_configuration=None):  # noqa: E501
        """OrderResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._price = None
        self._quantity = None
        self.discriminator = None

        self.price = price
        self.quantity = quantity
コード例 #14
0
    def __init__(self,
                 currency=None,
                 balance=None,
                 local_vars_configuration=None):  # noqa: E501
        """SandboxSetCurrencyBalanceRequest - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._currency = None
        self._balance = None
        self.discriminator = None

        self.currency = currency
        self.balance = balance
コード例 #15
0
    def __init__(self,
                 lots=None,
                 operation=None,
                 local_vars_configuration=None):  # noqa: E501
        """MarketOrderRequest - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._lots = None
        self._operation = None
        self.discriminator = None

        self.lots = lots
        self.operation = operation
コード例 #16
0
    def __init__(self,
                 broker_account_type=None,
                 broker_account_id=None,
                 local_vars_configuration=None):  # noqa: E501
        """UserAccount - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._broker_account_type = None
        self._broker_account_id = None
        self.discriminator = None

        self.broker_account_type = broker_account_type
        self.broker_account_id = broker_account_id
コード例 #17
0
    def __init__(self,
                 figi=None,
                 ticker=None,
                 isin=None,
                 instrument_type=None,
                 balance=None,
                 blocked=None,
                 expected_yield=None,
                 lots=None,
                 average_position_price=None,
                 average_position_price_no_nkd=None,
                 name=None,
                 local_vars_configuration=None):  # noqa: E501
        """PortfolioPosition - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._figi = None
        self._ticker = None
        self._isin = None
        self._instrument_type = None
        self._balance = None
        self._blocked = None
        self._expected_yield = None
        self._lots = None
        self._average_position_price = None
        self._average_position_price_no_nkd = None
        self._name = None
        self.discriminator = None

        self.figi = figi
        if ticker is not None:
            self.ticker = ticker
        if isin is not None:
            self.isin = isin
        self.instrument_type = instrument_type
        self.balance = balance
        if blocked is not None:
            self.blocked = blocked
        if expected_yield is not None:
            self.expected_yield = expected_yield
        self.lots = lots
        if average_position_price is not None:
            self.average_position_price = average_position_price
        if average_position_price_no_nkd is not None:
            self.average_position_price_no_nkd = average_position_price_no_nkd
        self.name = name
コード例 #18
0
    def __init__(self,
                 figi=None,
                 balance=None,
                 local_vars_configuration=None):  # noqa: E501
        """SandboxSetPositionBalanceRequest - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._figi = None
        self._balance = None
        self.discriminator = None

        if figi is not None:
            self.figi = figi
        self.balance = balance
コード例 #19
0
    def __init__(self,
                 figi=None,
                 depth=None,
                 bids=None,
                 asks=None,
                 trade_status=None,
                 min_price_increment=None,
                 face_value=None,
                 last_price=None,
                 close_price=None,
                 limit_up=None,
                 limit_down=None,
                 local_vars_configuration=None):  # noqa: E501
        """Orderbook - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._figi = None
        self._depth = None
        self._bids = None
        self._asks = None
        self._trade_status = None
        self._min_price_increment = None
        self._face_value = None
        self._last_price = None
        self._close_price = None
        self._limit_up = None
        self._limit_down = None
        self.discriminator = None

        self.figi = figi
        self.depth = depth
        self.bids = bids
        self.asks = asks
        self.trade_status = trade_status
        self.min_price_increment = min_price_increment
        if face_value is not None:
            self.face_value = face_value
        if last_price is not None:
            self.last_price = last_price
        if close_price is not None:
            self.close_price = close_price
        if limit_up is not None:
            self.limit_up = limit_up
        if limit_down is not None:
            self.limit_down = limit_down
コード例 #20
0
    def __init__(self,
                 message=None,
                 code=None,
                 local_vars_configuration=None):  # noqa: E501
        """ErrorPayload - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._message = None
        self._code = None
        self.discriminator = None

        if message is not None:
            self.message = message
        if code is not None:
            self.code = code
コード例 #21
0
    def __init__(self,
                 configuration=None,
                 header_name=None,
                 header_value=None,
                 cookie=None,
                 pool_threads=1):
        if configuration is None:
            configuration = Configuration()
        self.configuration = configuration
        self.pool_threads = pool_threads

        self.rest_client = rest.RESTClientObject(configuration)
        self.default_headers = {}
        if header_name is not None:
            self.default_headers[header_name] = header_value
        self.cookie = cookie
        # Set default User-Agent.
        self.user_agent = 'OpenAPI-Generator/1.0.0/python'
コード例 #22
0
    def __init__(self,
                 figi=None,
                 interval=None,
                 candles=None,
                 local_vars_configuration=None):  # noqa: E501
        """Candles - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._figi = None
        self._interval = None
        self._candles = None
        self.discriminator = None

        self.figi = figi
        self.interval = interval
        self.candles = candles
コード例 #23
0
    def __init__(self,
                 currency=None,
                 balance=None,
                 blocked=None,
                 local_vars_configuration=None):  # noqa: E501
        """CurrencyPosition - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._currency = None
        self._balance = None
        self._blocked = None
        self.discriminator = None

        self.currency = currency
        self.balance = balance
        if blocked is not None:
            self.blocked = blocked
コード例 #24
0
    def __init__(self,
                 trade_id=None,
                 date=None,
                 price=None,
                 quantity=None,
                 local_vars_configuration=None):  # noqa: E501
        """OperationTrade - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._trade_id = None
        self._date = None
        self._price = None
        self._quantity = None
        self.discriminator = None

        self.trade_id = trade_id
        self.date = date
        self.price = price
        self.quantity = quantity
コード例 #25
0
    def __init__(self, order_id=None, figi=None, operation=None, status=None, requested_lots=None, executed_lots=None, type=None, price=None, local_vars_configuration=None):  # noqa: E501
        """Order - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._order_id = None
        self._figi = None
        self._operation = None
        self._status = None
        self._requested_lots = None
        self._executed_lots = None
        self._type = None
        self._price = None
        self.discriminator = None

        self.order_id = order_id
        self.figi = figi
        self.operation = operation
        self.status = status
        self.requested_lots = requested_lots
        self.executed_lots = executed_lots
        self.type = type
        self.price = price
コード例 #26
0
 def __init__(self, local_vars_configuration=None):  # noqa: E501
     """SandboxCurrency - a model defined in OpenAPI"""  # noqa: E501
     if local_vars_configuration is None:
         local_vars_configuration = Configuration()
     self.local_vars_configuration = local_vars_configuration
     self.discriminator = None
コード例 #27
0
 def __init__(self, local_vars_configuration=None):  # noqa: E501
     """BrokerAccountType - a model defined in OpenAPI"""  # noqa: E501
     if local_vars_configuration is None:
         local_vars_configuration = Configuration()
     self.local_vars_configuration = local_vars_configuration
     self.discriminator = None
コード例 #28
0
def sandbox_api_client(token):
    sandbox_host = 'https://api-invest.tinkoff.ru/openapi/sandbox/'
    conf = Configuration(host=sandbox_host)

    conf.access_token = token
    return SandboxOpenApi(ApiClient(configuration=conf))
コード例 #29
0
def api_client(token):
    host = 'https://api-invest.tinkoff.ru/openapi/'
    conf = Configuration(host=host)
    conf.access_token = token
    return OpenApi(ApiClient(configuration=conf))
コード例 #30
0
 def __init__(self, local_vars_configuration=None):  # noqa: E501
     """OperationTypeWithCommission - a model defined in OpenAPI"""  # noqa: E501
     if local_vars_configuration is None:
         local_vars_configuration = Configuration()
     self.local_vars_configuration = local_vars_configuration
     self.discriminator = None