Interface OrderFillCloseContract

Broker-confirmed close fill: the exit order executed (TP/SL/time/user close). Always type "active".

interface OrderFillCloseContract {
    action: "signal-close";
    attempt: number;
    backtest: boolean;
    closeReason: StrategyCloseReason;
    currentPrice: number;
    exchangeName: string;
    frameName: string;
    maxDrawdown: IStrategyPnL;
    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

  • OrderFillBase
    • OrderFillCloseContract

Properties

action: "signal-close"

Discriminator for the confirmed close

attempt: number

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

backtest: boolean

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

closeReason: StrategyCloseReason

Why the position was closed

currentPrice: number

Market price at the moment of confirmation (VWAP)

exchangeName: string

Exchange name where the order executed

frameName: string

Timeframe name (empty string in live mode)

maxDrawdown: IStrategyPnL

Maximum drawdown experienced during the life of this position so far

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 confirmed

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 confirmed:

  • "active" — the position order: immediate open, activation fill of a resting order, and every close.
  • "schedule" — the resting entry order was PLACED on the exchange when a scheduled signal was created (action "signal-open" only; a placement is not a position fill — filter by type when strict fill semantics matter).