@tradejs/types 3.1.29 → 3.1.30-beta.311

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
@@ -112,6 +112,109 @@ interface TickerProfileContext extends TickerProfile {
112
112
  snapshotId: string;
113
113
  }
114
114
 
115
+ declare const WORLD_NEWS_TYPES: readonly ["world.sanctions", "world.tradeRestrictions", "world.oil", "world.conflict"];
116
+ type WorldNewsType = (typeof WORLD_NEWS_TYPES)[number];
117
+ declare const WORLD_NEWS_MARKETS: readonly ["energy", "international-payments", "international-trade"];
118
+ type WorldNewsMarket = (typeof WORLD_NEWS_MARKETS)[number];
119
+ declare const WORLD_NEWS_PROVIDERS: readonly ["gdelt", "ofac", "federal-register", "eu-council", "opec", "un"];
120
+ declare const NEWS_TYPES: readonly ["us.cpi", "us.employment", "us.pce", "us.gdp", "us.trade", "eu.ecb.decision", "uk.boe.decision", "us.fomc.decision", "us.fomc.pressConference", "jp.boj.decision", "jp.cpi.national", "jp.cpi.tokyo", "venue.announcement", "official.statement", "social.opinion", "social.discussion", "world.sanctions", "world.tradeRestrictions", "world.oil", "world.conflict"];
121
+ type NewsType = (typeof NEWS_TYPES)[number];
122
+ declare const NEWS_PROVIDERS: readonly ["bls", "fed", "boj", "stat-jp", "bybit", "fed-press", "ecb", "boe", "bea", "x", "reddit", "gdelt", "ofac", "federal-register", "eu-council", "opec", "un"];
123
+ type NewsProvider = (typeof NEWS_PROVIDERS)[number];
124
+ interface NewsPublication {
125
+ author: string;
126
+ authorId?: string;
127
+ community?: string;
128
+ authority: 'official' | 'watchlist' | 'community';
129
+ symbols: string[];
130
+ stance: 'bullish' | 'bearish' | 'unknown';
131
+ stanceSymbol?: string;
132
+ title?: string;
133
+ category?: string;
134
+ }
135
+ interface NewsFact {
136
+ metric: string;
137
+ period: string;
138
+ unit: string;
139
+ actual: number;
140
+ consensus?: {
141
+ value: number;
142
+ availableAt: number;
143
+ sourceUrl?: string;
144
+ };
145
+ }
146
+ interface WorldNewsEvidence {
147
+ title: string;
148
+ countryCodes?: string[];
149
+ sourceCount?: number;
150
+ storyId?: string;
151
+ storyAvailableAt?: number;
152
+ affectedMarkets?: WorldNewsMarket[];
153
+ }
154
+ interface WorldNewsStory {
155
+ storyId: string;
156
+ type: NewsType;
157
+ title: string;
158
+ availableAt: number;
159
+ affectedMarkets: WorldNewsMarket[];
160
+ sources: Pick<NewsEvent, 'provider' | 'url' | 'availableAt' | 'precision'>[];
161
+ }
162
+ /** UTC epoch milliseconds. Each revision is immutable. */
163
+ interface NewsEvent {
164
+ eventId: string;
165
+ revision: number;
166
+ type: NewsType;
167
+ provider: NewsProvider;
168
+ url: string;
169
+ status: 'scheduled' | 'published' | 'cancelled';
170
+ availableAt: number;
171
+ scheduledAt: number | null;
172
+ publishedAt: number | null;
173
+ eventDay: string;
174
+ timeZone: 'America/New_York' | 'Asia/Tokyo' | 'Europe/Berlin' | 'Europe/London' | 'UTC';
175
+ precision: 'minute' | 'day';
176
+ provenance: 'observed' | 'reconstructed';
177
+ facts?: NewsFact[];
178
+ publication?: NewsPublication;
179
+ world?: WorldNewsEvidence;
180
+ }
181
+ interface NewsCoverage {
182
+ provider: NewsProvider;
183
+ start: number;
184
+ end: number;
185
+ provenance: NewsEvent['provenance'];
186
+ }
187
+ interface NewsArchive {
188
+ schemaVersion: 1;
189
+ events: NewsEvent[];
190
+ coverage: NewsCoverage[];
191
+ }
192
+ interface NewsGateFeatures {
193
+ recentType: NewsType | null;
194
+ upcomingType: NewsType | null;
195
+ minutesSinceRelease: number | null;
196
+ minutesToRelease: number | null;
197
+ surprise: number | null;
198
+ coreCpiSurprisePp?: number | null;
199
+ corePceSurprisePp?: number | null;
200
+ payrollsSurpriseJobs?: number | null;
201
+ policyRateSurprisePp?: number | null;
202
+ reactionBtcPct: number | null;
203
+ reactionRelativePct: number | null;
204
+ reactionBreadth: number | null;
205
+ }
206
+ interface NewsContext {
207
+ asOf: number;
208
+ status: 'available' | 'partial' | 'unavailable';
209
+ events: readonly NewsEvent[];
210
+ publications?: readonly NewsEvent[];
211
+ worldEvents?: readonly NewsEvent[];
212
+ worldStories?: readonly WorldNewsStory[];
213
+ worldCoverage?: readonly NewsProvider[];
214
+ coverage: readonly NewsProvider[];
215
+ features: NewsGateFeatures;
216
+ }
217
+
115
218
  interface StrategyIndicatorsContext<TIndicators = unknown> {
116
219
  indicators: TIndicators | undefined;
117
220
  baseContext?: BaseStrategyContextSnapshot;
@@ -787,6 +890,7 @@ type BaseGateFeatureRiskLevel = 'low' | 'medium' | 'high' | 'unknown';
787
890
  type BaseGateFeatureApproveBias = 'support' | 'neutral' | 'reject';
788
891
  type BaseGateFeaturePrimaryIssue = 'none' | 'mtf_conflict' | 'weak_structure' | 'weak_participation' | 'bad_execution' | 'market_context_against' | 'extreme_volatility' | 'crowded_derivatives';
789
892
  interface BaseContextGateFeatures {
893
+ news?: NewsGateFeatures;
790
894
  setup?: {
791
895
  rewardToVolatility: number | null;
792
896
  stopDistanceAtr: number | null;
@@ -832,6 +936,7 @@ interface BaseContextGateFeatures {
832
936
  };
833
937
  }
834
938
  interface BaseStrategyContextSnapshot {
939
+ news?: NewsContext;
835
940
  tickerProfile?: TickerProfileContext;
836
941
  candle: Candle;
837
942
  prevCandle: Candle | null;
@@ -1983,7 +2088,7 @@ interface AiFeatureSnapshot {
1983
2088
  }
1984
2089
 
1985
2090
  type Interval = '1' | '3' | '5' | '15' | '30' | '60' | '120' | '240' | '360' | '720' | 'D' | 'W' | 'M';
1986
- type Provider = 'bybit' | 'binance' | 'coinbase';
2091
+ type Provider = 'bybit' | 'binance' | 'coinbase' | 'hyperliquid';
1987
2092
  interface Candle {
1988
2093
  open: number;
1989
2094
  high: number;
@@ -3183,7 +3288,7 @@ interface StrategyHookAfterPlaceOrderContext {
3183
3288
  ai?: StrategyHookAiContext;
3184
3289
  order: StrategyHookOrderContext;
3185
3290
  }
3186
- type StrategyMarketContextSource = 'binance' | 'coinmarketcap' | 'derivatives' | 'hyperliquidWhales';
3291
+ type StrategyMarketContextSource = 'binance' | 'coinmarketcap' | 'derivatives' | 'hyperliquidWhales' | 'news';
3187
3292
  interface StrategyManifest {
3188
3293
  aiFeatures?: readonly AiFeatureDefinition[];
3189
3294
  name: string;
@@ -3826,4 +3931,4 @@ type DataBackfillJob = DataBackfillRequest & {
3826
3931
  error?: string;
3827
3932
  };
3828
3933
 
3829
- export { type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiFeatureDefinition, type AiFeaturePrimitive, type AiFeatureRole, type AiFeatureSnapshot, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestHistoryStorage, 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 CliBacktestRun, 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 DataBackfillJob, type DataBackfillRequest, type DataBackfillResult, type DataCoverage, type DataCoverageDataset, type DataCoverageDay, type DataCoverageSeriesDay, 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 JevConfig, type JevDimension, type JevEvidence, type JevFactProvenance, type JevFeature, type JevGateModel, type JevInput, type JevProviderConfig, type JevQuestionSet, type JevRecord, type JevResponse, type JevScoreAnswer, type JevScoreQuestion, type JevScores, type JevStudyRow, type JevTree, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, MCP_SCOPES, 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 McpJob, type McpPrincipal, type McpScope, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLeverage, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type PortfolioChildStrategy, type PortfolioCloseIntent, type PortfolioConfirmation, type PortfolioContext, type PortfolioEntryBatch, type PortfolioEntryCandidate, type PortfolioEntrySelection, type PortfolioObservation, type PortfolioOrderObservation, type PortfolioPolicyConfig, type PortfolioPosition, type PortfolioReplayExecution, type PortfolioReservation, type PortfolioState, type PortfolioStateStore, type PortfolioStrategyEntry, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type ReferenceMarketFrame, type ReferenceMarketsContext, type RegisteredStrategyEntry, type ResearchEntryDecision, type ResearchEntryPolicy, type ResearchEntryPredicate, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentCompositionEventStrategy, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLaunchReport, type RuntimeLaunchReportBindings, type RuntimeLaunchReportResponse, 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 SignalAssessment, 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 StrategyClosedCandlesRequest, type StrategyClosedCandlesSnapshot, 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 StrategyResearchRetention, 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 TickerProfile, type TickerProfileContext, type TickerProfileSnapshot, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, isMarketUniverse, resolveConnectorUniverse };
3934
+ export { type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiFeatureDefinition, type AiFeaturePrimitive, type AiFeatureRole, type AiFeatureSnapshot, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestHistoryStorage, 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 CliBacktestRun, 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 DataBackfillJob, type DataBackfillRequest, type DataBackfillResult, type DataCoverage, type DataCoverageDataset, type DataCoverageDay, type DataCoverageSeriesDay, 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 JevConfig, type JevDimension, type JevEvidence, type JevFactProvenance, type JevFeature, type JevGateModel, type JevInput, type JevProviderConfig, type JevQuestionSet, type JevRecord, type JevResponse, type JevScoreAnswer, type JevScoreQuestion, type JevScores, type JevStudyRow, type JevTree, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, MCP_SCOPES, 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 McpJob, type McpPrincipal, type McpScope, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, NEWS_PROVIDERS, NEWS_TYPES, type NewsArchive, type NewsContext, type NewsCoverage, type NewsEvent, type NewsFact, type NewsGateFeatures, type NewsProvider, type NewsPublication, type NewsType, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLeverage, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type PortfolioChildStrategy, type PortfolioCloseIntent, type PortfolioConfirmation, type PortfolioContext, type PortfolioEntryBatch, type PortfolioEntryCandidate, type PortfolioEntrySelection, type PortfolioObservation, type PortfolioOrderObservation, type PortfolioPolicyConfig, type PortfolioPosition, type PortfolioReplayExecution, type PortfolioReservation, type PortfolioState, type PortfolioStateStore, type PortfolioStrategyEntry, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type ReferenceMarketFrame, type ReferenceMarketsContext, type RegisteredStrategyEntry, type ResearchEntryDecision, type ResearchEntryPolicy, type ResearchEntryPredicate, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentCompositionEventStrategy, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLaunchReport, type RuntimeLaunchReportBindings, type RuntimeLaunchReportResponse, 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 SignalAssessment, 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 StrategyClosedCandlesRequest, type StrategyClosedCandlesSnapshot, 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 StrategyResearchRetention, 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 TickerProfile, type TickerProfileContext, type TickerProfileSnapshot, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, WORLD_NEWS_MARKETS, WORLD_NEWS_PROVIDERS, WORLD_NEWS_TYPES, type WorldNewsEvidence, type WorldNewsMarket, type WorldNewsStory, type WorldNewsType, isMarketUniverse, resolveConnectorUniverse };
package/dist/index.d.ts CHANGED
@@ -112,6 +112,109 @@ interface TickerProfileContext extends TickerProfile {
112
112
  snapshotId: string;
113
113
  }
114
114
 
115
+ declare const WORLD_NEWS_TYPES: readonly ["world.sanctions", "world.tradeRestrictions", "world.oil", "world.conflict"];
116
+ type WorldNewsType = (typeof WORLD_NEWS_TYPES)[number];
117
+ declare const WORLD_NEWS_MARKETS: readonly ["energy", "international-payments", "international-trade"];
118
+ type WorldNewsMarket = (typeof WORLD_NEWS_MARKETS)[number];
119
+ declare const WORLD_NEWS_PROVIDERS: readonly ["gdelt", "ofac", "federal-register", "eu-council", "opec", "un"];
120
+ declare const NEWS_TYPES: readonly ["us.cpi", "us.employment", "us.pce", "us.gdp", "us.trade", "eu.ecb.decision", "uk.boe.decision", "us.fomc.decision", "us.fomc.pressConference", "jp.boj.decision", "jp.cpi.national", "jp.cpi.tokyo", "venue.announcement", "official.statement", "social.opinion", "social.discussion", "world.sanctions", "world.tradeRestrictions", "world.oil", "world.conflict"];
121
+ type NewsType = (typeof NEWS_TYPES)[number];
122
+ declare const NEWS_PROVIDERS: readonly ["bls", "fed", "boj", "stat-jp", "bybit", "fed-press", "ecb", "boe", "bea", "x", "reddit", "gdelt", "ofac", "federal-register", "eu-council", "opec", "un"];
123
+ type NewsProvider = (typeof NEWS_PROVIDERS)[number];
124
+ interface NewsPublication {
125
+ author: string;
126
+ authorId?: string;
127
+ community?: string;
128
+ authority: 'official' | 'watchlist' | 'community';
129
+ symbols: string[];
130
+ stance: 'bullish' | 'bearish' | 'unknown';
131
+ stanceSymbol?: string;
132
+ title?: string;
133
+ category?: string;
134
+ }
135
+ interface NewsFact {
136
+ metric: string;
137
+ period: string;
138
+ unit: string;
139
+ actual: number;
140
+ consensus?: {
141
+ value: number;
142
+ availableAt: number;
143
+ sourceUrl?: string;
144
+ };
145
+ }
146
+ interface WorldNewsEvidence {
147
+ title: string;
148
+ countryCodes?: string[];
149
+ sourceCount?: number;
150
+ storyId?: string;
151
+ storyAvailableAt?: number;
152
+ affectedMarkets?: WorldNewsMarket[];
153
+ }
154
+ interface WorldNewsStory {
155
+ storyId: string;
156
+ type: NewsType;
157
+ title: string;
158
+ availableAt: number;
159
+ affectedMarkets: WorldNewsMarket[];
160
+ sources: Pick<NewsEvent, 'provider' | 'url' | 'availableAt' | 'precision'>[];
161
+ }
162
+ /** UTC epoch milliseconds. Each revision is immutable. */
163
+ interface NewsEvent {
164
+ eventId: string;
165
+ revision: number;
166
+ type: NewsType;
167
+ provider: NewsProvider;
168
+ url: string;
169
+ status: 'scheduled' | 'published' | 'cancelled';
170
+ availableAt: number;
171
+ scheduledAt: number | null;
172
+ publishedAt: number | null;
173
+ eventDay: string;
174
+ timeZone: 'America/New_York' | 'Asia/Tokyo' | 'Europe/Berlin' | 'Europe/London' | 'UTC';
175
+ precision: 'minute' | 'day';
176
+ provenance: 'observed' | 'reconstructed';
177
+ facts?: NewsFact[];
178
+ publication?: NewsPublication;
179
+ world?: WorldNewsEvidence;
180
+ }
181
+ interface NewsCoverage {
182
+ provider: NewsProvider;
183
+ start: number;
184
+ end: number;
185
+ provenance: NewsEvent['provenance'];
186
+ }
187
+ interface NewsArchive {
188
+ schemaVersion: 1;
189
+ events: NewsEvent[];
190
+ coverage: NewsCoverage[];
191
+ }
192
+ interface NewsGateFeatures {
193
+ recentType: NewsType | null;
194
+ upcomingType: NewsType | null;
195
+ minutesSinceRelease: number | null;
196
+ minutesToRelease: number | null;
197
+ surprise: number | null;
198
+ coreCpiSurprisePp?: number | null;
199
+ corePceSurprisePp?: number | null;
200
+ payrollsSurpriseJobs?: number | null;
201
+ policyRateSurprisePp?: number | null;
202
+ reactionBtcPct: number | null;
203
+ reactionRelativePct: number | null;
204
+ reactionBreadth: number | null;
205
+ }
206
+ interface NewsContext {
207
+ asOf: number;
208
+ status: 'available' | 'partial' | 'unavailable';
209
+ events: readonly NewsEvent[];
210
+ publications?: readonly NewsEvent[];
211
+ worldEvents?: readonly NewsEvent[];
212
+ worldStories?: readonly WorldNewsStory[];
213
+ worldCoverage?: readonly NewsProvider[];
214
+ coverage: readonly NewsProvider[];
215
+ features: NewsGateFeatures;
216
+ }
217
+
115
218
  interface StrategyIndicatorsContext<TIndicators = unknown> {
116
219
  indicators: TIndicators | undefined;
117
220
  baseContext?: BaseStrategyContextSnapshot;
@@ -787,6 +890,7 @@ type BaseGateFeatureRiskLevel = 'low' | 'medium' | 'high' | 'unknown';
787
890
  type BaseGateFeatureApproveBias = 'support' | 'neutral' | 'reject';
788
891
  type BaseGateFeaturePrimaryIssue = 'none' | 'mtf_conflict' | 'weak_structure' | 'weak_participation' | 'bad_execution' | 'market_context_against' | 'extreme_volatility' | 'crowded_derivatives';
789
892
  interface BaseContextGateFeatures {
893
+ news?: NewsGateFeatures;
790
894
  setup?: {
791
895
  rewardToVolatility: number | null;
792
896
  stopDistanceAtr: number | null;
@@ -832,6 +936,7 @@ interface BaseContextGateFeatures {
832
936
  };
833
937
  }
834
938
  interface BaseStrategyContextSnapshot {
939
+ news?: NewsContext;
835
940
  tickerProfile?: TickerProfileContext;
836
941
  candle: Candle;
837
942
  prevCandle: Candle | null;
@@ -1983,7 +2088,7 @@ interface AiFeatureSnapshot {
1983
2088
  }
1984
2089
 
1985
2090
  type Interval = '1' | '3' | '5' | '15' | '30' | '60' | '120' | '240' | '360' | '720' | 'D' | 'W' | 'M';
1986
- type Provider = 'bybit' | 'binance' | 'coinbase';
2091
+ type Provider = 'bybit' | 'binance' | 'coinbase' | 'hyperliquid';
1987
2092
  interface Candle {
1988
2093
  open: number;
1989
2094
  high: number;
@@ -3183,7 +3288,7 @@ interface StrategyHookAfterPlaceOrderContext {
3183
3288
  ai?: StrategyHookAiContext;
3184
3289
  order: StrategyHookOrderContext;
3185
3290
  }
3186
- type StrategyMarketContextSource = 'binance' | 'coinmarketcap' | 'derivatives' | 'hyperliquidWhales';
3291
+ type StrategyMarketContextSource = 'binance' | 'coinmarketcap' | 'derivatives' | 'hyperliquidWhales' | 'news';
3187
3292
  interface StrategyManifest {
3188
3293
  aiFeatures?: readonly AiFeatureDefinition[];
3189
3294
  name: string;
@@ -3826,4 +3931,4 @@ type DataBackfillJob = DataBackfillRequest & {
3826
3931
  error?: string;
3827
3932
  };
3828
3933
 
3829
- export { type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiFeatureDefinition, type AiFeaturePrimitive, type AiFeatureRole, type AiFeatureSnapshot, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestHistoryStorage, 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 CliBacktestRun, 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 DataBackfillJob, type DataBackfillRequest, type DataBackfillResult, type DataCoverage, type DataCoverageDataset, type DataCoverageDay, type DataCoverageSeriesDay, 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 JevConfig, type JevDimension, type JevEvidence, type JevFactProvenance, type JevFeature, type JevGateModel, type JevInput, type JevProviderConfig, type JevQuestionSet, type JevRecord, type JevResponse, type JevScoreAnswer, type JevScoreQuestion, type JevScores, type JevStudyRow, type JevTree, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, MCP_SCOPES, 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 McpJob, type McpPrincipal, type McpScope, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLeverage, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type PortfolioChildStrategy, type PortfolioCloseIntent, type PortfolioConfirmation, type PortfolioContext, type PortfolioEntryBatch, type PortfolioEntryCandidate, type PortfolioEntrySelection, type PortfolioObservation, type PortfolioOrderObservation, type PortfolioPolicyConfig, type PortfolioPosition, type PortfolioReplayExecution, type PortfolioReservation, type PortfolioState, type PortfolioStateStore, type PortfolioStrategyEntry, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type ReferenceMarketFrame, type ReferenceMarketsContext, type RegisteredStrategyEntry, type ResearchEntryDecision, type ResearchEntryPolicy, type ResearchEntryPredicate, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentCompositionEventStrategy, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLaunchReport, type RuntimeLaunchReportBindings, type RuntimeLaunchReportResponse, 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 SignalAssessment, 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 StrategyClosedCandlesRequest, type StrategyClosedCandlesSnapshot, 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 StrategyResearchRetention, 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 TickerProfile, type TickerProfileContext, type TickerProfileSnapshot, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, isMarketUniverse, resolveConnectorUniverse };
3934
+ export { type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiFeatureDefinition, type AiFeaturePrimitive, type AiFeatureRole, type AiFeatureSnapshot, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, type BacktestExecutionCosts, type BacktestHistoryStorage, 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 CliBacktestRun, 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 DataBackfillJob, type DataBackfillRequest, type DataBackfillResult, type DataCoverage, type DataCoverageDataset, type DataCoverageDay, type DataCoverageSeriesDay, 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 JevConfig, type JevDimension, type JevEvidence, type JevFactProvenance, type JevFeature, type JevGateModel, type JevInput, type JevProviderConfig, type JevQuestionSet, type JevRecord, type JevResponse, type JevScoreAnswer, type JevScoreQuestion, type JevScores, type JevStudyRow, type JevTree, type Kline, type KlineChartData, type KlineChartItem, type KlineRequest, type ListInstruments, MCP_SCOPES, 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 McpJob, type McpPrincipal, type McpScope, type MetricThreshold, type Metrics, type MinimalStat, type MlCandleIndicatorsSnapshot, type MonthlyEquityStats, NEWS_PROVIDERS, NEWS_TYPES, type NewsArchive, type NewsContext, type NewsCoverage, type NewsEvent, type NewsFact, type NewsGateFeatures, type NewsProvider, type NewsPublication, type NewsType, type OnChangeCompare, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLeverage, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type PortfolioChildStrategy, type PortfolioCloseIntent, type PortfolioConfirmation, type PortfolioContext, type PortfolioEntryBatch, type PortfolioEntryCandidate, type PortfolioEntrySelection, type PortfolioObservation, type PortfolioOrderObservation, type PortfolioPolicyConfig, type PortfolioPosition, type PortfolioReplayExecution, type PortfolioReservation, type PortfolioState, type PortfolioStateStore, type PortfolioStrategyEntry, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, RUNTIME_CONTROLS_SCHEMA, RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA, type ReferenceMarketFrame, type ReferenceMarketsContext, type RegisteredStrategyEntry, type ResearchEntryDecision, type ResearchEntryPolicy, type ResearchEntryPredicate, type RuntimeAiAnalysisSnapshot, type RuntimeAllocatorDecision, type RuntimeControls, type RuntimeDeployment, type RuntimeDeploymentCompositionEvent, type RuntimeDeploymentCompositionEventStrategy, type RuntimeDeploymentDeclaration, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLaunchReport, type RuntimeLaunchReportBindings, type RuntimeLaunchReportResponse, 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 SignalAssessment, 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 StrategyClosedCandlesRequest, type StrategyClosedCandlesSnapshot, 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 StrategyResearchRetention, 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 TickerProfile, type TickerProfileContext, type TickerProfileSnapshot, type TickerQuery, type TopOfBookTicker, type Tp, type TradejsRuntimeDeclaration, type TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, WORLD_NEWS_MARKETS, WORLD_NEWS_PROVIDERS, WORLD_NEWS_TYPES, type WorldNewsEvidence, type WorldNewsMarket, type WorldNewsStory, type WorldNewsType, isMarketUniverse, resolveConnectorUniverse };
package/dist/index.js CHANGED
@@ -24,11 +24,16 @@ __export(index_exports, {
24
24
  DEFAULT_MARKET_UNIVERSE: () => DEFAULT_MARKET_UNIVERSE,
25
25
  HYPERLIQUID_WHALE_DATA_MODEL_VERSION: () => HYPERLIQUID_WHALE_DATA_MODEL_VERSION,
26
26
  MCP_SCOPES: () => MCP_SCOPES,
27
+ NEWS_PROVIDERS: () => NEWS_PROVIDERS,
28
+ NEWS_TYPES: () => NEWS_TYPES,
27
29
  RUNTIME_CONTROLS_SCHEMA: () => RUNTIME_CONTROLS_SCHEMA,
28
30
  RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA: () => RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA,
29
31
  STRATEGY_EVIDENCE_MARKERS_SCHEMA: () => STRATEGY_EVIDENCE_MARKERS_SCHEMA,
30
32
  STRATEGY_LIVE_DIAGNOSIS_SCHEMA: () => STRATEGY_LIVE_DIAGNOSIS_SCHEMA,
31
33
  STRATEGY_RELEASE_SCHEMA: () => STRATEGY_RELEASE_SCHEMA,
34
+ WORLD_NEWS_MARKETS: () => WORLD_NEWS_MARKETS,
35
+ WORLD_NEWS_PROVIDERS: () => WORLD_NEWS_PROVIDERS,
36
+ WORLD_NEWS_TYPES: () => WORLD_NEWS_TYPES,
32
37
  isMarketUniverse: () => isMarketUniverse,
33
38
  resolveConnectorUniverse: () => resolveConnectorUniverse
34
39
  });
@@ -78,17 +83,76 @@ var MCP_SCOPES = [
78
83
  "diagnostics:run",
79
84
  "research:read"
80
85
  ];
86
+
87
+ // src/news.ts
88
+ var WORLD_NEWS_TYPES = [
89
+ "world.sanctions",
90
+ "world.tradeRestrictions",
91
+ "world.oil",
92
+ "world.conflict"
93
+ ];
94
+ var WORLD_NEWS_MARKETS = [
95
+ "energy",
96
+ "international-payments",
97
+ "international-trade"
98
+ ];
99
+ var WORLD_NEWS_PROVIDERS = [
100
+ "gdelt",
101
+ "ofac",
102
+ "federal-register",
103
+ "eu-council",
104
+ "opec",
105
+ "un"
106
+ ];
107
+ var NEWS_TYPES = [
108
+ "us.cpi",
109
+ "us.employment",
110
+ "us.pce",
111
+ "us.gdp",
112
+ "us.trade",
113
+ "eu.ecb.decision",
114
+ "uk.boe.decision",
115
+ "us.fomc.decision",
116
+ "us.fomc.pressConference",
117
+ "jp.boj.decision",
118
+ "jp.cpi.national",
119
+ "jp.cpi.tokyo",
120
+ "venue.announcement",
121
+ "official.statement",
122
+ "social.opinion",
123
+ "social.discussion",
124
+ ...WORLD_NEWS_TYPES
125
+ ];
126
+ var NEWS_PROVIDERS = [
127
+ "bls",
128
+ "fed",
129
+ "boj",
130
+ "stat-jp",
131
+ "bybit",
132
+ "fed-press",
133
+ "ecb",
134
+ "boe",
135
+ "bea",
136
+ "x",
137
+ "reddit",
138
+ ...WORLD_NEWS_PROVIDERS
139
+ ];
81
140
  // Annotate the CommonJS export names for ESM import in node:
82
141
  0 && (module.exports = {
83
142
  BACKTEST_WARNING_CODES,
84
143
  DEFAULT_MARKET_UNIVERSE,
85
144
  HYPERLIQUID_WHALE_DATA_MODEL_VERSION,
86
145
  MCP_SCOPES,
146
+ NEWS_PROVIDERS,
147
+ NEWS_TYPES,
87
148
  RUNTIME_CONTROLS_SCHEMA,
88
149
  RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA,
89
150
  STRATEGY_EVIDENCE_MARKERS_SCHEMA,
90
151
  STRATEGY_LIVE_DIAGNOSIS_SCHEMA,
91
152
  STRATEGY_RELEASE_SCHEMA,
153
+ WORLD_NEWS_MARKETS,
154
+ WORLD_NEWS_PROVIDERS,
155
+ WORLD_NEWS_TYPES,
92
156
  isMarketUniverse,
93
157
  resolveConnectorUniverse
94
158
  });
package/dist/index.mjs CHANGED
@@ -42,16 +42,75 @@ var MCP_SCOPES = [
42
42
  "diagnostics:run",
43
43
  "research:read"
44
44
  ];
45
+
46
+ // src/news.ts
47
+ var WORLD_NEWS_TYPES = [
48
+ "world.sanctions",
49
+ "world.tradeRestrictions",
50
+ "world.oil",
51
+ "world.conflict"
52
+ ];
53
+ var WORLD_NEWS_MARKETS = [
54
+ "energy",
55
+ "international-payments",
56
+ "international-trade"
57
+ ];
58
+ var WORLD_NEWS_PROVIDERS = [
59
+ "gdelt",
60
+ "ofac",
61
+ "federal-register",
62
+ "eu-council",
63
+ "opec",
64
+ "un"
65
+ ];
66
+ var NEWS_TYPES = [
67
+ "us.cpi",
68
+ "us.employment",
69
+ "us.pce",
70
+ "us.gdp",
71
+ "us.trade",
72
+ "eu.ecb.decision",
73
+ "uk.boe.decision",
74
+ "us.fomc.decision",
75
+ "us.fomc.pressConference",
76
+ "jp.boj.decision",
77
+ "jp.cpi.national",
78
+ "jp.cpi.tokyo",
79
+ "venue.announcement",
80
+ "official.statement",
81
+ "social.opinion",
82
+ "social.discussion",
83
+ ...WORLD_NEWS_TYPES
84
+ ];
85
+ var NEWS_PROVIDERS = [
86
+ "bls",
87
+ "fed",
88
+ "boj",
89
+ "stat-jp",
90
+ "bybit",
91
+ "fed-press",
92
+ "ecb",
93
+ "boe",
94
+ "bea",
95
+ "x",
96
+ "reddit",
97
+ ...WORLD_NEWS_PROVIDERS
98
+ ];
45
99
  export {
46
100
  BACKTEST_WARNING_CODES,
47
101
  DEFAULT_MARKET_UNIVERSE,
48
102
  HYPERLIQUID_WHALE_DATA_MODEL_VERSION,
49
103
  MCP_SCOPES,
104
+ NEWS_PROVIDERS,
105
+ NEWS_TYPES,
50
106
  RUNTIME_CONTROLS_SCHEMA,
51
107
  RUNTIME_DEPLOYMENT_COMPOSITION_EVENT_SCHEMA,
52
108
  STRATEGY_EVIDENCE_MARKERS_SCHEMA,
53
109
  STRATEGY_LIVE_DIAGNOSIS_SCHEMA,
54
110
  STRATEGY_RELEASE_SCHEMA,
111
+ WORLD_NEWS_MARKETS,
112
+ WORLD_NEWS_PROVIDERS,
113
+ WORLD_NEWS_TYPES,
55
114
  isMarketUniverse,
56
115
  resolveConnectorUniverse
57
116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/types",
3
- "version": "3.1.29",
3
+ "version": "3.1.30-beta.311",
4
4
  "description": "MIT-licensed shared TypeScript contracts for the TradeJS framework.",
5
5
  "keywords": [
6
6
  "tradejs",