Real-time order lifecycle event from the subscribe_orders stream — fills, partial fills, rejections, cancellations, pushed by the broker (or by the sandbox engine in analyze mode).

interface OrderUpdateEvent {
    action: "BUY" | "SELL";
    averagePrice: number;
    exchange: string;
    filledQuantity: number;
    mode: string;
    orderId: string;
    pendingQuantity: number;
    price: number;
    pricetype: string;
    product: string;
    quantity: number;
    rejectionReason: string;
    status: string;
    symbol: string;
    triggerPrice?: number;
}

Properties

action: "BUY" | "SELL"
averagePrice: number
exchange: string
filledQuantity: number
mode: string

'live' for broker events, 'analyze' for sandbox events.

orderId: string
pendingQuantity: number
price: number
pricetype: string
product: string
quantity: number
rejectionReason: string

Broker RMS/OMS text when rejected.

status: string

Lowercase OpenAlgo status: open | trigger pending | complete | rejected | cancelled | ...

symbol: string
triggerPrice?: number

Undefined when the broker reports 0 (plain LIMIT/MARKET).