Interface OrderEngineOptions

interface OrderEngineOptions {
    armed?: boolean;
    constraints: OrderConstraints;
    feed: OrderFeed;
    gate?: GateFn;
    idGen?: () => string;
    maxSettledOrders?: number;
    minModifyIntervalMs?: number;
    mode?: TradeMode;
    now?: () => number;
    onValidationError?: (reason: string) => void;
}

Properties

armed?: boolean

Armed = fire immediately; otherwise the gate must approve each order.

constraints: OrderConstraints
feed: OrderFeed
gate?: GateFn
idGen?: () => string
maxSettledOrders?: number

How many settled orders stay readable before the oldest are dropped. A trading session is a long-lived page and the per-order maps used to grow for its whole life. 0 drops each order the moment it settles.

minModifyIntervalMs?: number
mode?: TradeMode
now?: () => number
onValidationError?: (reason: string) => void

Called when a drag-modify price fails validation (so the UI can snap back).