Type Alias BrokerPendingOpenPayload

BrokerPendingOpenPayload: {
    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 pending-signal-open broker event.

Emitted automatically via signalEventSubject (action "opened") when a pending position is opened (new signal / immediate entry / scheduled or user activation). Forwarded to the registered IBroker adapter via onSignalPendingOpen.

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

    Effective entry price at the moment the position opened

  • position: "long" | "short"

    Position direction

  • priceOpen: number

    Effective entry price (may differ from currentPrice after DCA averaging)

  • priceStopLoss: number

    Stop-loss price configured for the position

  • priceTakeProfit: number

    Take-profit price configured for the position

  • signalId: string

    Unique signal identifier (UUID v4) of the opened position

  • symbol: string

    Trading pair symbol, e.g. "BTCUSDT"

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