Skip to content

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. None if not filled.

reason : str
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.


See Also

Order

A trading order submitted during the simulation.

RunResult

Result of running a single strategy as part of an experiment.

Trade

A single round-trip trade (open + close of a position).