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

    Type Alias PrepareRequest

    Two shapes, chosen by the exchangeId path segment. Against a managed exchange, instrument is required and datasetId/datasetVersionId are ignored. Against the reserved exchangeId: user, send datasetId instead of instrument — instrument is ignored there, since it comes from the dataset itself.

    type PrepareRequest = {
        cadence?: string;
        datasetId?: string;
        datasetVersionId?: string;
        from: string;
        instrument?: Instrument;
        to: string;
    }
    Index
    cadence?: string

    Output bar cadence for the prepared range. Coarser cadences are produced on demand by resampling the source and stored alongside the native blob in cache. A target finer than the source, or not an exact multiple of it, returns 400. What's accepted, and what omitting it means, depends on the source:

    • Managed exchange, ticker or funding — one of 1s, 5s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 1w, 1q; any other label returns 400. Omitted = 1s, the publisher's native cadence.
    • Managed exchange, kline — one of 1s, 1m, 5m, 15m, 30m, 1h, 4h, 1d; any other label, including 5s, 3m and 8h, returns 400 and names the accepted ones. Omitted = 1s. This is the width of the bars a run reads: it is chosen here, once, and the same strategy can be run at several cadences by preparing the range at each.
    • Dataset (exchangeId: user) — omitted = the dataset version's own discovered cadence (see DatasetVersion.cadence), served as-is. Any cadence equal to or coarser than it and an exact multiple of it is accepted, including ones outside the managed-exchange list (e.g. 15s); an rt dataset can be resampled to any fixed cadence.
    datasetId?: string

    Only for exchangeId: user: the id of a dataset created via POST /datasets, in place of instrument. Ignored against a managed exchange.

    datasetVersionId?: string

    Only for exchangeId: user, and optional even then: pins a specific past version of the dataset instead of its current one. Defaults to the dataset's current version.

    from: string

    Start date for the preparation process. Supports the following formats:

    • ISO-8601 (e.g. 2024-12-14T23:59:59Z)
    • ISO DATE (e.g. 2024-12-14)
    • BASIC ISO DATE (e.g., 20241214)
    instrument?: Instrument

    Required unless exchangeId is the reserved value user, in which case send datasetId instead.

    to: string

    End date for the preparation process. Supports the following formats:

    • ISO-8601 (e.g. 2024-12-14T23:59:59Z)
    • ISO DATE (e.g. 2024-12-14)
    • BASIC ISO DATE (e.g., 20241214)