Class PrepareRequest

java.lang.Object
com.qtsurfer.api.client.model.PrepareRequest

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.14.0") public class PrepareRequest extends Object
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.
  • Field Details

  • Constructor Details

    • PrepareRequest

      public PrepareRequest()
  • Method Details

    • instrument

      public PrepareRequest instrument(@Nullable String instrument)
    • getInstrument

      @Nullable public String getInstrument()
      Required unless `exchangeId` is the reserved value `user`, in which case send `datasetId` instead.
      Returns:
      instrument
    • setInstrument

      public void setInstrument(@Nullable String instrument)
    • datasetId

      public PrepareRequest datasetId(@Nullable String datasetId)
    • getDatasetId

      @Nullable public String getDatasetId()
      Only for `exchangeId: user`: the id of a dataset created via `POST /datasets`, in place of `instrument`. Ignored against a managed exchange.
      Returns:
      datasetId
    • setDatasetId

      public void setDatasetId(@Nullable String datasetId)
    • datasetVersionId

      public PrepareRequest datasetVersionId(@Nullable String datasetVersionId)
    • getDatasetVersionId

      @Nullable public String getDatasetVersionId()
      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.
      Returns:
      datasetVersionId
    • setDatasetVersionId

      public void setDatasetVersionId(@Nullable String datasetVersionId)
    • from

      public PrepareRequest from(@Nonnull String from)
    • getFrom

      @Nonnull public String getFrom()
      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)
      Returns:
      from
    • setFrom

      public void setFrom(@Nonnull String from)
    • to

      public PrepareRequest to(@Nonnull String to)
    • getTo

      @Nonnull public String getTo()
      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)
      Returns:
      to
    • setTo

      public void setTo(@Nonnull String to)
    • cadence

      public PrepareRequest cadence(@Nullable String cadence)
    • getCadence

      @Nullable public String getCadence()
      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.
      Returns:
      cadence
    • setCadence

      public void setCadence(@Nullable String cadence)
    • equals

      public boolean equals(Object o)
      Return true if this PrepareRequest object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUrlQueryString

      public String toUrlQueryString()
      Convert the instance into URL query string.
      Returns:
      URL query string
    • toUrlQueryString

      public String toUrlQueryString(String prefix)
      Convert the instance into URL query string.
      Parameters:
      prefix - prefix of the query string
      Returns:
      URL query string