Interface AverageBuyCommitNotification

Average-buy (DCA) commit notification. Emitted when a new averaging entry is added to an open position.

interface AverageBuyCommitNotification {
    backtest: boolean;
    cost: number;
    createdAt: number;
    currentPrice: number;
    effectivePriceOpen: 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: "average_buy.commit";
}

Properties

backtest: boolean

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

cost: number

Cost of this averaging entry in USD

createdAt: number

Unix timestamp in milliseconds when the notification was created

currentPrice: number

Price at which the new averaging entry was executed

effectivePriceOpen: number

Averaged (effective) entry price after this addition

exchangeName: string

Exchange name where signal was executed

id: string

Unique notification identifier

originalPriceOpen: number

Original entry price at signal creation (unchanged by DCA averaging)

originalPriceStopLoss: number

Original stop loss price before any trailing adjustments

originalPriceTakeProfit: number

Original take profit price before any trailing adjustments

pendingAt: number

Pending timestamp in milliseconds (when position became pending/active at priceOpen)

PNL at the moment of average-buy commit (from data.pnl)

pnlCost: number

Absolute profit/loss in USD

pnlEntries: number

Total invested capital in USD

pnlPercentage: number

Profit/loss as percentage (e.g., 1.5 for +1.5%, -2.3 for -2.3%)

pnlPriceClose: number

Exit price from PNL calculation (adjusted with slippage and fees)

pnlPriceOpen: number

Entry price from PNL calculation (effective price adjusted with slippage and fees)

position: "long" | "short"

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

priceOpen: number

Original entry price (unchanged by averaging)

priceStopLoss: number

Effective stop loss price (with trailing if set)

priceTakeProfit: number

Effective take profit price (with trailing if set)

scheduledAt: number

Signal creation timestamp in milliseconds (when signal was first created/scheduled)

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 the averaging entry was executed

totalEntries: number

Total number of DCA entries after this addition

totalPartials: number

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

type: "average_buy.commit"

Discriminator for type-safe union