Type Alias BrokerScheduleOpenPayload

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

Payload for the scheduled-signal-open broker event.

Emitted automatically via scheduleEventSubject (action "scheduled") when a new scheduled signal is created and starts waiting for priceOpen activation. Forwarded to the registered IBroker adapter via onSignalScheduleOpen. The scheduled -> active transition is NOT reported here — activation arrives through onSignalOpenCommit.

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 the scheduled signal was created

  • position: "long" | "short"

    Position direction

  • priceOpen: number

    Pending entry price the scheduled signal waits for

  • priceStopLoss: number

    Stop-loss price configured for the scheduled signal

  • priceTakeProfit: number

    Take-profit price configured for the scheduled signal

  • signalId: string

    Unique signal identifier (UUID v4) of the scheduled signal

  • symbol: string

    Trading pair symbol, e.g. "BTCUSDT"

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