@qtsurfer/api-client
    Preparing search index...

    Type Alias PrepareJobState

    PrepareJobState: JobState & {
        cadence?: string;
        coverageRatio?: number;
        dataFrom?: string | null;
        dataTo?: string | null;
        gaps?: number;
        hoursWithData?: number;
        hoursWithoutData?: {
            expected?: number;
            hour?: string;
            rationale?: "pending_conversion" | "low_activity" | "unknown";
        }[];
        largestGapSteps?: number;
        totalHours?: number;
    }

    State of a single-instrument prepare job — the JobState shape plus a coverage summary. A single-instrument prepare is always terminal (status: Completed): the client decides what to do from coverageRatio (e.g. execute if it is at or above a chosen threshold) rather than polling for missing hours that may never arrive — a missing hour for one instrument usually means low activity, not missing data.

    Two coverage shapes, by exchange vs. dataset. Against a managed exchange, coverage is walked hour by hour: totalHours/hoursWithData/hoursWithoutData. Against a dataset-backed prepare (exchangeId: user), coverage is reported on the dataset's own cadence grid instead — hour-walking a daily dataset would report 1/24 and read as broken — via cadence/gaps/largestGapSteps; totalHours/hoursWithData/ hoursWithoutData are absent in that case. dataFrom/dataTo are present either way, and coverageRatio too, computed accordingly — except against a dataset whose cadence is rt: with no fixed step there is no expected row count to measure against, so coverageRatio is absent and gaps/largestGapSteps are 0.

    Type Declaration

    • Optionalcadence?: string

      The dataset version's own discovered cadence — a fixed grid (e.g. 1m, 1h) or rt (see DatasetVersion.cadence). Only present for a dataset-backed prepare (exchangeId: user).

    • OptionalcoverageRatio?: number

      Against a managed exchange: hoursWithData / totalHours in [0,1] (1.0 when totalHours is 0), the fraction of hours in the requested range that have served data. Against a dataset (exchangeId: user): rows / expectedStepsAtCadence over the dataset version's own range — echoing what ingest computed once, not recomputed against a narrower prepare request. Absent for an rt dataset (no fixed step, so no expected row count).

    • OptionaldataFrom?: string | null

      Start of the available data range for the prepared instrument.

    • OptionaldataTo?: string | null

      End of the available data range for the prepared instrument.

    • Optionalgaps?: number

      Number of gaps in the dataset version at its own cadence, as discovered at ingest time. 0 for rt. Only present for a dataset-backed prepare.

    • OptionalhoursWithData?: number

      Number of hours in the range that have data. Managed exchanges only — absent for a dataset-backed prepare.

    • OptionalhoursWithoutData?: {
          expected?: number;
          hour?: string;
          rationale?: "pending_conversion" | "low_activity" | "unknown";
      }[]

      One entry per hour in the range that has no data, with a rationale. Managed exchanges only — absent for a dataset-backed prepare.

    • OptionallargestGapSteps?: number

      The largest gap in the dataset version, in units of its own cadence step. 0 for rt. Only present for a dataset-backed prepare.

    • OptionaltotalHours?: number

      Number of whole hours in the requested prepare range. Managed exchanges only — absent for a dataset-backed prepare.