@qtsurfer/sdk
    Preparing search index...

    Type Alias LiveRun

    A live run's full state, as returned by stopping it through its strategy, and the base of the representations returned by starting and by reading it. warmFrom is declared by those two (LiveRunWithStream and LiveRunDetail) and not here, because the response to stopping a run does not carry it.

    type LiveRun = {
        description?: string;
        desired: "RUNNING" | "STOPPED";
        gate?: { [key: string]: unknown };
        name?: string;
        paper?: LivePaperConfig;
        params: { [key: string]: unknown };
        paramsVersion: number;
        reason?: string;
        relay: boolean;
        runId: string;
        sources: LiveSource[];
        stage: "SANDBOX" | "LIVE";
        startedAtMs: number;
        state: string;
        stats?: LiveRunStats;
        strategyId: StrategyId;
        visibility: "private" | "public";
    }
    Index
    description?: string
    desired: "RUNNING" | "STOPPED"

    What you last asked for. state can lag this briefly after DELETE.

    gate?: { [key: string]: unknown }

    The sandbox trial's promotion verdict. Absent for the whole 24-hour trial and present once it ends, so an absent gate means the trial has not finished. A run that started in LIVE without a trial has it from the start: the verdict of the earlier run it relies on, with inheritedFrom naming that run. passed is the verdict; the rest is diagnostic detail whose shape is not yet stabilized as public API: treat it as opaque.

    name?: string
    paper?: LivePaperConfig

    The run's paper trading configuration as accepted at start, normalised. Absent when the run has no paper trading.

    params: { [key: string]: unknown }
    paramsVersion: number

    Increments on every accepted PUT .../params call, including one that resends the current values.

    reason?: string

    Why the run stopped or failed, when there is something to say; absent otherwise. It is never a stack trace or an internal message. Either resource: ... (the platform stopped the run for exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for a FAILED run: the strategy cannot consume the source type the run was started with, the run's definition was refused, the run could not start after several attempts, the strategy failed while processing data, the run lost its data feed, or the generic The run failed.. The set may grow: read an unrecognised sentence as a failure and do not parse it. A FAILED run usually stays desired: RUNNING until you stop it, and counts as active (409 on a new start, and toward your live-run limit) until then; one that can never run because its strategy cannot consume its source type is stopped by the platform itself (desired: STOPPED), so it holds no place.

    relay: boolean

    Whether this run's signals are relayed over the WebSocket channel described in the "Live execution" guide. It is the value requested at start, in either stage.

    runId: string

    This run's own id — its canonical identity for PATCH/PUT .../params and for GET /live/public.

    sources: LiveSource[]
    stage: "SANDBOX" | "LIVE"

    A new run starts SANDBOX, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability. A run that passes moves to LIVE automatically when the 24 hours are up. A run of a strategy that an earlier run of yours already took through the trial starts LIVE, unless you started it with sandbox: true.

    startedAtMs: number

    Epoch milliseconds.

    state: string

    The run's health right now: STARTING (no runner has reported on it yet), RUNNING, LAGGING (behind the market data, usually while catching up; clears by itself), HUNG (stuck inside one strategy call for longer than allowed; clears when it returns), DEGRADED (its independent executions produced different signals), FAILED (refused, could not start or failed while running; reason says why) or STOPPED. LAGGING, HUNG and DEGRADED come and go on a running run. The set may grow: read an unknown value as a running run with something to look at. See the Live execution guide.

    stats?: LiveRunStats

    The run's latest counters. Returned by the two reads, GET /strategy/{strategyId}/live and GET /live/{runId}; never by starting or stopping a run. Absent until the first snapshot exists (a run that has just started), and absent is not zero.

    strategyId: StrategyId
    visibility: "private" | "public"