Type Alias BrokerScheduleCancelledPayload

BrokerScheduleCancelledPayload: {
    backtest: boolean;
    context: {
        exchangeName: ExchangeName;
        frameName?: FrameName;
        strategyName: StrategyName;
    };
    currentPrice: number;
    position: "long"
    | "short";
    priceOpen: number;
    priceStopLoss: number;
    priceTakeProfit: number;
    reason?: StrategyCancelReason;
    signalId: string;
    symbol: string;
}

Payload for the scheduled-signal-cancelled broker event.

Emitted automatically via scheduleEventSubject (action "cancelled") when a scheduled signal is removed before it ever activated. Forwarded to the registered IBroker adapter via onSignalScheduleCancelled. The reason distinguishes timeout / price reject / user cancel.

Type declaration

  • backtest: boolean

    true when called during a backtest run — adapter should skip exchange calls

  • context: {
        exchangeName: ExchangeName;
        frameName?: FrameName;
        strategyName: StrategyName;
    }

    Strategy/exchange/frame routing context

  • currentPrice: number

    Market price at the moment of cancellation

  • position: "long" | "short"

    Position direction

  • priceOpen: number

    Pending entry price the scheduled signal had been waiting for

  • priceStopLoss: number

    Stop-loss price that had been configured for the scheduled signal

  • priceTakeProfit: number

    Take-profit price that had been configured for the scheduled signal

  • Optionalreason?: StrategyCancelReason

    Why the scheduled signal was cancelled: "timeout" / "price_reject" / "user"

  • signalId: string

    Unique signal identifier (UUID v4) of the cancelled scheduled signal

  • symbol: string

    Trading pair symbol, e.g. "BTCUSDT"

const payload: BrokerScheduleCancelledPayload = {
symbol: "BTCUSDT",
position: "long",
currentPrice: 47500,
priceOpen: 50000,
priceTakeProfit: 55000,
priceStopLoss: 48000,
reason: "price_reject",
context: { strategyName: "my-strategy", exchangeName: "binance", frameName: "1h" },
backtest: false,
};