Class DatasetImportRequest

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.24.0") public class DatasetImportRequest extends Object
`POST /datasets/imports`'s request body. A common block plus one type-specific block, selected by `type`: `dex` (block `dex`) or `cex` (block `cex`), the two `venueType`s of `GET /exchanges`.
  • Field Details

  • Constructor Details

    • DatasetImportRequest

      public DatasetImportRequest()
  • Method Details

    • name

      public DatasetImportRequest name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      A name unique among your datasets. `409` if already taken.
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • instrument

      public DatasetImportRequest instrument(@Nonnull String instrument)
    • getInstrument

      @Nonnull public String getInstrument()
      Exchange instrument identifier (e.g. a currency pair)
      Returns:
      instrument
    • setInstrument

      public void setInstrument(@Nonnull String instrument)
    • from

      public DatasetImportRequest from(@Nonnull OffsetDateTime from)
    • getFrom

      @Nonnull public OffsetDateTime getFrom()
      Start of the range to fetch, inclusive. Must be before `to`.
      Returns:
      from
    • setFrom

      public void setFrom(@Nonnull OffsetDateTime from)
    • to

      public DatasetImportRequest to(@Nonnull OffsetDateTime to)
    • getTo

      @Nonnull public OffsetDateTime getTo()
      End of the range to fetch, exclusive. The total span is capped by your tier — a request wider than that ceiling is `400`, regardless of source type.
      Returns:
      to
    • setTo

      public void setTo(@Nonnull OffsetDateTime to)
    • cadence

      public DatasetImportRequest cadence(@Nullable DatasetImportRequest.CadenceEnum cadence)
    • getCadence

      @Nullable public DatasetImportRequest.CadenceEnum getCadence()
      Optional; what it means, and what it accepts, depends on `type`. Any other value is `400`. * `dex` — omitted/blank keeps native per-trade event cadence: each swap at its own timestamp, so the resulting version's `cadence` is `rt` unless the swaps happen to sit on a fixed grid (see `DatasetVersion.cadence`). Set to `1s`, `1m` or `5m` instead to get pre-aggregated candles at that width rather than raw trades (the resulting dataset's `type` becomes `klines`). Not every network supports every cadence — an unsupported combination fails asynchronously, not at request time (see `DatasetImportState.error`). * `cex` — one of `1s`, `5s`, `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`, `12h`, `1d`, `1w`, `1q`, whether `dataType` is `ticker` or `klines`. Omitted = the finest cadence every part of the range holds. For `cex` the bars are built from the finest data every part of the range holds. A `cadence` finer than that, or not an exact multiple of it, fails the import asynchronously (`failed`; the `error` names the finest cadence the range holds) rather than returning a dataset with a different cadence from the one asked for. So a range whose history changes cadence part-way (from `1m` to `1s`, say) comes out entirely at the coarser one when `cadence` is omitted: the dataset has no gap that is only a change of cadence.
      Returns:
      cadence
    • setCadence

      public void setCadence(@Nullable DatasetImportRequest.CadenceEnum cadence)
    • type

    • getType

      @Nonnull public DatasetImportRequest.TypeEnum getType()
      The kind of venue to import from, the same two values as the `venueType` of `GET /exchanges`: `dex` — a pool/pair's own on-chain market (block `dex`) — or `cex` — a centralized exchange's market history (block `cex`).
      Returns:
      type
    • setType

      public void setType(@Nonnull DatasetImportRequest.TypeEnum type)
    • dex

      public DatasetImportRequest dex(@Nullable DatasetImportDexRequest dex)
    • getDex

      @Nullable public DatasetImportDexRequest getDex()
      Get dex
      Returns:
      dex
    • setDex

      public void setDex(@Nullable DatasetImportDexRequest dex)
    • cex

      public DatasetImportRequest cex(@Nullable DatasetImportCexRequest cex)
    • getCex

      @Nullable public DatasetImportCexRequest getCex()
      Get cex
      Returns:
      cex
    • setCex

      public void setCex(@Nullable DatasetImportCexRequest cex)
    • equals

      public boolean equals(Object o)
      Return true if this DatasetImportRequest 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