Package com.qtsurfer.api.sdk.workflows
Class SweepWorkflow
java.lang.Object
com.qtsurfer.api.sdk.workflows.SweepWorkflow
Orchestrates compile → prepare → executeSweep over
com.qtsurfer:api-client, and polls the leaderboard until the sweep
stops advancing. Sibling of BacktestWorkflow, sharing its prepare
stage and its polling loop.
One call, not composable stages, and deliberately so. The execute-sweep endpoint is addressed by the id of an already-prepared dataset, so a stage-level API would hand dataset lifecycle to the caller for no gain. Preparing is idempotent — the same instrument and window always resolve to the same job — so preparing on every sweep duplicates no work.
-
Constructor Summary
ConstructorsConstructorDescriptionSweepWorkflow(StrategyCompileClient strategyClient, com.qtsurfer.api.client.api.BacktestingApi backtestingApi, Executor executor) -
Method Summary
Modifier and TypeMethodDescriptionsubmit(SweepRequest req, SweepOptions opts) Compile, prepare, and submit the sweep.
-
Constructor Details
-
SweepWorkflow
public SweepWorkflow(StrategyCompileClient strategyClient, com.qtsurfer.api.client.api.BacktestingApi backtestingApi, Executor executor) - Parameters:
strategyClient- compiles strategy sourcebacktestingApi- the generated backtesting apiexecutor- runs the submission and the background poll
-
-
Method Details
-
submit
Compile, prepare, and submit the sweep. Resolves with aSweeponce the platform has accepted it; the leaderboard keeps being polled in the background to feed progress events and resolveSweep.await().- Parameters:
req- the grid, the instrument, and the windowopts- tuning knobs;nulltakesSweepOptions.defaults()- Returns:
- the handle, once accepted
-