OrderRecord
dataclass backtide.backtest.OrderRecord
A record of an order as resolved by the engine.
| Attributes |
order : Order
The original order.
timestamp : int
The bar timestamp at which the order was processed (in Unix seconds).
status : str
One of: "filled", "canceled", "rejected" or "pending".
fill_price : float | None
Average fill price.
reason : strNone if not filled.
Human-readable note (rejection / cancellation reason).
commission : float
Commission charged on the fill, in the order's quote currency.
Zero for non-filled orders.
pnl : float | None
Realised profit & loss attributable to this order, in the base currency,
after commission. Populated only on closing fills (sell that flattens /
reduces an existing long, or buy-to-cover).
None for opening fills,
cancellations and rejections.
|