An order read from the book.

Identical to Order except that status may be unknown: a broker status this adapter cannot map is reported as unknown rather than asserted to be working. Unknown is not terminal, so a later snapshot can still rescue the row, and every consumer that gates on status === 'working' treats it as untradable, which is the point.

The member is widened here rather than in OrderStatus because widening the shared union is a change to src/trade/types.ts, deferred to the v2 contract work that owns that file.

interface DecodedOrder {
    filledQty: number;
    id: string;
    parentId?: string;
    price: number;
    qty: number;
    rawStatus?: string;
    role?: OrderRole;
    side: OrderSide;
    status: "unknown" | OrderStatus;
    symbol: string;
    triggerPrice?: number;
    type: OrderType;
}

Hierarchy

  • Omit<Order, "status">
    • DecodedOrder

Properties

filledQty: number
id: string
parentId?: string

Links SL/TP child orders to their position/entry.

price: number
qty: number
rawStatus?: string

The broker's own status text, kept verbatim whenever status is unknown.

role?: OrderRole
side: OrderSide
status: "unknown" | OrderStatus
symbol: string
triggerPrice?: number
type: OrderType