Interface SignalSyncCloseNotification

Signal sync close notification. Emitted when an active pending signal is closed (TP/SL hit, time expired, or user-initiated).

interface SignalSyncCloseNotification {
    backtest: boolean;
    closeReason: string;
    createdAt: number;
    currentPrice: number;
    exchangeName: string;
    id: string;
    originalPriceOpen: number;
    originalPriceStopLoss: number;
    originalPriceTakeProfit: number;
    pendingAt: number;
    pnl: IStrategyPnL;
    pnlCost: number;
    pnlEntries: number;
    pnlPercentage: number;
    pnlPriceClose: number;
    pnlPriceOpen: number;
    position: "long" | "short";
    priceOpen: number;
    priceStopLoss: number;
    priceTakeProfit: number;
    scheduledAt: number;
    signalId: string;
    strategyName: string;
    symbol: string;
    timestamp: number;
    totalEntries: number;
    totalPartials: number;
    type: "signal_sync.close";
}

Properties

backtest: boolean

Whether this notification is from backtest mode (true) or live mode (false)

closeReason: string

Why the signal was closed (take_profit | stop_loss | time_expired | closed)

createdAt: number

Unix timestamp in milliseconds when the notification was created

currentPrice: number

Current market price at close

exchangeName: string

Exchange name where signal was executed

id: string

Unique notification identifier

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

pendingAt: number

Position activation timestamp in milliseconds

Final PNL at signal close

pnlCost: number

Absolute profit/loss in USD

pnlEntries: number

Total invested capital in USD

pnlPercentage: number

Profit/loss as percentage

pnlPriceClose: number

Exit price from PNL calculation

pnlPriceOpen: number

Entry price from PNL calculation

position: "long" | "short"

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

priceOpen: number

Effective entry price at close

priceStopLoss: number

Effective stop loss price at close

priceTakeProfit: number

Effective take profit price at close

scheduledAt: number

Signal creation timestamp in milliseconds

signalId: string

Unique signal identifier (UUID v4)

strategyName: string

Strategy name that generated this signal

symbol: string

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

timestamp: number

Unix timestamp in milliseconds when signal was closed

totalEntries: number

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

totalPartials: number

Total number of partial closes executed (_partial.length). 0 = no partial closes done.

type: "signal_sync.close"

Discriminator for type-safe union