Function getStrategyPaused

  • Returns the paused state of the strategy.

    While paused the strategy opens nothing new: getSignal is not called and a queued createSignal DTO is held until resume. Existing pending/scheduled signals keep being monitored and close normally.

    Automatically detects backtest/live mode from execution context.

    Parameters

    • symbol: string

      Trading pair symbol

    Returns Promise<boolean>

    Promise resolving to true if strategy is paused, false otherwise

    import { getStrategyPaused } from "backtest-kit";

    if (await getStrategyPaused("BTCUSDT")) {
    console.log("generation suspended");
    }