Package com.qtsurfer.api.sdk
Record Class BacktestRequest
java.lang.Object
java.lang.Record
com.qtsurfer.api.sdk.BacktestRequest
- Record Components:
strategy- strategy source code (Java)exchangeId- exchange identifier, e.g."binance", or the reserved value"user"for a dataset-backed requestinstrument- 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)storeSignals- whenBoolean.TRUE, the worker uploads emitted signals to object storage and the result includessignalsUrl/signalsId;nullkeeps the server defaultdatasetId- 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- requested server-side transform for the inline result curve;nullkeeps the platform defaultsbaseConfig- optional execution capital, fee, and position configuration;nullkeeps the platform defaultsparams- scalar strategy properties for this run; an empty map keeps every declared property at its default
public record BacktestRequest(String strategy, String exchangeId, String instrument, String from, String to, Boolean storeSignals, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveOptions equityCurve, com.qtsurfer.api.client.model.SweepBaseConfig baseConfig, Map<String,Object> params)
extends Record
A single-instrument backtest request.
Two mutually exclusive data sources. Against a managed exchange, set
instrument and leave datasetId unset:
BacktestRequest request = BacktestRequest.builder()
.strategy(source)
.exchangeId("binance")
.instrument("BTC/USDT")
.from("2026-01-01T00:00:00Z")
.to("2026-02-01T00:00:00Z")
.build();
Against a caller-uploaded dataset, set datasetId instead (and use
the reserved exchangeId value "user"); instrument is
left unset since it comes from the dataset itself. datasetVersionId
is optional and pins a specific past version instead of the dataset's
current one:
BacktestRequest request = BacktestRequest.builder()
.strategy(source)
.exchangeId("user")
.datasetId("ds_3f9a1c2e7b0d4a5f")
.from("2026-01-01T00:00:00Z")
.to("2026-02-01T00:00:00Z")
.build();
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBacktestRequest(String strategy, String exchangeId, String instrument, String from, String to, Boolean storeSignals, String datasetId, String datasetVersionId) BacktestRequest(String strategy, String exchangeId, String instrument, String from, String to, Boolean storeSignals, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveOptions equityCurve) Compatibility constructor for callers that set an equity-curve transform.BacktestRequest(String strategy, String exchangeId, String instrument, String from, String to, Boolean storeSignals, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveOptions equityCurve, com.qtsurfer.api.client.model.SweepBaseConfig baseConfig, Map<String, Object> params) Creates an instance of aBacktestRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.qtsurfer.api.client.model.SweepBaseConfigReturns the value of thebaseConfigrecord component.static BacktestRequest.Builderbuilder()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.EquityCurveOptionsReturns 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.params()Returns the value of theparamsrecord 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.
-
Constructor Details
-
BacktestRequest
-
BacktestRequest
public BacktestRequest(String strategy, String exchangeId, String instrument, String from, String to, Boolean storeSignals, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveOptions equityCurve) Compatibility constructor for callers that set an equity-curve transform. -
BacktestRequest
public BacktestRequest(String strategy, String exchangeId, String instrument, String from, String to, Boolean storeSignals, String datasetId, String datasetVersionId, com.qtsurfer.api.client.model.EquityCurveOptions equityCurve, com.qtsurfer.api.client.model.SweepBaseConfig baseConfig, Map<String, Object> params) Creates an instance of aBacktestRequestrecord 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 componentstoreSignals- the value for thestoreSignalsrecord componentdatasetId- the value for thedatasetIdrecord componentdatasetVersionId- the value for thedatasetVersionIdrecord componentequityCurve- the value for theequityCurverecord componentbaseConfig- the value for thebaseConfigrecord componentparams- the value for theparamsrecord component
-
-
Method Details
-
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
-
storeSignals
Returns the value of thestoreSignalsrecord component.- Returns:
- the value of the
storeSignalsrecord 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.EquityCurveOptions equityCurve()Returns the value of theequityCurverecord component.- Returns:
- the value of the
equityCurverecord component
-
baseConfig
public com.qtsurfer.api.client.model.SweepBaseConfig baseConfig()Returns the value of thebaseConfigrecord component.- Returns:
- the value of the
baseConfigrecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-