@tradejs/types 3.1.28-beta.254 → 3.1.28-beta.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -521,13 +521,19 @@ interface RuntimeDeployment {
521
521
  tickers?: string[];
522
522
  }
523
523
  declare const RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA: "tradejs-runtime-deployment-composition-event/v1";
524
+ interface RuntimeDeploymentCompositionEventStrategy {
525
+ strategyName: string;
526
+ strategyRevision: string;
527
+ strategyPackage?: string;
528
+ strategyPackageVersion?: string;
529
+ }
524
530
  interface RuntimeDeploymentCompositionEvent {
525
531
  schema: typeof RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA;
526
532
  eventId: string;
527
533
  deploymentId: string;
528
534
  deploymentCompositionId: string;
529
535
  observedAt: number;
530
- strategies: Array<Pick<RuntimeDeploymentStrategy, 'strategyName' | 'strategyRevision'>>;
536
+ strategies: RuntimeDeploymentCompositionEventStrategy[];
531
537
  }
532
538
  interface RuntimeDeploymentHeartbeat {
533
539
  deploymentId: string;
@@ -987,6 +993,13 @@ type SetStopLoss = (params: {
987
993
  direction: Direction;
988
994
  stopLossPrice: Sl;
989
995
  }) => Promise<boolean>;
996
+ type SetPositionProtection = (params: {
997
+ symbol: string;
998
+ direction: Direction;
999
+ qty?: number;
1000
+ takeProfits: Tp[];
1001
+ stopLossPrice: Sl;
1002
+ }) => Promise<boolean>;
990
1003
  type Kline = (options: KlineRequest) => Promise<KlineChartData>;
991
1004
  type GetTickers = (query?: TickerQuery) => Promise<Ticker[]>;
992
1005
  type ListInstruments = (query?: InstrumentQuery) => Promise<InstrumentDescriptor[]>;
@@ -1010,6 +1023,7 @@ interface Connector {
1010
1023
  getClosedPnl?: GetClosedPnl;
1011
1024
  getEntryExecutions?: GetEntryExecutions;
1012
1025
  placeOrder: PlaceOrder;
1026
+ setPositionProtection?: SetPositionProtection;
1013
1027
  setTakeProfits: SetTakeProfits;
1014
1028
  setStopLoss: SetStopLoss;
1015
1029
  closePosition: ClosePosition;
@@ -3098,6 +3112,7 @@ interface RuntimeStrategyTradeView {
3098
3112
  interface RuntimeStrategyRevisionChange {
3099
3113
  timestamp: number;
3100
3114
  strategyRevision: string;
3115
+ kind: 'strategy_package' | 'other';
3101
3116
  }
3102
3117
  interface RuntimeStrategyView {
3103
3118
  runtimeKey: string;
@@ -3140,4 +3155,4 @@ interface RuntimeStrategiesResponse {
3140
3155
  strategies: RuntimeStrategyView[];
3141
3156
  }
3142
3157
 
3143
- export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestPriceMode, type BacktestRunConfig, type BacktestWarningCode, type BacktestWarningCounts, type BaseContextGateFeatures, type BaseGateFeatureApproveBias, type BaseGateFeatureConfirmation, type BaseGateFeatureConflict, type BaseGateFeatureEntryLocation, type BaseGateFeaturePrimaryIssue, type BaseGateFeatureRiskLevel, type BaseGateFeatureScoreKey, type BaseHyperliquidWhaleFlowContext, type BaseIndicatorsHistorySnapshot, type BaseMarketBreadthContext, type BaseMarketBreadthsContext, type BaseMarketTradeFlowContext, type BaseMultiTimeframeContext, type BaseParticipationContext, type BasePsychologicalLevelAssetContext, type BasePsychologicalLevelWindowContext, type BaseRawIndicatorSnapshot, type BaseRegimeContext, type BaseRelativeContext, type BaseStrategyContextSnapshot, type BaseStructureContext, type Bot, type BotConfig, type BotResults, type BotStatus, type BuildStrategySignalDraft, type BuildStrategySignalParams, type Candle, type ChartColor, type ClosedPnlRecord, type CmcExchangeLiquidityRegime, type CmcFearGreedClassification, type CmcFearGreedRegime, type CompletedTest, type Connector, type ConnectorAccountResolver, type ConnectorCachedKlineFactory, type ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorLogger, type ConnectorPluginDefinition, type ConnectorRegistryEntry, type ConnectorRuntime, type CoreResearchTraceEvent, type CreateStrategyCore, type CreateStrategyCoreParams, DEFAULT_MARKET_UNIVERSE, type DerivativesContext, type DerivativesContextRiskFlag, type DerivativesInterval, type DerivativesIntervalContext, type DerivativesPressure, type DerivativesPriceOiDivergenceType, type DerivativesRow, type DerivativesSymbolContext, type DerivativesTargetDerivedContext, type Direction, type EOMPoint, type ExchangeEntryRecord, type ExecutionCostModel, type ExecutionCostQuality, type ExecutionCostSource, type Filters, type FundingRateHistoryRequest, type FundingRatePoint, type GetAggTrades, type GetClosedPnlParams, type GetFundingRateHistory, type GetOrderBookDepth, type GetTickers, type GetTopOfBookTicker, type GetTradingFeeRate, HYPERLIQUID_WHALE_DATA_MODEL_VERSION, type HyperliquidPositionAction, type HyperliquidWhaleCoverageRow, type HyperliquidWhaleFlowRow, type HyperliquidWhaleTradeEventRow, type Indicator, type IndicatorPluginComputeParams, type IndicatorPluginDefinition, type IndicatorPluginEntry, type IndicatorPluginFigureRenderer, type IndicatorPluginRenderer, type IndicatorSnapshot, type Indicators, type IndicatorsHistorySnapshot, type InstrumentDescriptor, type InstrumentKind, type InstrumentQuery, type InstrumentStatus, type Interval, type Item, type Items, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, type MarketBreadthRow, type MarketCmcExchangeLiquidityContextRow, type MarketCmcFearGreedContextRow, type MarketCmcIndexConstituent, type MarketCmcIndexContextRow, type MarketCmcIndexSlug, type MarketDataCapability, type MarketFeatureInterval, type MarketGlobalContextRow, type MarketGlobalContextSource, type MarketKlineEvent, type MarketReferenceAssetContextRow, type MarketTradeFlowRow, type MarketUniverse, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeRiskDecision, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategiesResponse, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeStrategyControlEvent, type RuntimeStrategyControlEventAction, type RuntimeStrategyControlState, type RuntimeStrategyDeclaration, type RuntimeStrategyPauseOverride, type RuntimeStrategyRevisionChange, type RuntimeStrategySelection, type RuntimeStrategyTradeSummary, type RuntimeStrategyTradeView, type RuntimeStrategyView, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, STRATEGY_EVIDENCE_MARKERS_SCHEMA, STRATEGY_LIVE_DIAGNOSIS_SCHEMA, STRATEGY_RELEASE_SCHEMA, type Signal, type SignalAnalysis, type SignalOrderStatus, type SimpleOrderLogData, type Sl, type SpreadRow, type Strategy, type StrategyAPI, type StrategyAPIEntryParams, type StrategyAPIExitParams, type StrategyAPIProtectParams, type StrategyAdditionalIndicatorsMap, type StrategyAiAdapter, type StrategyAiMode, type StrategyChartDetail, type StrategyChartMetric, type StrategyChartMetricTone, type StrategyChartOrder, type StrategyChartSnapshot, type StrategyChartsSnapshotResponse, type StrategyClosePlan, type StrategyConfig, type StrategyConfigGrid, type StrategyCoreRunner, type StrategyCreator, type StrategyCreatorParams, type StrategyDecision, type StrategyDecisionPriceContext, type StrategyDirectionPolicy, type StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, type StrategyEvidenceMarker, type StrategyEvidenceMarkerEnvelope, type StrategyEvidenceMarkerPayload, type StrategyEvidenceMarkerType, type StrategyEvidenceRetentionEntry, type StrategyEvidenceRetentionPlan, type StrategyFigureAnnotation, type StrategyFigureLine, type StrategyFigurePoint, type StrategyFigurePoints, type StrategyFigureZone, type StrategyHookAfterAiContext, type StrategyHookAfterDecisionContext, type StrategyHookAfterPlaceOrderContext, type StrategyHookAiContext, type StrategyHookAiSkippedReason, type StrategyHookBarContext, type StrategyHookBeforeCloseContext, type StrategyHookBeforeEntryGateContext, type StrategyHookBeforePlaceOrderContext, type StrategyHookCtx, type StrategyHookEnrichContext, type StrategyHookEntryContext, type StrategyHookErrorContext, type StrategyHookErrorPayload, type StrategyHookGateResult, type StrategyHookInitContext, type StrategyHookMarketContext, type StrategyHookMlContext, type StrategyHookMlSkippedReason, type StrategyHookOrderContext, type StrategyHookPolicyContext, type StrategyHookSkipContext, type StrategyHookStage, type StrategyIndicatorsContext, type StrategyIndicatorsMap, type StrategyIndicatorsState, type StrategyLastTradeController, type StrategyLastTradeControllerParams, type StrategyLiveDiagnosis, type StrategyLiveDiagnosisEnvelope, type StrategyLiveDiagnosisVerdict, type StrategyManifest, type StrategyMarketContextSource, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, type StrategyReleaseEnvelope, type StrategyReleaseEvidenceReference, type StrategyReleaseHistoricalWindow, type StrategyReleaseManifest, type StrategyReleaseReason, type StrategyReleaseResearchDecision, type StrategyReleaseResearchDecisionAction, type StrategyReleaseResearchDecisionBlocker, type StrategyReleaseResearchDecisionInput, type StrategyReleaseVerdict, type StrategyResultConfig, type StrategyResultEntry, type StrategyResults, type StrategyRuntimeAiOptions, type StrategyRuntimeMlOptions, type StrategySharedReplayStateGetter, type StrategySignalMetaParams, type StrategySignalPriceParams, type StrategyStateController, type StrategyStateControllerOptions, type Test, type TestClosedSignalResult, type TestCompare, type TestCompareList, type TestConnector, type TestConnectorContext, type TestConnectorCreator, type TestResult, type TestStat, type TestSuite, type TestThresholds, type TestThresholdsKey, type TestTradeExitReason, type TestTradeResult, type TestWorkerResult, type TestingBox, type TestingBoxResult, type TestingOptions, type ThresholdLevel, type Ticker, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, isMarketUniverse, resolveConnectorUniverse };
3158
+ export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestPriceMode, type BacktestRunConfig, type BacktestWarningCode, type BacktestWarningCounts, type BaseContextGateFeatures, type BaseGateFeatureApproveBias, type BaseGateFeatureConfirmation, type BaseGateFeatureConflict, type BaseGateFeatureEntryLocation, type BaseGateFeaturePrimaryIssue, type BaseGateFeatureRiskLevel, type BaseGateFeatureScoreKey, type BaseHyperliquidWhaleFlowContext, type BaseIndicatorsHistorySnapshot, type BaseMarketBreadthContext, type BaseMarketBreadthsContext, type BaseMarketTradeFlowContext, type BaseMultiTimeframeContext, type BaseParticipationContext, type BasePsychologicalLevelAssetContext, type BasePsychologicalLevelWindowContext, type BaseRawIndicatorSnapshot, type BaseRegimeContext, type BaseRelativeContext, type BaseStrategyContextSnapshot, type BaseStructureContext, type Bot, type BotConfig, type BotResults, type BotStatus, type BuildStrategySignalDraft, type BuildStrategySignalParams, type Candle, type ChartColor, type ClosedPnlRecord, type CmcExchangeLiquidityRegime, type CmcFearGreedClassification, type CmcFearGreedRegime, type CompletedTest, type Connector, type ConnectorAccountResolver, type ConnectorCachedKlineFactory, type ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorLogger, type ConnectorPluginDefinition, type ConnectorRegistryEntry, type ConnectorRuntime, type CoreResearchTraceEvent, type CreateStrategyCore, type CreateStrategyCoreParams, DEFAULT_MARKET_UNIVERSE, type DerivativesContext, type DerivativesContextRiskFlag, type DerivativesInterval, type DerivativesIntervalContext, type DerivativesPressure, type DerivativesPriceOiDivergenceType, type DerivativesRow, type DerivativesSymbolContext, type DerivativesTargetDerivedContext, type Direction, type EOMPoint, type ExchangeEntryRecord, type ExecutionCostModel, type ExecutionCostQuality, type ExecutionCostSource, type Filters, type FundingRateHistoryRequest, type FundingRatePoint, type GetAggTrades, type GetClosedPnlParams, type GetFundingRateHistory, type GetOrderBookDepth, type GetTickers, type GetTopOfBookTicker, type GetTradingFeeRate, HYPERLIQUID_WHALE_DATA_MODEL_VERSION, type HyperliquidPositionAction, type HyperliquidWhaleCoverageRow, type HyperliquidWhaleFlowRow, type HyperliquidWhaleTradeEventRow, type Indicator, type IndicatorPluginComputeParams, type IndicatorPluginDefinition, type IndicatorPluginEntry, type IndicatorPluginFigureRenderer, type IndicatorPluginRenderer, type IndicatorSnapshot, type Indicators, type IndicatorsHistorySnapshot, type InstrumentDescriptor, type InstrumentKind, type InstrumentQuery, type InstrumentStatus, type Interval, type Item, type Items, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, type MarketBreadthRow, type MarketCmcExchangeLiquidityContextRow, type MarketCmcFearGreedContextRow, type MarketCmcIndexConstituent, type MarketCmcIndexContextRow, type MarketCmcIndexSlug, type MarketDataCapability, type MarketFeatureInterval, type MarketGlobalContextRow, type MarketGlobalContextSource, type MarketKlineEvent, type MarketReferenceAssetContextRow, type MarketTradeFlowRow, type MarketUniverse, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentCompositionEventStrategy, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeRiskDecision, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategiesResponse, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeStrategyControlEvent, type RuntimeStrategyControlEventAction, type RuntimeStrategyControlState, type RuntimeStrategyDeclaration, type RuntimeStrategyPauseOverride, type RuntimeStrategyRevisionChange, type RuntimeStrategySelection, type RuntimeStrategyTradeSummary, type RuntimeStrategyTradeView, type RuntimeStrategyView, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, STRATEGY_EVIDENCE_MARKERS_SCHEMA, STRATEGY_LIVE_DIAGNOSIS_SCHEMA, STRATEGY_RELEASE_SCHEMA, type Signal, type SignalAnalysis, type SignalOrderStatus, type SimpleOrderLogData, type Sl, type SpreadRow, type Strategy, type StrategyAPI, type StrategyAPIEntryParams, type StrategyAPIExitParams, type StrategyAPIProtectParams, type StrategyAdditionalIndicatorsMap, type StrategyAiAdapter, type StrategyAiMode, type StrategyChartDetail, type StrategyChartMetric, type StrategyChartMetricTone, type StrategyChartOrder, type StrategyChartSnapshot, type StrategyChartsSnapshotResponse, type StrategyClosePlan, type StrategyConfig, type StrategyConfigGrid, type StrategyCoreRunner, type StrategyCreator, type StrategyCreatorParams, type StrategyDecision, type StrategyDecisionPriceContext, type StrategyDirectionPolicy, type StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, type StrategyEvidenceMarker, type StrategyEvidenceMarkerEnvelope, type StrategyEvidenceMarkerPayload, type StrategyEvidenceMarkerType, type StrategyEvidenceRetentionEntry, type StrategyEvidenceRetentionPlan, type StrategyFigureAnnotation, type StrategyFigureLine, type StrategyFigurePoint, type StrategyFigurePoints, type StrategyFigureZone, type StrategyHookAfterAiContext, type StrategyHookAfterDecisionContext, type StrategyHookAfterPlaceOrderContext, type StrategyHookAiContext, type StrategyHookAiSkippedReason, type StrategyHookBarContext, type StrategyHookBeforeCloseContext, type StrategyHookBeforeEntryGateContext, type StrategyHookBeforePlaceOrderContext, type StrategyHookCtx, type StrategyHookEnrichContext, type StrategyHookEntryContext, type StrategyHookErrorContext, type StrategyHookErrorPayload, type StrategyHookGateResult, type StrategyHookInitContext, type StrategyHookMarketContext, type StrategyHookMlContext, type StrategyHookMlSkippedReason, type StrategyHookOrderContext, type StrategyHookPolicyContext, type StrategyHookSkipContext, type StrategyHookStage, type StrategyIndicatorsContext, type StrategyIndicatorsMap, type StrategyIndicatorsState, type StrategyLastTradeController, type StrategyLastTradeControllerParams, type StrategyLiveDiagnosis, type StrategyLiveDiagnosisEnvelope, type StrategyLiveDiagnosisVerdict, type StrategyManifest, type StrategyMarketContextSource, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, type StrategyReleaseEnvelope, type StrategyReleaseEvidenceReference, type StrategyReleaseHistoricalWindow, type StrategyReleaseManifest, type StrategyReleaseReason, type StrategyReleaseResearchDecision, type StrategyReleaseResearchDecisionAction, type StrategyReleaseResearchDecisionBlocker, type StrategyReleaseResearchDecisionInput, type StrategyReleaseVerdict, type StrategyResultConfig, type StrategyResultEntry, type StrategyResults, type StrategyRuntimeAiOptions, type StrategyRuntimeMlOptions, type StrategySharedReplayStateGetter, type StrategySignalMetaParams, type StrategySignalPriceParams, type StrategyStateController, type StrategyStateControllerOptions, type Test, type TestClosedSignalResult, type TestCompare, type TestCompareList, type TestConnector, type TestConnectorContext, type TestConnectorCreator, type TestResult, type TestStat, type TestSuite, type TestThresholds, type TestThresholdsKey, type TestTradeExitReason, type TestTradeResult, type TestWorkerResult, type TestingBox, type TestingBoxResult, type TestingOptions, type ThresholdLevel, type Ticker, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, isMarketUniverse, resolveConnectorUniverse };
package/dist/index.d.ts CHANGED
@@ -521,13 +521,19 @@ interface RuntimeDeployment {
521
521
  tickers?: string[];
522
522
  }
523
523
  declare const RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA: "tradejs-runtime-deployment-composition-event/v1";
524
+ interface RuntimeDeploymentCompositionEventStrategy {
525
+ strategyName: string;
526
+ strategyRevision: string;
527
+ strategyPackage?: string;
528
+ strategyPackageVersion?: string;
529
+ }
524
530
  interface RuntimeDeploymentCompositionEvent {
525
531
  schema: typeof RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA;
526
532
  eventId: string;
527
533
  deploymentId: string;
528
534
  deploymentCompositionId: string;
529
535
  observedAt: number;
530
- strategies: Array<Pick<RuntimeDeploymentStrategy, 'strategyName' | 'strategyRevision'>>;
536
+ strategies: RuntimeDeploymentCompositionEventStrategy[];
531
537
  }
532
538
  interface RuntimeDeploymentHeartbeat {
533
539
  deploymentId: string;
@@ -987,6 +993,13 @@ type SetStopLoss = (params: {
987
993
  direction: Direction;
988
994
  stopLossPrice: Sl;
989
995
  }) => Promise<boolean>;
996
+ type SetPositionProtection = (params: {
997
+ symbol: string;
998
+ direction: Direction;
999
+ qty?: number;
1000
+ takeProfits: Tp[];
1001
+ stopLossPrice: Sl;
1002
+ }) => Promise<boolean>;
990
1003
  type Kline = (options: KlineRequest) => Promise<KlineChartData>;
991
1004
  type GetTickers = (query?: TickerQuery) => Promise<Ticker[]>;
992
1005
  type ListInstruments = (query?: InstrumentQuery) => Promise<InstrumentDescriptor[]>;
@@ -1010,6 +1023,7 @@ interface Connector {
1010
1023
  getClosedPnl?: GetClosedPnl;
1011
1024
  getEntryExecutions?: GetEntryExecutions;
1012
1025
  placeOrder: PlaceOrder;
1026
+ setPositionProtection?: SetPositionProtection;
1013
1027
  setTakeProfits: SetTakeProfits;
1014
1028
  setStopLoss: SetStopLoss;
1015
1029
  closePosition: ClosePosition;
@@ -3098,6 +3112,7 @@ interface RuntimeStrategyTradeView {
3098
3112
  interface RuntimeStrategyRevisionChange {
3099
3113
  timestamp: number;
3100
3114
  strategyRevision: string;
3115
+ kind: 'strategy_package' | 'other';
3101
3116
  }
3102
3117
  interface RuntimeStrategyView {
3103
3118
  runtimeKey: string;
@@ -3140,4 +3155,4 @@ interface RuntimeStrategiesResponse {
3140
3155
  strategies: RuntimeStrategyView[];
3141
3156
  }
3142
3157
 
3143
- export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestPriceMode, type BacktestRunConfig, type BacktestWarningCode, type BacktestWarningCounts, type BaseContextGateFeatures, type BaseGateFeatureApproveBias, type BaseGateFeatureConfirmation, type BaseGateFeatureConflict, type BaseGateFeatureEntryLocation, type BaseGateFeaturePrimaryIssue, type BaseGateFeatureRiskLevel, type BaseGateFeatureScoreKey, type BaseHyperliquidWhaleFlowContext, type BaseIndicatorsHistorySnapshot, type BaseMarketBreadthContext, type BaseMarketBreadthsContext, type BaseMarketTradeFlowContext, type BaseMultiTimeframeContext, type BaseParticipationContext, type BasePsychologicalLevelAssetContext, type BasePsychologicalLevelWindowContext, type BaseRawIndicatorSnapshot, type BaseRegimeContext, type BaseRelativeContext, type BaseStrategyContextSnapshot, type BaseStructureContext, type Bot, type BotConfig, type BotResults, type BotStatus, type BuildStrategySignalDraft, type BuildStrategySignalParams, type Candle, type ChartColor, type ClosedPnlRecord, type CmcExchangeLiquidityRegime, type CmcFearGreedClassification, type CmcFearGreedRegime, type CompletedTest, type Connector, type ConnectorAccountResolver, type ConnectorCachedKlineFactory, type ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorLogger, type ConnectorPluginDefinition, type ConnectorRegistryEntry, type ConnectorRuntime, type CoreResearchTraceEvent, type CreateStrategyCore, type CreateStrategyCoreParams, DEFAULT_MARKET_UNIVERSE, type DerivativesContext, type DerivativesContextRiskFlag, type DerivativesInterval, type DerivativesIntervalContext, type DerivativesPressure, type DerivativesPriceOiDivergenceType, type DerivativesRow, type DerivativesSymbolContext, type DerivativesTargetDerivedContext, type Direction, type EOMPoint, type ExchangeEntryRecord, type ExecutionCostModel, type ExecutionCostQuality, type ExecutionCostSource, type Filters, type FundingRateHistoryRequest, type FundingRatePoint, type GetAggTrades, type GetClosedPnlParams, type GetFundingRateHistory, type GetOrderBookDepth, type GetTickers, type GetTopOfBookTicker, type GetTradingFeeRate, HYPERLIQUID_WHALE_DATA_MODEL_VERSION, type HyperliquidPositionAction, type HyperliquidWhaleCoverageRow, type HyperliquidWhaleFlowRow, type HyperliquidWhaleTradeEventRow, type Indicator, type IndicatorPluginComputeParams, type IndicatorPluginDefinition, type IndicatorPluginEntry, type IndicatorPluginFigureRenderer, type IndicatorPluginRenderer, type IndicatorSnapshot, type Indicators, type IndicatorsHistorySnapshot, type InstrumentDescriptor, type InstrumentKind, type InstrumentQuery, type InstrumentStatus, type Interval, type Item, type Items, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, type MarketBreadthRow, type MarketCmcExchangeLiquidityContextRow, type MarketCmcFearGreedContextRow, type MarketCmcIndexConstituent, type MarketCmcIndexContextRow, type MarketCmcIndexSlug, type MarketDataCapability, type MarketFeatureInterval, type MarketGlobalContextRow, type MarketGlobalContextSource, type MarketKlineEvent, type MarketReferenceAssetContextRow, type MarketTradeFlowRow, type MarketUniverse, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeRiskDecision, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategiesResponse, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeStrategyControlEvent, type RuntimeStrategyControlEventAction, type RuntimeStrategyControlState, type RuntimeStrategyDeclaration, type RuntimeStrategyPauseOverride, type RuntimeStrategyRevisionChange, type RuntimeStrategySelection, type RuntimeStrategyTradeSummary, type RuntimeStrategyTradeView, type RuntimeStrategyView, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, STRATEGY_EVIDENCE_MARKERS_SCHEMA, STRATEGY_LIVE_DIAGNOSIS_SCHEMA, STRATEGY_RELEASE_SCHEMA, type Signal, type SignalAnalysis, type SignalOrderStatus, type SimpleOrderLogData, type Sl, type SpreadRow, type Strategy, type StrategyAPI, type StrategyAPIEntryParams, type StrategyAPIExitParams, type StrategyAPIProtectParams, type StrategyAdditionalIndicatorsMap, type StrategyAiAdapter, type StrategyAiMode, type StrategyChartDetail, type StrategyChartMetric, type StrategyChartMetricTone, type StrategyChartOrder, type StrategyChartSnapshot, type StrategyChartsSnapshotResponse, type StrategyClosePlan, type StrategyConfig, type StrategyConfigGrid, type StrategyCoreRunner, type StrategyCreator, type StrategyCreatorParams, type StrategyDecision, type StrategyDecisionPriceContext, type StrategyDirectionPolicy, type StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, type StrategyEvidenceMarker, type StrategyEvidenceMarkerEnvelope, type StrategyEvidenceMarkerPayload, type StrategyEvidenceMarkerType, type StrategyEvidenceRetentionEntry, type StrategyEvidenceRetentionPlan, type StrategyFigureAnnotation, type StrategyFigureLine, type StrategyFigurePoint, type StrategyFigurePoints, type StrategyFigureZone, type StrategyHookAfterAiContext, type StrategyHookAfterDecisionContext, type StrategyHookAfterPlaceOrderContext, type StrategyHookAiContext, type StrategyHookAiSkippedReason, type StrategyHookBarContext, type StrategyHookBeforeCloseContext, type StrategyHookBeforeEntryGateContext, type StrategyHookBeforePlaceOrderContext, type StrategyHookCtx, type StrategyHookEnrichContext, type StrategyHookEntryContext, type StrategyHookErrorContext, type StrategyHookErrorPayload, type StrategyHookGateResult, type StrategyHookInitContext, type StrategyHookMarketContext, type StrategyHookMlContext, type StrategyHookMlSkippedReason, type StrategyHookOrderContext, type StrategyHookPolicyContext, type StrategyHookSkipContext, type StrategyHookStage, type StrategyIndicatorsContext, type StrategyIndicatorsMap, type StrategyIndicatorsState, type StrategyLastTradeController, type StrategyLastTradeControllerParams, type StrategyLiveDiagnosis, type StrategyLiveDiagnosisEnvelope, type StrategyLiveDiagnosisVerdict, type StrategyManifest, type StrategyMarketContextSource, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, type StrategyReleaseEnvelope, type StrategyReleaseEvidenceReference, type StrategyReleaseHistoricalWindow, type StrategyReleaseManifest, type StrategyReleaseReason, type StrategyReleaseResearchDecision, type StrategyReleaseResearchDecisionAction, type StrategyReleaseResearchDecisionBlocker, type StrategyReleaseResearchDecisionInput, type StrategyReleaseVerdict, type StrategyResultConfig, type StrategyResultEntry, type StrategyResults, type StrategyRuntimeAiOptions, type StrategyRuntimeMlOptions, type StrategySharedReplayStateGetter, type StrategySignalMetaParams, type StrategySignalPriceParams, type StrategyStateController, type StrategyStateControllerOptions, type Test, type TestClosedSignalResult, type TestCompare, type TestCompareList, type TestConnector, type TestConnectorContext, type TestConnectorCreator, type TestResult, type TestStat, type TestSuite, type TestThresholds, type TestThresholdsKey, type TestTradeExitReason, type TestTradeResult, type TestWorkerResult, type TestingBox, type TestingBoxResult, type TestingOptions, type ThresholdLevel, type Ticker, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, isMarketUniverse, resolveConnectorUniverse };
3158
+ export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestPriceMode, type BacktestRunConfig, type BacktestWarningCode, type BacktestWarningCounts, type BaseContextGateFeatures, type BaseGateFeatureApproveBias, type BaseGateFeatureConfirmation, type BaseGateFeatureConflict, type BaseGateFeatureEntryLocation, type BaseGateFeaturePrimaryIssue, type BaseGateFeatureRiskLevel, type BaseGateFeatureScoreKey, type BaseHyperliquidWhaleFlowContext, type BaseIndicatorsHistorySnapshot, type BaseMarketBreadthContext, type BaseMarketBreadthsContext, type BaseMarketTradeFlowContext, type BaseMultiTimeframeContext, type BaseParticipationContext, type BasePsychologicalLevelAssetContext, type BasePsychologicalLevelWindowContext, type BaseRawIndicatorSnapshot, type BaseRegimeContext, type BaseRelativeContext, type BaseStrategyContextSnapshot, type BaseStructureContext, type Bot, type BotConfig, type BotResults, type BotStatus, type BuildStrategySignalDraft, type BuildStrategySignalParams, type Candle, type ChartColor, type ClosedPnlRecord, type CmcExchangeLiquidityRegime, type CmcFearGreedClassification, type CmcFearGreedRegime, type CompletedTest, type Connector, type ConnectorAccountResolver, type ConnectorCachedKlineFactory, type ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorLogger, type ConnectorPluginDefinition, type ConnectorRegistryEntry, type ConnectorRuntime, type CoreResearchTraceEvent, type CreateStrategyCore, type CreateStrategyCoreParams, DEFAULT_MARKET_UNIVERSE, type DerivativesContext, type DerivativesContextRiskFlag, type DerivativesInterval, type DerivativesIntervalContext, type DerivativesPressure, type DerivativesPriceOiDivergenceType, type DerivativesRow, type DerivativesSymbolContext, type DerivativesTargetDerivedContext, type Direction, type EOMPoint, type ExchangeEntryRecord, type ExecutionCostModel, type ExecutionCostQuality, type ExecutionCostSource, type Filters, type FundingRateHistoryRequest, type FundingRatePoint, type GetAggTrades, type GetClosedPnlParams, type GetFundingRateHistory, type GetOrderBookDepth, type GetTickers, type GetTopOfBookTicker, type GetTradingFeeRate, HYPERLIQUID_WHALE_DATA_MODEL_VERSION, type HyperliquidPositionAction, type HyperliquidWhaleCoverageRow, type HyperliquidWhaleFlowRow, type HyperliquidWhaleTradeEventRow, type Indicator, type IndicatorPluginComputeParams, type IndicatorPluginDefinition, type IndicatorPluginEntry, type IndicatorPluginFigureRenderer, type IndicatorPluginRenderer, type IndicatorSnapshot, type Indicators, type IndicatorsHistorySnapshot, type InstrumentDescriptor, type InstrumentKind, type InstrumentQuery, type InstrumentStatus, type Interval, type Item, type Items, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, type MarketBreadthRow, type MarketCmcExchangeLiquidityContextRow, type MarketCmcFearGreedContextRow, type MarketCmcIndexConstituent, type MarketCmcIndexContextRow, type MarketCmcIndexSlug, type MarketDataCapability, type MarketFeatureInterval, type MarketGlobalContextRow, type MarketGlobalContextSource, type MarketKlineEvent, type MarketReferenceAssetContextRow, type MarketTradeFlowRow, type MarketUniverse, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentCompositionEventStrategy, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeRiskDecision, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategiesResponse, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeStrategyControlEvent, type RuntimeStrategyControlEventAction, type RuntimeStrategyControlState, type RuntimeStrategyDeclaration, type RuntimeStrategyPauseOverride, type RuntimeStrategyRevisionChange, type RuntimeStrategySelection, type RuntimeStrategyTradeSummary, type RuntimeStrategyTradeView, type RuntimeStrategyView, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, STRATEGY_EVIDENCE_MARKERS_SCHEMA, STRATEGY_LIVE_DIAGNOSIS_SCHEMA, STRATEGY_RELEASE_SCHEMA, type Signal, type SignalAnalysis, type SignalOrderStatus, type SimpleOrderLogData, type Sl, type SpreadRow, type Strategy, type StrategyAPI, type StrategyAPIEntryParams, type StrategyAPIExitParams, type StrategyAPIProtectParams, type StrategyAdditionalIndicatorsMap, type StrategyAiAdapter, type StrategyAiMode, type StrategyChartDetail, type StrategyChartMetric, type StrategyChartMetricTone, type StrategyChartOrder, type StrategyChartSnapshot, type StrategyChartsSnapshotResponse, type StrategyClosePlan, type StrategyConfig, type StrategyConfigGrid, type StrategyCoreRunner, type StrategyCreator, type StrategyCreatorParams, type StrategyDecision, type StrategyDecisionPriceContext, type StrategyDirectionPolicy, type StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, type StrategyEvidenceMarker, type StrategyEvidenceMarkerEnvelope, type StrategyEvidenceMarkerPayload, type StrategyEvidenceMarkerType, type StrategyEvidenceRetentionEntry, type StrategyEvidenceRetentionPlan, type StrategyFigureAnnotation, type StrategyFigureLine, type StrategyFigurePoint, type StrategyFigurePoints, type StrategyFigureZone, type StrategyHookAfterAiContext, type StrategyHookAfterDecisionContext, type StrategyHookAfterPlaceOrderContext, type StrategyHookAiContext, type StrategyHookAiSkippedReason, type StrategyHookBarContext, type StrategyHookBeforeCloseContext, type StrategyHookBeforeEntryGateContext, type StrategyHookBeforePlaceOrderContext, type StrategyHookCtx, type StrategyHookEnrichContext, type StrategyHookEntryContext, type StrategyHookErrorContext, type StrategyHookErrorPayload, type StrategyHookGateResult, type StrategyHookInitContext, type StrategyHookMarketContext, type StrategyHookMlContext, type StrategyHookMlSkippedReason, type StrategyHookOrderContext, type StrategyHookPolicyContext, type StrategyHookSkipContext, type StrategyHookStage, type StrategyIndicatorsContext, type StrategyIndicatorsMap, type StrategyIndicatorsState, type StrategyLastTradeController, type StrategyLastTradeControllerParams, type StrategyLiveDiagnosis, type StrategyLiveDiagnosisEnvelope, type StrategyLiveDiagnosisVerdict, type StrategyManifest, type StrategyMarketContextSource, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, type StrategyReleaseEnvelope, type StrategyReleaseEvidenceReference, type StrategyReleaseHistoricalWindow, type StrategyReleaseManifest, type StrategyReleaseReason, type StrategyReleaseResearchDecision, type StrategyReleaseResearchDecisionAction, type StrategyReleaseResearchDecisionBlocker, type StrategyReleaseResearchDecisionInput, type StrategyReleaseVerdict, type StrategyResultConfig, type StrategyResultEntry, type StrategyResults, type StrategyRuntimeAiOptions, type StrategyRuntimeMlOptions, type StrategySharedReplayStateGetter, type StrategySignalMetaParams, type StrategySignalPriceParams, type StrategyStateController, type StrategyStateControllerOptions, type Test, type TestClosedSignalResult, type TestCompare, type TestCompareList, type TestConnector, type TestConnectorContext, type TestConnectorCreator, type TestResult, type TestStat, type TestSuite, type TestThresholds, type TestThresholdsKey, type TestTradeExitReason, type TestTradeResult, type TestWorkerResult, type TestingBox, type TestingBoxResult, type TestingOptions, type ThresholdLevel, type Ticker, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, isMarketUniverse, resolveConnectorUniverse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/types",
3
- "version": "3.1.28-beta.254",
3
+ "version": "3.1.28-beta.255",
4
4
  "description": "MIT-licensed shared TypeScript contracts for the TradeJS framework.",
5
5
  "keywords": [
6
6
  "tradejs",