Package com.qtsurfer.api.client.model
Class LiveRunWithStream
java.lang.Object
com.qtsurfer.api.client.model.LiveRunWithStream
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.24.0")
public class LiveRunWithStream
extends Object
A run as `LiveRun` describes it, plus its `warmFrom` (absent only for a run started before the field existed) and its `streamUrl` when it has one. It is what **starting a run** and `GET /strategy/{strategyId}/live` return: your own run, read with your own credentials. Stopping a run returns `LiveRun`, which carries neither `warmFrom` nor the URL, and `GET /live/{runId}` returns `LiveRunDetail`, which carries `warmFrom` and never the URL.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat you last asked for.static enumA new run starts `SANDBOX`, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability.static enumGets or Sets visibility -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSourcesItem(LiveSource sourcesItem) description(String description) desired(LiveRunWithStream.DesiredEnum desired) booleanReturn true if this LiveRunWithStream object is equal to o.Get descriptionWhat you last asked for.getGate()The sandbox trial's promotion verdict.getName()Get namegetPaper()The run's paper trading configuration as accepted at start, normalised.Get paramsIncrements on every accepted `PUT .../params` call, including one that resends the current values.Why the run stopped or failed, when there is something to say; absent otherwise.getRelay()Whether this run's signals are relayed over the WebSocket channel described in the \"Live execution\" guide.getRunId()This run's own id — its canonical identity for `PATCH`/`PUT .../params` and for `GET /live/public`.Get sourcesgetStage()A new run starts `SANDBOX`, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability.Epoch milliseconds.getState()The run's health right now: `STARTING` (no runner has reported on it yet), `RUNNING`, `LAGGING` (behind the market data, usually while catching up; clears by itself), `HUNG` (stuck inside one strategy call for longer than allowed; clears when it returns), `DEGRADED` (its independent executions produced different signals), `FAILED` (refused, could not start or failed while running; `reason` says why) or `STOPPED`.getStats()The run's latest counters.Unique identifier for a compiled strategy, derived from the source itself: the same code always yields the same id, for every caller.The run's secret stream URL (`wss://…`).Get visibilityThe `warmFrom` in effect for this run, in seconds: the one requested when the run was started or, when none was, the one the platform chose (the distance from the run's start back to the start of the current 15-minute block, 0 to 900).inthashCode()paper(LivePaperConfig paper) paramsVersion(Integer paramsVersion) putGateItem(String key, Object gateItem) putParamsItem(String key, Object paramsItem) voidsetDescription(String description) voidsetDesired(LiveRunWithStream.DesiredEnum desired) voidvoidvoidsetPaper(LivePaperConfig paper) voidvoidsetParamsVersion(Integer paramsVersion) voidvoidvoidvoidsetSources(List<LiveSource> sources) voidvoidsetStartedAtMs(Long startedAtMs) voidvoidsetStats(LiveRunStats stats) voidsetStrategyId(String strategyId) voidsetStreamUrl(URI streamUrl) voidsetVisibility(LiveRunWithStream.VisibilityEnum visibility) voidsetWarmFrom(Integer warmFrom) sources(List<LiveSource> sources) stage(LiveRunWithStream.StageEnum stage) startedAtMs(Long startedAtMs) stats(LiveRunStats stats) strategyId(String strategyId) toString()Convert the instance into URL query string.toUrlQueryString(String prefix) Convert the instance into URL query string.visibility(LiveRunWithStream.VisibilityEnum visibility)
-
Field Details
-
JSON_PROPERTY_STRATEGY_ID
- See Also:
-
JSON_PROPERTY_RUN_ID
- See Also:
-
JSON_PROPERTY_NAME
- See Also:
-
JSON_PROPERTY_DESCRIPTION
- See Also:
-
JSON_PROPERTY_VISIBILITY
- See Also:
-
JSON_PROPERTY_STAGE
- See Also:
-
JSON_PROPERTY_STATE
- See Also:
-
JSON_PROPERTY_DESIRED
- See Also:
-
JSON_PROPERTY_REASON
- See Also:
-
JSON_PROPERTY_SOURCES
- See Also:
-
JSON_PROPERTY_PARAMS
- See Also:
-
JSON_PROPERTY_PARAMS_VERSION
- See Also:
-
JSON_PROPERTY_RELAY
- See Also:
-
JSON_PROPERTY_STARTED_AT_MS
- See Also:
-
JSON_PROPERTY_GATE
- See Also:
-
JSON_PROPERTY_PAPER
- See Also:
-
JSON_PROPERTY_STATS
- See Also:
-
JSON_PROPERTY_WARM_FROM
- See Also:
-
JSON_PROPERTY_STREAM_URL
- See Also:
-
-
Constructor Details
-
LiveRunWithStream
public LiveRunWithStream()
-
-
Method Details
-
strategyId
-
getStrategyId
Unique identifier for a compiled strategy, derived from the source itself: the same code always yields the same id, for every caller. How much formatting the id ignores depends on the language — see `POST /strategy` for exactly which rewrites preserve it and which do not.- Returns:
- strategyId
-
setStrategyId
-
runId
-
getRunId
This run's own id — its canonical identity for `PATCH`/`PUT .../params` and for `GET /live/public`.- Returns:
- runId
-
setRunId
-
name
-
getName
Get name- Returns:
- name
-
setName
-
description
-
getDescription
Get description- Returns:
- description
-
setDescription
-
visibility
-
getVisibility
Get visibility- Returns:
- visibility
-
setVisibility
-
stage
-
getStage
A new run starts `SANDBOX`, a 24-hour trial in which it is compared against a second execution and checked for resource use and stability. A run that passes moves to `LIVE` automatically when the 24 hours are up. A run of a strategy that an earlier run of yours already took through the trial starts `LIVE`, unless you started it with `sandbox: true`.- Returns:
- stage
-
setStage
-
state
-
getState
The run's health right now: `STARTING` (no runner has reported on it yet), `RUNNING`, `LAGGING` (behind the market data, usually while catching up; clears by itself), `HUNG` (stuck inside one strategy call for longer than allowed; clears when it returns), `DEGRADED` (its independent executions produced different signals), `FAILED` (refused, could not start or failed while running; `reason` says why) or `STOPPED`. `LAGGING`, `HUNG` and `DEGRADED` come and go on a running run. The set may grow: read an unknown value as a running run with something to look at. See the Live execution guide.- Returns:
- state
-
setState
-
desired
-
getDesired
What you last asked for. `state` can lag this briefly after `DELETE`.- Returns:
- desired
-
setDesired
-
reason
-
getReason
Why the run stopped or failed, when there is something to say; absent otherwise. It is never a stack trace or an internal message. Either `resource: ...` (the platform stopped the run for exceeding its resource allowance; the text says which limit) or one of a fixed set of sentences for a `FAILED` run: the strategy cannot consume the source type the run was started with, the run's definition was refused, the pool address of a `dex` run is not a pool of its protocol on its chain, the platform has no room to follow the pool of a `dex` run, the run could not start after several attempts, the strategy failed while processing data, the run lost its data feed, or the generic `The run failed.`. The set may grow: read an unrecognised sentence as a failure and do not parse it. A `FAILED` run usually stays `desired: RUNNING` until you stop it, and counts as active (`409` on a new start, and toward your live-run limit) until then; one that cannot run, and will not by waiting, because its strategy cannot consume its source type or because the pool of a `dex` run is not a pool or has no room to be followed, is stopped by the platform itself (`desired: STOPPED`), so it holds no place.- Returns:
- reason
-
setReason
-
sources
-
addSourcesItem
-
getSources
Get sources- Returns:
- sources
-
setSources
-
params
-
putParamsItem
-
getParams
Get params- Returns:
- params
-
setParams
-
paramsVersion
-
getParamsVersion
Increments on every accepted `PUT .../params` call, including one that resends the current values.- Returns:
- paramsVersion
-
setParamsVersion
-
relay
-
getRelay
Whether this run's signals are relayed over the WebSocket channel described in the \"Live execution\" guide. It is the value requested at start, in either stage.- Returns:
- relay
-
setRelay
-
startedAtMs
-
getStartedAtMs
Epoch milliseconds.- Returns:
- startedAtMs
-
setStartedAtMs
-
gate
-
putGateItem
-
getGate
The sandbox trial's promotion verdict. Absent for the whole 24-hour trial and present once it ends, so an absent `gate` means the trial has not finished. A run that started in `LIVE` without a trial has it from the start: the verdict of the earlier run it relies on, with `inheritedFrom` naming that run. `passed` is the verdict; the rest is diagnostic detail whose shape is not yet stabilized as public API: treat it as opaque.- Returns:
- gate
-
setGate
-
paper
-
getPaper
The run's paper trading configuration as accepted at start, normalised. Absent when the run has no paper trading.- Returns:
- paper
-
setPaper
-
stats
-
getStats
The run's latest counters. Returned by the two reads, `GET /strategy/{strategyId}/live` and `GET /live/{runId}`; never by starting or stopping a run. Absent until the first snapshot exists (a run that has just started), and absent is not zero.- Returns:
- stats
-
setStats
-
warmFrom
-
getWarmFrom
The `warmFrom` in effect for this run, in seconds: the one requested when the run was started or, when none was, the one the platform chose (the distance from the run's start back to the start of the current 15-minute block, 0 to 900). It is never `null`. It is present on every run started since the field exists and absent from a run started before it existed. It never changes while the run exists. minimum: 0 maximum: 3600- Returns:
- warmFrom
-
setWarmFrom
-
streamUrl
-
getStreamUrl
The run's secret stream URL (`wss://…`). **Treat it like a password**: anyone who holds it can read this run's signals, from the sandbox stage on. Present only when the run was started with `stream: true`, is wanted running, has not had its stream revoked, and your plan still lets you broadcast; absent otherwise (a plan that lets you broadcast again gets the same URL back). Rotate it with `POST /live/{runId}/stream` if it leaks, revoke it with `DELETE /live/{runId}/stream`.- Returns:
- streamUrl
-
setStreamUrl
-
equals
Return true if this LiveRunWithStream object is equal to o. -
hashCode
public int hashCode() -
toString
-
toUrlQueryString
Convert the instance into URL query string.- Returns:
- URL query string
-
toUrlQueryString
Convert the instance into URL query string.- Parameters:
prefix- prefix of the query string- Returns:
- URL query string
-