Function listenSignalLive

  • Subscribes to live trading signal events with queued async processing.

    Only receives events from Live.run() execution. Events are processed sequentially in order received.

    Parameters

    Returns () => void

    Unsubscribe function to stop listening

    import { listenSignalLive } from "./function/event";

    const unsubscribe = listenSignalLive((event) => {
    if (event.action === "closed") {
    console.log("Live signal closed:", event.pnl.pnlPercentage);
    }
    });