Interface ScheduledEvent

Unified scheduled signal event data for report generation. Contains all information about scheduled, opened and cancelled events.

interface ScheduledEvent {
    action: "opened" | "scheduled" | "cancelled";
    cancelId?: string;
    cancelReason?: "timeout" | "user" | "price_reject";
    closeTimestamp?: number;
    currentPrice: number;
    duration?: number;
    note?: string;
    originalPriceOpen?: number;
    originalPriceStopLoss?: number;
    originalPriceTakeProfit?: number;
    partialExecuted?: number;
    pendingAt?: number;
    pnl?: IStrategyPnL;
    position: string;
    priceOpen: number;
    priceStopLoss: number;
    priceTakeProfit: number;
    scheduledAt?: number;
    signalId: string;
    symbol: string;
    timestamp: number;
    totalEntries?: number;
    totalPartials?: number;
}

Properties

action: "opened" | "scheduled" | "cancelled"

Event action type

cancelId?: string

Cancellation ID (only for user-initiated cancellations)

cancelReason?: "timeout" | "user" | "price_reject"

Cancellation reason (only for cancelled events)

closeTimestamp?: number

Close timestamp (only for cancelled)

currentPrice: number

Current market price

duration?: number

Duration in minutes (only for cancelled/opened)

note?: string

Signal note

originalPriceOpen?: number

Original entry price before DCA averaging (present when averageBuy was applied)

originalPriceStopLoss?: number

Original stop loss price before modifications

originalPriceTakeProfit?: number

Original take profit price before modifications

partialExecuted?: number

Total executed percentage from partial closes

pendingAt?: number

Timestamp when position became active (only for opened events)

Unrealized PNL at the moment of this event

position: string

Position type

priceOpen: number

Scheduled entry price

priceStopLoss: number

Stop loss price

priceTakeProfit: number

Take profit price

scheduledAt?: number

Timestamp when signal was created/scheduled (for all events)

signalId: string

Signal ID

symbol: string

Trading pair symbol

timestamp: number

Event timestamp in milliseconds (scheduledAt for scheduled/cancelled events)

totalEntries?: number

Total number of DCA entries (present when averageBuy was applied)

totalPartials?: number

Total number of partial closes executed (_partial.length)