investfly.models.strategy.InstrumentSelectionSpec
class
InstrumentSelectionType(builtins.str, enum.Enum):
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
DIRECT =
<InstrumentSelectionType.DIRECT: 'DIRECT'>
FUTURE_CONTRACT =
<InstrumentSelectionType.FUTURE_CONTRACT: 'FUTURE_CONTRACT'>
OPTION_STRUCTURE =
<InstrumentSelectionType.OPTION_STRUCTURE: 'OPTION_STRUCTURE'>
class
InstrumentSelectionSpec:
type: ClassVar[InstrumentSelectionType]
def
validate( self, securityType: Optional[investfly.models.marketdata.SecurityType] = None) -> None:
@staticmethod
def
futureContract( selector: investfly.models.strategy.FutureContractSelector) -> FutureContractSelection:
@staticmethod
def
optionStructure( structure: investfly.models.strategy.OptionStructureSpec) -> OptionStructureSelection:
@staticmethod
def
forAsset( securityType: investfly.models.marketdata.SecurityType) -> InstrumentSelectionSpec:
@staticmethod
def
fromDict( jsonDict: Optional[Dict[str, Any]]) -> Optional[InstrumentSelectionSpec]:
def
validate( self, securityType: Optional[investfly.models.marketdata.SecurityType] = None) -> None:
@staticmethod
def
fromDict( jsonDict: Optional[Dict[str, Any]]) -> Optional[DirectInstrumentSelection]:
Inherited Members
FutureContractSelection( selector: investfly.models.strategy.FutureContractSelector)
type: ClassVar[InstrumentSelectionType] =
<InstrumentSelectionType.FUTURE_CONTRACT: 'FUTURE_CONTRACT'>
def
validate( self, securityType: Optional[investfly.models.marketdata.SecurityType] = None) -> None:
@staticmethod
def
fromDict( jsonDict: Optional[Dict[str, Any]]) -> Optional[FutureContractSelection]:
Inherited Members
OptionStructureSelection( structure: investfly.models.strategy.OptionStructureSpec)
type: ClassVar[InstrumentSelectionType] =
<InstrumentSelectionType.OPTION_STRUCTURE: 'OPTION_STRUCTURE'>
def
validate( self, securityType: Optional[investfly.models.marketdata.SecurityType] = None) -> None:
@staticmethod
def
fromDict( jsonDict: Optional[Dict[str, Any]]) -> Optional[OptionStructureSelection]:
Inherited Members
InstrumentSelection =
typing.Union[DirectInstrumentSelection, FutureContractSelection, OptionStructureSelection]