Order
A trading order submitted during the simulation.
Read more in the user guide.
| Attributes |
Unique identifier of the order. Auto-generated if not provided. For
symbol : strOrderType.Cancel orders, the id field identifies the
target order that should be canceled. If an order with the same id
already exists in the order book, the duplicate is rejected.
The ticker symbol this order targets.
quantity : int | float | BaseSizer, default=1
Signed quantity (positive = buy, negative = sell). Fractional values
are accepted only for crypto instruments. When a sizer is
passed, the engine resolves the quantity automatically at order-processing
time using portfolio equity converted to the asset's quote currency and
the asset's price.
order_type : OrderType
The execution semantics (market, limit, stop-loss, etc...). Also accepts
a string of the form PascalCase (
price : float | NoneStopLoss) or snake_case (stop_loss),
case-insensitively.
Primary price for the order. The exact meaning depends on
{#order-- order_type:
Market / Cancel / SettlePosition}
- Market / Cancel / SettlePosition: ignored.imit topLoss topLossLimit
e engine maintains the running extreme internally.
limit_price : float | None
Secondary limit price used by the
StopLossLimit, TakeProfitLimit and
TrailingStopLimit order types. Once the stop component triggers, the order
converts to a limit order resting at this price. Ignored for all other order
types.
|