Skip to content

GoodTilCanceledTimeInForce

QuantConnect.Orders.TimeInForces.GoodTilCanceledTimeInForce

Bases: TimeInForce

Good Til Canceled Time In Force - order does never expires

GOOD_TIL_CANCELED

GOOD_TIL_CANCELED: TimeInForce = ...

Gets a GoodTilCanceledTimeInForce instance

DAY

DAY: TimeInForce = ...

Gets a DayTimeInForce instance

GOOD_TIL_DATE

GOOD_TIL_DATE: Callable[[datetime], TimeInForce]

Gets a GoodTilDateTimeInForce instance

is_fill_valid

is_fill_valid(
    security: Security, order: Order, fill: OrderEvent
) -> bool

Checks if an order fill is valid

Parameters:

Name Type Description Default
security Security

The security matching the order

required
order Order

The order to be checked

required
fill OrderEvent

The order fill to be checked

required

Returns:

Type Description
bool

Returns true if the order fill can be emitted, false otherwise.

is_order_expired

is_order_expired(security: Security, order: Order) -> bool

Checks if an order is expired

Parameters:

Name Type Description Default
security Security

The security matching the order

required
order Order

The order to be checked

required

Returns:

Type Description
bool

Returns true if the order has expired, false otherwise.