order

class whispertrades.order.Fill(*, leg_number: int, quantity: int, price: float, filled_at: datetime, bid: float, mid: float, ask: float)[source]

Bases: BaseModel

ask : float
bid : float
filled_at : datetime
leg_number : int
mid : float
price : float
quantity : int
class whispertrades.order.Leg(*, number: int, type: 'CALL' | 'PUT', instrument: str, expiration_date: datetime, strike_price: float, instruction: 'SELL_TO_OPEN' | 'BUY_TO_OPEN' | 'BUY_TO_CLOSE' | 'SELL_TO_CLOSE', quantity: int, bid: float, mid: float, ask: float)[source]

Bases: BaseModel

ask : float
bid : float
expiration_date : datetime
instruction : Literal['SELL_TO_OPEN', 'BUY_TO_OPEN', 'BUY_TO_CLOSE', 'SELL_TO_CLOSE']
instrument : str
mid : float
number : int
quantity : int
strike_price : float
type : Literal['CALL', 'PUT']
class whispertrades.order.Order(data: OrderResponse, client: WTClient, auto_refresh: bool)[source]

Bases: object

auto_refresh : bool

auto_refresh toggle inherited from WTClient

bot : Bot

Bot object

broker_fee : float | None

Broker fee

broker_order_number : str

Broker order number

canceled_at : datetime | None

Canceled at

client : WTClient

the WTClient object that created this instance

current_quantity : int

Current quantity of the order

duration : Literal['GTC', 'DAY']

Order duration

fill_price : float | None

Fill price

filled_at : datetime | None

Filled at

filled_quantity : int

Filled quantity of the order

fills : List[Fill | None]

Fills of the order

is_paper : bool

If this is a paper order

legs : List[Leg]

Legs of the order

number : str

Order number

order_price : float

Order price

original_quantity : int

Original quantity of the order

status : Literal['WORKING', 'FILLED', 'CANCELED', 'EXPIRED', 'REJECTED']

Order status

submissions : List[Submission | None]

Submissions of the order

submitted_at : datetime

Submitted at

symbol : str

Symbol of the order

type : Literal['OPENING', 'CLOSING']

Order type

class whispertrades.order.OrderResponse(*, number: str, broker_order_number: str, status: 'WORKING' | 'FILLED' | 'CANCELED' | 'EXPIRED' | 'REJECTED', type: 'OPENING' | 'CLOSING', duration: 'GTC' | 'DAY', bot: BasicBot, is_paper: bool, symbol: str, original_quantity: int, current_quantity: int, filled_quantity: int, order_price: float, fill_price: float | None, broker_fee: float | None, submitted_at: datetime, filled_at: datetime | None, canceled_at: datetime | None, legs: list[Leg], submissions: list[Submission | None], fills: list[Fill | None])[source]

Bases: BaseModel

bot : BasicBot
broker_fee : float | None
broker_order_number : str
canceled_at : datetime | None
current_quantity : int
duration : Literal['GTC', 'DAY']
fill_price : float | None
filled_at : datetime | None
filled_quantity : int
fills : list[Fill | None]
is_paper : bool
legs : list[Leg]
number : str
order_price : float
original_quantity : int
status : Literal['WORKING', 'FILLED', 'CANCELED', 'EXPIRED', 'REJECTED']
submissions : list[Submission | None]
submitted_at : datetime
symbol : str
type : Literal['OPENING', 'CLOSING']
class whispertrades.order.Submission(*, quantity: int | None, price: float, bid: float | None, mid: float | None, ask: float | None, submitted_at: datetime)[source]

Bases: BaseModel

ask : float | None
bid : float | None
mid : float | None
price : float
quantity : int | None
submitted_at : datetime