Package com.qtsurfer.api.client.model
Class StrategyState
java.lang.Object
com.qtsurfer.api.client.model.StrategyState
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.14.0")
public class StrategyState
extends Object
What is known about a registered strategy: that it compiled, and what validating it found. **`validation: passed` does not mean the strategy is correct.** It means the class loaded and survived the first event of a short synthetic run — a floor, not a guarantee. When `dryRunIncomplete` is true it is a lower floor still, because the run did not finish.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumGets or Sets requiredSourcesstatic enum* `not_validated` — registered, never checked. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNoticesItem(Notice noticesItem) addRequiredSourcesItem(StrategyState.RequiredSourcesEnum requiredSourcesItem) compiledAt(OffsetDateTime compiledAt) dryRunIncomplete(Boolean dryRunIncomplete) booleanReturn true if this StrategyState object is equal to o.When the live compilation was produced.Why validation failed, or why a queued check has not reported.The check did not finish its budget — it ran out of time, was refused because the platform was already holding too many unfinishable runs, or hit a failure attributable to the synthetic instrument rather than to your strategy.What the run surfaced.How many notices were dropped past the cap.The market data a strategy needs, read off the compiled class rather than off anything you sent — `TickerStrategy`, `KlineStrategy` and `FundingRateStrategy` each declare one, and a `MultiSourceStrategy` declares a set.Unique identifier for a compiled strategy, derived from the source itself: the same code always yields the same id, for every caller, whatever its formatting.When the verdict was recorded.* `not_validated` — registered, never checked.A queued check has not reported for far longer than one takes.inthashCode()noticesTruncated(Integer noticesTruncated) requiredSources(List<StrategyState.RequiredSourcesEnum> requiredSources) voidsetCompiledAt(OffsetDateTime compiledAt) voidvoidsetDryRunIncomplete(Boolean dryRunIncomplete) voidsetNotices(List<Notice> notices) voidsetNoticesTruncated(Integer noticesTruncated) voidsetRequiredSources(List<StrategyState.RequiredSourcesEnum> requiredSources) voidsetStrategyId(String strategyId) voidsetValidatedAt(OffsetDateTime validatedAt) voidsetValidation(StrategyState.ValidationEnum validation) voidsetValidationStalled(Boolean validationStalled) strategyId(String strategyId) toString()Convert the instance into URL query string.toUrlQueryString(String prefix) Convert the instance into URL query string.validatedAt(OffsetDateTime validatedAt) validation(StrategyState.ValidationEnum validation) validationStalled(Boolean validationStalled)
-
Field Details
-
JSON_PROPERTY_STRATEGY_ID
- See Also:
-
JSON_PROPERTY_VALIDATION
- See Also:
-
JSON_PROPERTY_COMPILED_AT
- See Also:
-
JSON_PROPERTY_REQUIRED_SOURCES
- See Also:
-
JSON_PROPERTY_VALIDATED_AT
- See Also:
-
JSON_PROPERTY_DETAIL
- See Also:
-
JSON_PROPERTY_NOTICES
- See Also:
-
JSON_PROPERTY_NOTICES_TRUNCATED
- See Also:
-
JSON_PROPERTY_DRY_RUN_INCOMPLETE
- See Also:
-
JSON_PROPERTY_VALIDATION_STALLED
- See Also:
-
-
Constructor Details
-
StrategyState
public StrategyState()
-
-
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, whatever its formatting. See `POST /strategy` for exactly which rewrites preserve it and which do not.- Returns:
- strategyId
-
setStrategyId
-
validation
-
getValidation
* `not_validated` — registered, never checked. `POST /strategy/{strategyId}/validate` checks it. * `pending` — a check was asked for and has not answered yet. * `passed` — the class loaded and survived its first event. * `failed` — it did not; `detail` says how.- Returns:
- validation
-
setValidation
-
compiledAt
-
getCompiledAt
When the live compilation was produced.- Returns:
- compiledAt
-
setCompiledAt
-
requiredSources
public StrategyState requiredSources(@Nullable List<StrategyState.RequiredSourcesEnum> requiredSources) -
addRequiredSourcesItem
-
getRequiredSources
The market data a strategy needs, read off the compiled class rather than off anything you sent — `TickerStrategy`, `KlineStrategy` and `FundingRateStrategy` each declare one, and a `MultiSourceStrategy` declares a set. **Absent is not \"needs nothing\".** A strategy always needs market data, so an absent field never means an empty requirement — it means the platform could not establish the answer without constructing your strategy, which it will not do to fill in a field. That happens for a `MultiSourceStrategy`, for a class that overrides `getMarketDataSource()`, and for anything registered before this field existed; re-registering the source fills it in.- Returns:
- requiredSources
-
setRequiredSources
-
validatedAt
-
getValidatedAt
When the verdict was recorded. Absent until there is one.- Returns:
- validatedAt
-
setValidatedAt
-
detail
-
getDetail
Why validation failed, or why a queued check has not reported. Present on `failed`, and alongside `validationStalled`.- Returns:
- detail
-
setDetail
-
notices
-
addNoticesItem
-
getNotices
What the run surfaced. An empty or absent list is not a clean bill of health when `dryRunIncomplete` is true — see that field.- Returns:
- notices
-
setNotices
-
noticesTruncated
-
getNoticesTruncated
How many notices were dropped past the cap. Absent when none were.- Returns:
- noticesTruncated
-
setNoticesTruncated
-
dryRunIncomplete
-
getDryRunIncomplete
The check did not finish its budget — it ran out of time, was refused because the platform was already holding too many unfinishable runs, or hit a failure attributable to the synthetic instrument rather than to your strategy. The verdict stands as far as it went; it simply reached less than a full run would.- Returns:
- dryRunIncomplete
-
setDryRunIncomplete
-
validationStalled
-
getValidationStalled
A queued check has not reported for far longer than one takes. Nothing is disproved about the strategy — the check has not run. Stop waiting and re-request it later.- Returns:
- validationStalled
-
setValidationStalled
-
equals
Return true if this StrategyState 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
-