Predicate to filter which events trigger the callback
Callback function to handle the filtered event (called only once)
Unsubscribe function to cancel the listener before it fires
import { listenDoneLiveOnce, Live } from "backtest-kit";
// Wait for first live completion
listenDoneLiveOnce(
(event) => event.symbol === "BTCUSDT",
(event) => console.log("BTCUSDT live completed:", event.strategyName)
);
Live.background("BTCUSDT", {
strategyName: "my-strategy",
exchangeName: "binance"
});
Subscribes to filtered live background execution completion events with one-time execution.
Emits when Live.background() completes execution. Executes callback once and automatically unsubscribes.