Interface OrderRejectCloseContract

Terminal rejection of a close: the exit order was definitively refused — the engine force-closes its state with the original closeReason. Always type "active".

interface OrderRejectCloseContract {
    action: "signal-close";
    attempt: number;
    backtest: boolean;
    closeReason: StrategyCloseReason;
    currentPrice: number;
    exchangeName: string;
    frameName: string;
    maxDrawdown: IStrategyPnL;
    message: string;
    originalPriceOpen: number;
    originalPriceStopLoss: number;
    originalPriceTakeProfit: number;
    peakProfit: IStrategyPnL;
    pendingAt: number;
    pnl: IStrategyPnL;
    position: "long" | "short";
    priceOpen: number;
    priceStopLoss: number;
    priceTakeProfit: number;
    scheduledAt: number;
    signal: IPublicSignalRow;
    signalId: string;
    strategyName: string;
    symbol: string;
    timestamp: number;
    totalEntries: number;
    totalPartials: number;
    type: "active" | "schedule";
}

Hierarchy

  • OrderRejectBase
    • OrderRejectCloseContract

Properties

action: "signal-close"

Discriminator for the rejected close

attempt: number

Number of CONSECUTIVE failed gate attempts that preceded this TERMINAL one (0 = rejected on the first attempt).

backtest: boolean

Always false: rejections are live-only (kept for cross-channel filter uniformity)

closeReason: StrategyCloseReason

The closeReason the engine force-closes with

currentPrice: number

Market price at the moment of rejection (VWAP)

exchangeName: string

Exchange name that refused the order

frameName: string

Timeframe name (empty string in live mode)

maxDrawdown: IStrategyPnL

Maximum drawdown experienced during the life of this position so far

message: string

Human-readable rejection reason (the OrderRejectedError message from the broker adapter)

originalPriceOpen: number

Original entry price before any DCA averaging

originalPriceStopLoss: number

Original stop loss price before any trailing adjustments

originalPriceTakeProfit: number

Original take profit price before any trailing adjustments

peakProfit: IStrategyPnL

Peak profit achieved during the life of this position so far

pendingAt: number

Position activation timestamp in milliseconds

PNL snapshot of the position at the moment of this event

position: "long" | "short"

Trade direction: "long" (buy) or "short" (sell)

priceOpen: number

Effective entry price (DCA-averaged when entries exist)

priceStopLoss: number

Effective stop loss price (trailing-aware)

priceTakeProfit: number

Effective take profit price (trailing-aware)

scheduledAt: number

Signal creation timestamp in milliseconds

Complete public signal row at the moment of this event

signalId: string

Unique signal identifier (UUID v4) — equals the adapter's clientOrderId

strategyName: string

Strategy name that generated this signal

symbol: string

Trading pair symbol (e.g., "BTCUSDT")

timestamp: number

Timestamp from execution context at the moment the gate rejected

totalEntries: number

Total number of DCA entries (_entry.length); 1 = no averaging

totalPartials: number

Total number of partial closes executed (_partial.length)

type: "active" | "schedule"

Which order was rejected:

  • "active" — the position order (immediate open, activation fill, close);
  • "schedule" — the resting entry order being PLACED at scheduled-signal creation (action "signal-open" only).