Package com.qtsurfer.api.sdk
Record Class SweepRequest
java.lang.Object
java.lang.Record
com.qtsurfer.api.sdk.SweepRequest
- Record Components:
strategy- strategy source code (Java), compiled once and reused by every trialexchangeId- exchange identifier, e.g."binance", or the reserved value"user"for a dataset-backed sweepinstrument- instrument symbol, e.g."BTC/USDT"; mutually exclusive withdatasetId— exactly one of the two must be setfrom- range start (ISO-8601, ISO DATE, or BASIC ISO DATE)to- range end (same formats asfrom; must be> from)params- the grid: oneParamAxisper strategy property to vary. At least onesampler- how the grid becomes the list of vectors actually run;nullkeeps the platform default (the full cross product)samples- how many vectors to draw forSweepSampler.RANDOMandSweepSampler.LHS; ignored bySweepSampler.GRIDseed- reproducibility seed.nulllets the platform generate one and report it back onExecuteSweepAccepted.getSeed(), so a randomly sampled sweep can be replayed exactly by submitting the same seed againobjective- the metric to optimize and rank by;nullkeeps the platform default. It is also whatSweep.sensitivity()aggregates unless told otherwisewalkForward- opt into walk-forward validation, which changes both what runs and the shape of the answer;nullruns an ordinary sweep. SeeWalkForwardSpecdatasetId- id of a dataset created withQTSurfer.createDataset(com.qtsurfer.api.client.model.CreateDatasetRequest); mutually exclusive withinstrumentdatasetVersionId- pins a specific past version ofdatasetIdinstead of its current one; only valid alongside a non-nulldatasetIdequityCurve- which sweep trials retain curves and their default read transform;nullkeeps the platform defaultsstoreSignals- whenBoolean.TRUE, retain emitted signals for every trial;nullkeeps the platform default
public record SweepRequest(String strategy, String exchangeId, String instrument, String from, String to, Map<String,ParamAxis> params, SweepSampler sampler, Integer samples, Long seed, SweepObjective objective, WalkForwardSpec walkForward, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveRequest equityCurve, Boolean storeSignals)
extends Record
A parameter sweep over one instrument and one window: the same strategy run
once per parameter vector, scored and ranked against a single objective.
SweepRequest request = SweepRequest.builder()
.strategy(source)
.exchangeId("binance")
.instrument("BTC/USDT")
.from("2026-01-01T00:00:00Z")
.to("2026-02-01T00:00:00Z")
.param("rsi.period", ParamAxis.range(7, 28, 1))
.param("useTrendFilter", ParamAxis.of(true, false))
.objective(SweepObjective.SHARPE)
.build();
Against a caller-uploaded dataset, set datasetId instead of
instrument (and use the reserved exchangeId value
"user"); the two are mutually exclusive:
SweepRequest request = SweepRequest.builder()
.strategy(source)
.exchangeId("user")
.datasetId("ds_3f9a1c2e7b0d4a5f")
.from("2026-01-01T00:00:00Z")
.to("2026-02-01T00:00:00Z")
.param("rsi.period", ParamAxis.range(7, 28, 1))
.objective(SweepObjective.SHARPE)
.build();
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSweepRequest(String strategy, String exchangeId, String instrument, String from, String to, Map<String, ParamAxis> params, SweepSampler sampler, Integer samples, Long seed, SweepObjective objective, WalkForwardSpec walkForward, String datasetId, String datasetVersionId) SweepRequest(String strategy, String exchangeId, String instrument, String from, String to, Map<String, ParamAxis> params, SweepSampler sampler, Integer samples, Long seed, SweepObjective objective, WalkForwardSpec walkForward, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveRequest equityCurve, Boolean storeSignals) Creates an instance of aSweepRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SweepRequest.Builderbuilder()Start building a request.Returns the value of thedatasetIdrecord component.Returns the value of thedatasetVersionIdrecord component.final booleanIndicates whether some other object is "equal to" this one.com.qtsurfer.api.client.model.EquityCurveRequestReturns the value of theequityCurverecord component.Returns the value of theexchangeIdrecord component.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinstrumentrecord component.Returns the value of theobjectiverecord component.params()Returns the value of theparamsrecord component.sampler()Returns the value of thesamplerrecord component.samples()Returns the value of thesamplesrecord component.seed()Returns the value of theseedrecord component.Returns the value of thestoreSignalsrecord component.strategy()Returns the value of thestrategyrecord component.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewalkForwardrecord component.
-
Constructor Details
-
SweepRequest
public SweepRequest(String strategy, String exchangeId, String instrument, String from, String to, Map<String, ParamAxis> params, SweepSampler sampler, Integer samples, Long seed, SweepObjective objective, WalkForwardSpec walkForward, String datasetId, String datasetVersionId) -
SweepRequest
public SweepRequest(String strategy, String exchangeId, String instrument, String from, String to, Map<String, ParamAxis> params, SweepSampler sampler, Integer samples, Long seed, SweepObjective objective, WalkForwardSpec walkForward, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveRequest equityCurve, Boolean storeSignals) Creates an instance of aSweepRequestrecord class.- Parameters:
strategy- the value for thestrategyrecord componentexchangeId- the value for theexchangeIdrecord componentinstrument- the value for theinstrumentrecord componentfrom- the value for thefromrecord componentto- the value for thetorecord componentparams- the value for theparamsrecord componentsampler- the value for thesamplerrecord componentsamples- the value for thesamplesrecord componentseed- the value for theseedrecord componentobjective- the value for theobjectiverecord componentwalkForward- the value for thewalkForwardrecord componentdatasetId- the value for thedatasetIdrecord componentdatasetVersionId- the value for thedatasetVersionIdrecord componentequityCurve- the value for theequityCurverecord componentstoreSignals- the value for thestoreSignalsrecord component
-
-
Method Details
-
builder
Start building a request.- Returns:
- a fresh builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
strategy
Returns the value of thestrategyrecord component.- Returns:
- the value of the
strategyrecord component
-
exchangeId
Returns the value of theexchangeIdrecord component.- Returns:
- the value of the
exchangeIdrecord component
-
instrument
Returns the value of theinstrumentrecord component.- Returns:
- the value of the
instrumentrecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-
sampler
Returns the value of thesamplerrecord component.- Returns:
- the value of the
samplerrecord component
-
samples
Returns the value of thesamplesrecord component.- Returns:
- the value of the
samplesrecord component
-
seed
Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-
objective
Returns the value of theobjectiverecord component.- Returns:
- the value of the
objectiverecord component
-
walkForward
Returns the value of thewalkForwardrecord component.- Returns:
- the value of the
walkForwardrecord component
-
datasetId
Returns the value of thedatasetIdrecord component.- Returns:
- the value of the
datasetIdrecord component
-
datasetVersionId
Returns the value of thedatasetVersionIdrecord component.- Returns:
- the value of the
datasetVersionIdrecord component
-
equityCurve
public com.qtsurfer.api.client.model.EquityCurveRequest equityCurve()Returns the value of theequityCurverecord component.- Returns:
- the value of the
equityCurverecord component
-
storeSignals
Returns the value of thestoreSignalsrecord component.- Returns:
- the value of the
storeSignalsrecord component
-