@qtsurfer/sdk
    Preparing search index...

    Interface SweepOptions

    Tuning knobs for a QTSurfer.sweep invocation.

    interface SweepOptions {
        maxPollIntervalMs?: number;
        onProgress?: (p: SweepProgressEvent) => void;
        order?: SweepOrder;
        pollIntervalMs?: number;
        ranking?: SweepRanking;
        signal?: AbortSignal;
        timeoutMs?: number;
    }
    Index
    maxPollIntervalMs?: number

    Upper bound for exponential backoff. Default 15000ms.

    onProgress?: (p: SweepProgressEvent) => void

    Called on stage transitions and after each poll with updated progress.

    order?: SweepOrder

    Which view of the rows the background poll reads. Omit to take the platform default, 'ranked' — the sorted, display-capped leaderboard. 'natural' returns every available row untruncated.

    This only decides what Sweep.result resolves with. Reading the same sweep another way afterwards — to reach the rows a truncated ranked view dropped, say — is Sweep.results, which re-reads rather than re-running.

    pollIntervalMs?: number

    Initial interval between polls. Default 2000ms, backed off up to maxPollIntervalMs. Longer than a single backtest's, because a sweep is many backtests and its leaderboard changes on the timescale of shards finishing rather than ticks.

    ranking?: SweepRanking

    How to order the leaderboard the poll reads. Omit to send no preference and take the platform default, which is 'plateau' — so leaving this unset does not give you raw objective order. What was actually applied is reported on the result. Ignored entirely when order is 'natural', which is always ordered by runIx; the platform accepts both and answers with the ordering it applied.

    signal?: AbortSignal

    Ask the platform to stop the sweep between parameter vectors.

    Aborting does not reject Sweep.result — it resolves with whatever was scored before the stop. That is a deliberate divergence from backtest(), which rejects with QTSCanceledError when its run is aborted; see Sweep.result for why. Aborting before the platform has accepted the sweep — during compile, prepare or submission — rejects the QTSurfer.sweep call itself with QTSCanceledError, since there is no sweep yet and so no rows to keep.

    timeoutMs?: number

    Per-stage timeout. Default none. A sweep is many backtests, so the execute stage legitimately outlasts anything a single run would take.