asynctradier.common.option_contract module

This module defines the OptionContract class, which represents an option contract in a trading system.

class asynctradier.common.option_contract.OptionContract(symbol: str, expiration_date: str, strike: float, option_type: OptionType, order_side: OrderSide, quantity: int)[source]

Bases: object

Represents an option contract in a trading system.

symbol

The symbol of the option contract.

Type:

str

expiration_date

The expiration date of the option contract.

Type:

str

strike

The strike price of the option contract.

Type:

float

option_type

The type of the option contract (e.g., ‘call’, ‘put’).

Type:

str

order_side

The order side of the option contract (e.g., ‘buy’, ‘sell’).

Type:

OrderSide

quantity

The quantity of the option contract.

Type:

int

property option_symbol: str

Returns the option symbol for the contract.

The option symbol is built using the contract’s symbol, expiration date, strike price, and option type.

Returns:

The option symbol.

Return type:

str