GoodTilDateTimeInForce
QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce
GoodTilDateTimeInForce(expiry: Union[datetime, date])
Bases: TimeInForce
Good Til Date Time In Force - order expires and will be cancelled on a fixed date/time
Initializes a new instance of the GoodTilDateTimeInForce class
expiry
expiry: datetime
The date/time on which the order will expire and will be cancelled
GOOD_TIL_DATE
GOOD_TIL_DATE: Callable[[datetime], TimeInForce]
Gets a GoodTilDateTimeInForce instance
get_forex_order_expiry_date_time
get_forex_order_expiry_date_time(order: Order) -> datetime
Returns the expiry date and time (UTC) for a Forex order
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. |