tbapi.api.interfaces.orders.ipositions
1from __future__ import annotations 2from typing import TYPE_CHECKING 3from tbapi.common.decorators import tb_interface 4from tbapi.common.converters import to_python_datetime, to_net_datetime 5from datetime import datetime 6from Tickblaze.Scripts.Api.Interfaces.Orders import IPositions as _IPositions 7from typing import Any, overload 8from abc import ABC, abstractmethod 9from tbapi.api.interfaces.orders.iposition import IPosition 10 11@tb_interface(_IPositions) 12class IPositions(): 13 """Represents a collection of positions.""" 14 15 @property 16 def count(self) -> int: 17 """Gets the number of positions in the collection.""" 18 val = self._value.Count 19 return val 20 21 22 def __getitem__(self, index: int) -> Any: 23 result = self._value[index] 24 return IPosition(_existing=result)
@tb_interface(_IPositions)
class
IPositions:
17@tb_interface(_IPositions) 18class IPositions(): 19 """Represents a collection of positions.""" 20 21 @property 22 def count(self) -> int: 23 """Gets the number of positions in the collection.""" 24 val = self._value.Count 25 return val 26 27 28 def __getitem__(self, index: int) -> Any: 29 result = self._value[index] 30 return IPosition(_existing=result)
Represents a collection of positions.