investfly.models.strategy.OptionLegSpec
@dataclass
class
OptionLegSpec:
Specification for a single leg of an option strategy. See Java OptionLegSpec for the canonical contract; both languages share the same JSON shape.
OptionLegSpec( legId: str, action: investfly.models.portfolio.OptionLegAction, optionRight: investfly.models.marketdata.OptionType | None, quantityRatio: int = 1, linkedToLegId: str | None = None, widthFromLinked: float | None = None, securityType: investfly.models.marketdata.SecurityType = OPTION, contractSelector: investfly.models.strategy.OptionContractSelector | None = None, legRole: investfly.models.portfolio.OptionLegRole | None = None)
optionRight: investfly.models.marketdata.OptionType | None