@tradejs/types 2.0.13 → 2.0.14
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 +136 -3
- package/dist/index.d.ts +136 -3
- package/dist/index.js +5 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -392,6 +392,70 @@ type MarketTradeFlowRow = {
|
|
|
392
392
|
buyPressurePct?: number | null;
|
|
393
393
|
source?: string | null;
|
|
394
394
|
};
|
|
395
|
+
type HyperliquidWhaleTradeEventRow = {
|
|
396
|
+
symbol: string;
|
|
397
|
+
ts: Date;
|
|
398
|
+
tid: string;
|
|
399
|
+
price: number;
|
|
400
|
+
size: number;
|
|
401
|
+
notionalUsd: number;
|
|
402
|
+
buyerAddress?: string | null;
|
|
403
|
+
sellerAddress?: string | null;
|
|
404
|
+
buyerTracked: boolean;
|
|
405
|
+
sellerTracked: boolean;
|
|
406
|
+
buyerStartPosition?: number | null;
|
|
407
|
+
buyerEndPosition?: number | null;
|
|
408
|
+
buyerPositionAction?: HyperliquidPositionAction | null;
|
|
409
|
+
buyerClosedPnl?: number | null;
|
|
410
|
+
buyerLiquidation?: boolean | null;
|
|
411
|
+
sellerStartPosition?: number | null;
|
|
412
|
+
sellerEndPosition?: number | null;
|
|
413
|
+
sellerPositionAction?: HyperliquidPositionAction | null;
|
|
414
|
+
sellerClosedPnl?: number | null;
|
|
415
|
+
sellerLiquidation?: boolean | null;
|
|
416
|
+
universeFingerprint: string;
|
|
417
|
+
whaleRegistryFingerprint: string;
|
|
418
|
+
source?: string | null;
|
|
419
|
+
};
|
|
420
|
+
type HyperliquidPositionAction = 'open' | 'increase' | 'reduce' | 'close' | 'flip';
|
|
421
|
+
type HyperliquidWhaleFlowRow = {
|
|
422
|
+
symbol: string;
|
|
423
|
+
interval: '1m';
|
|
424
|
+
ts: Date;
|
|
425
|
+
trades: number;
|
|
426
|
+
whaleSides: number;
|
|
427
|
+
uniqueWhales: number;
|
|
428
|
+
whaleAddresses?: string[];
|
|
429
|
+
buyNotionalUsd: number;
|
|
430
|
+
sellNotionalUsd: number;
|
|
431
|
+
netNotionalUsd: number;
|
|
432
|
+
buySharePct?: number | null;
|
|
433
|
+
positionAwareWhaleSides: number;
|
|
434
|
+
longEntryWhaleAddresses?: string[];
|
|
435
|
+
shortEntryWhaleAddresses?: string[];
|
|
436
|
+
longExitWhaleAddresses?: string[];
|
|
437
|
+
shortExitWhaleAddresses?: string[];
|
|
438
|
+
longEntryNotionalUsd: number;
|
|
439
|
+
shortEntryNotionalUsd: number;
|
|
440
|
+
longExitNotionalUsd: number;
|
|
441
|
+
shortExitNotionalUsd: number;
|
|
442
|
+
entryNetNotionalUsd: number;
|
|
443
|
+
entryLongSharePct?: number | null;
|
|
444
|
+
universeFingerprint: string;
|
|
445
|
+
whaleRegistryFingerprint: string;
|
|
446
|
+
source?: string | null;
|
|
447
|
+
};
|
|
448
|
+
declare const HYPERLIQUID_WHALE_DATA_MODEL_VERSION = 3;
|
|
449
|
+
type HyperliquidWhaleCoverageRow = {
|
|
450
|
+
ts: Date;
|
|
451
|
+
coveredWhales: number;
|
|
452
|
+
expectedWhales: number;
|
|
453
|
+
coveragePct: number;
|
|
454
|
+
dataModelVersion?: number;
|
|
455
|
+
universeFingerprint: string;
|
|
456
|
+
whaleRegistryFingerprint: string;
|
|
457
|
+
source?: string | null;
|
|
458
|
+
};
|
|
395
459
|
interface Tp {
|
|
396
460
|
price: number;
|
|
397
461
|
rate: number;
|
|
@@ -799,6 +863,7 @@ interface RuntimeLineage {
|
|
|
799
863
|
gateFingerprint: string;
|
|
800
864
|
configFingerprint: string;
|
|
801
865
|
contextFingerprint: string;
|
|
866
|
+
maxLossValue?: number | null;
|
|
802
867
|
}
|
|
803
868
|
type RuntimeTradeStatus = 'active' | 'closed';
|
|
804
869
|
type RuntimeTradeExitType = 'exit' | 'tp' | 'sl' | 'unknown';
|
|
@@ -1622,6 +1687,40 @@ interface BaseMarketTradeFlowContext {
|
|
|
1622
1687
|
netBaseDelta: number | null;
|
|
1623
1688
|
netQuoteDelta: number | null;
|
|
1624
1689
|
}
|
|
1690
|
+
interface BaseHyperliquidWhaleFlowContext {
|
|
1691
|
+
source: 'hyperliquid_trades' | 'hyperliquid_user_fills';
|
|
1692
|
+
interval: MarketFeatureInterval;
|
|
1693
|
+
asOfTs: number | null;
|
|
1694
|
+
windowEndTs: number;
|
|
1695
|
+
ageMs: number | null;
|
|
1696
|
+
stale: boolean;
|
|
1697
|
+
symbol: string;
|
|
1698
|
+
trades: number;
|
|
1699
|
+
whaleSides: number;
|
|
1700
|
+
uniqueWhales: number;
|
|
1701
|
+
coveredWhales: number;
|
|
1702
|
+
expectedWhales: number;
|
|
1703
|
+
coveragePct: number;
|
|
1704
|
+
coverageSufficient: boolean;
|
|
1705
|
+
buyNotionalUsd: number;
|
|
1706
|
+
sellNotionalUsd: number;
|
|
1707
|
+
netNotionalUsd: number;
|
|
1708
|
+
buySharePct: number | null;
|
|
1709
|
+
positionAwareWhaleSides: number;
|
|
1710
|
+
positionAwarePct: number;
|
|
1711
|
+
longEntryWhales: number;
|
|
1712
|
+
shortEntryWhales: number;
|
|
1713
|
+
longExitWhales: number;
|
|
1714
|
+
shortExitWhales: number;
|
|
1715
|
+
longEntryNotionalUsd: number;
|
|
1716
|
+
shortEntryNotionalUsd: number;
|
|
1717
|
+
longExitNotionalUsd: number;
|
|
1718
|
+
shortExitNotionalUsd: number;
|
|
1719
|
+
entryNetNotionalUsd: number;
|
|
1720
|
+
entryLongSharePct: number | null;
|
|
1721
|
+
universeFingerprint: string;
|
|
1722
|
+
whaleRegistryFingerprint: string;
|
|
1723
|
+
}
|
|
1625
1724
|
interface BaseParticipationContext {
|
|
1626
1725
|
volume: {
|
|
1627
1726
|
volumeRel20: number | null;
|
|
@@ -1663,6 +1762,7 @@ interface BaseParticipationContext {
|
|
|
1663
1762
|
deltaDivergenceVsPrice: 'bullish' | 'bearish' | 'none' | 'unknown';
|
|
1664
1763
|
};
|
|
1665
1764
|
tradeFlow?: BaseMarketTradeFlowContext;
|
|
1765
|
+
hyperliquidWhales?: BaseHyperliquidWhaleFlowContext;
|
|
1666
1766
|
}
|
|
1667
1767
|
type BaseMarketBreadthContext = {
|
|
1668
1768
|
source: 'binance_klines';
|
|
@@ -1689,6 +1789,22 @@ type BaseMarketBreadthsContext = {
|
|
|
1689
1789
|
top50?: BaseMarketBreadthContext;
|
|
1690
1790
|
top100?: BaseMarketBreadthContext;
|
|
1691
1791
|
};
|
|
1792
|
+
interface BasePsychologicalLevelWindowContext {
|
|
1793
|
+
crossed: boolean | null;
|
|
1794
|
+
direction: 'up' | 'down' | 'none' | 'unknown';
|
|
1795
|
+
level: number | null;
|
|
1796
|
+
levelsCrossed: number | null;
|
|
1797
|
+
distanceBeyondLevelBps: number | null;
|
|
1798
|
+
}
|
|
1799
|
+
interface BasePsychologicalLevelAssetContext {
|
|
1800
|
+
source: 'aligned_15m_ohlcv';
|
|
1801
|
+
stepUsd: number;
|
|
1802
|
+
windows: {
|
|
1803
|
+
m15: BasePsychologicalLevelWindowContext;
|
|
1804
|
+
h1: BasePsychologicalLevelWindowContext;
|
|
1805
|
+
h4: BasePsychologicalLevelWindowContext;
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1692
1808
|
interface BaseRelativeContext {
|
|
1693
1809
|
benchmark: {
|
|
1694
1810
|
maFast: number | null;
|
|
@@ -1727,6 +1843,10 @@ interface BaseRelativeContext {
|
|
|
1727
1843
|
correlationToEth20: number | null;
|
|
1728
1844
|
ratioTrend: 'up' | 'down' | 'flat' | 'unknown';
|
|
1729
1845
|
};
|
|
1846
|
+
referencePsychologicalLevels?: {
|
|
1847
|
+
BTCUSDT?: BasePsychologicalLevelAssetContext;
|
|
1848
|
+
ETHUSDT?: BasePsychologicalLevelAssetContext;
|
|
1849
|
+
};
|
|
1730
1850
|
marketBreadth?: BaseMarketBreadthContext;
|
|
1731
1851
|
marketBreadths?: BaseMarketBreadthsContext;
|
|
1732
1852
|
btcAltRegime?: {
|
|
@@ -1868,8 +1988,8 @@ interface BaseMultiTimeframeContext {
|
|
|
1868
1988
|
}
|
|
1869
1989
|
type BaseGateFeatureEntryLocation = 'near_support' | 'near_resistance' | 'mid_range' | 'breakout' | 'breakdown' | 'unknown';
|
|
1870
1990
|
type BaseGateFeatureScoreKey = 'structure' | 'participation' | 'relative' | 'mtf' | 'execution' | 'derivatives' | 'totalContext';
|
|
1871
|
-
type BaseGateFeatureConfirmation = 'mtf_aligned' | 'volume_expansion' | 'delta_aligned' | 'trade_flow_aligned' | 'reference_trade_flow_aligned' | 'market_breadth_aligned' | 'cmc_alt_liquidity_aligned' | 'cmc_eth_btc_aligned' | 'cmc_exchange_liquidity_aligned' | 'cmc_fear_greed_aligned' | 'cmc_index_aligned' | 'target_vs_btc_aligned' | 'target_vs_eth_aligned' | 'btc_alt_regime_aligned' | 'benchmark_aligned' | 'breakout_confirmed' | 'liquidity_sweep_aligned' | 'derivatives_aligned';
|
|
1872
|
-
type BaseGateFeatureConflict = 'mtf_against' | 'mtf_mixed' | 'benchmark_against' | 'relative_strength_against' | 'market_breadth_against' | 'cmc_alt_liquidity_against' | 'cmc_eth_btc_against' | 'cmc_exchange_liquidity_against' | 'cmc_fear_greed_against' | 'cmc_index_against' | 'target_vs_btc_against' | 'target_vs_eth_against' | 'btc_alt_regime_against' | 'delta_against' | 'trade_flow_against' | 'reference_trade_flow_against' | 'failed_breakout' | 'extreme_volatility' | 'wide_spread' | 'derivatives_against' | 'derivatives_crowded';
|
|
1991
|
+
type BaseGateFeatureConfirmation = 'mtf_aligned' | 'volume_expansion' | 'delta_aligned' | 'trade_flow_aligned' | 'hyperliquid_whales_aligned' | 'reference_trade_flow_aligned' | 'market_breadth_aligned' | 'cmc_alt_liquidity_aligned' | 'cmc_eth_btc_aligned' | 'cmc_exchange_liquidity_aligned' | 'cmc_fear_greed_aligned' | 'cmc_index_aligned' | 'target_vs_btc_aligned' | 'target_vs_eth_aligned' | 'btc_alt_regime_aligned' | 'benchmark_aligned' | 'breakout_confirmed' | 'liquidity_sweep_aligned' | 'derivatives_aligned';
|
|
1992
|
+
type BaseGateFeatureConflict = 'mtf_against' | 'mtf_mixed' | 'benchmark_against' | 'relative_strength_against' | 'market_breadth_against' | 'cmc_alt_liquidity_against' | 'cmc_eth_btc_against' | 'cmc_exchange_liquidity_against' | 'cmc_fear_greed_against' | 'cmc_index_against' | 'target_vs_btc_against' | 'target_vs_eth_against' | 'btc_alt_regime_against' | 'delta_against' | 'trade_flow_against' | 'hyperliquid_whales_against' | 'reference_trade_flow_against' | 'failed_breakout' | 'extreme_volatility' | 'wide_spread' | 'derivatives_against' | 'derivatives_crowded';
|
|
1873
1993
|
type BaseGateFeatureRiskLevel = 'low' | 'medium' | 'high' | 'unknown';
|
|
1874
1994
|
type BaseGateFeatureApproveBias = 'support' | 'neutral' | 'reject';
|
|
1875
1995
|
type BaseGateFeaturePrimaryIssue = 'none' | 'mtf_conflict' | 'weak_structure' | 'weak_participation' | 'bad_execution' | 'market_context_against' | 'extreme_volatility' | 'crowded_derivatives';
|
|
@@ -1936,6 +2056,17 @@ interface BaseContextGateFeatures {
|
|
|
1936
2056
|
deltaAligned: boolean | null;
|
|
1937
2057
|
tradeFlowBuyPressurePct: number | null;
|
|
1938
2058
|
tradeFlowAligned: boolean | null;
|
|
2059
|
+
hyperliquidWhaleBuySharePct: number | null;
|
|
2060
|
+
hyperliquidWhaleNetNotionalUsd: number | null;
|
|
2061
|
+
hyperliquidWhaleUniqueCount: number | null;
|
|
2062
|
+
hyperliquidWhaleCoveredCount: number | null;
|
|
2063
|
+
hyperliquidWhaleExpectedCount: number | null;
|
|
2064
|
+
hyperliquidWhaleCoveragePct: number | null;
|
|
2065
|
+
hyperliquidWhaleCoverageSufficient: boolean | null;
|
|
2066
|
+
hyperliquidWhaleNotionalUsd: number | null;
|
|
2067
|
+
hyperliquidWhaleSufficientActivity: boolean | null;
|
|
2068
|
+
hyperliquidWhaleFlowAligned: boolean | null;
|
|
2069
|
+
hyperliquidWhaleFlowStale: boolean | null;
|
|
1939
2070
|
referenceTradeFlowBuyPressurePct: number | null;
|
|
1940
2071
|
referenceTradeFlowAligned: boolean | null;
|
|
1941
2072
|
volumeStructureAligned: boolean | null;
|
|
@@ -2120,6 +2251,7 @@ interface StrategyAPI<TIndicators = IndicatorsHistorySnapshot | Record<string, u
|
|
|
2120
2251
|
}>;
|
|
2121
2252
|
getCurrentIndicatorsContext: () => StrategyIndicatorsContext<TIndicators>;
|
|
2122
2253
|
getBaseContext: () => BaseStrategyContextSnapshot | undefined;
|
|
2254
|
+
getDecisionBaseContext: () => Promise<BaseStrategyContextSnapshot | undefined>;
|
|
2123
2255
|
getDecisionPriceContext: () => Promise<StrategyDecisionPriceContext>;
|
|
2124
2256
|
getCurrentPosition: () => ReturnType<Connector['getPosition']>;
|
|
2125
2257
|
getDirectionalTpSlPrices: (params: StrategyDirectionalTpSlParams) => StrategyDirectionalTpSlResult;
|
|
@@ -2145,6 +2277,7 @@ interface StrategyIndicatorsState<TNext = unknown, TSnapshot = Record<string, an
|
|
|
2145
2277
|
compact?: boolean;
|
|
2146
2278
|
limit?: number;
|
|
2147
2279
|
}) => TSnapshot;
|
|
2280
|
+
latestSnapshot?: () => TNext;
|
|
2148
2281
|
latestNumber: <K extends Extract<keyof NonNullable<TSnapshot>, string>>(key: K) => number | undefined;
|
|
2149
2282
|
}
|
|
2150
2283
|
interface StrategyRuntimeMlOptions {
|
|
@@ -2566,4 +2699,4 @@ interface StrategyChartsSnapshotResponse {
|
|
|
2566
2699
|
strategies: StrategyChartSnapshot[];
|
|
2567
2700
|
}
|
|
2568
2701
|
|
|
2569
|
-
export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, 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 BaseIndicatorsHistorySnapshot, type BaseMarketBreadthContext, type BaseMarketBreadthsContext, type BaseMarketTradeFlowContext, type BaseMultiTimeframeContext, type BaseParticipationContext, 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 ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorPluginDefinition, type ConnectorRegistryEntry, 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 Figure, type Filters, type FundingRateHistoryRequest, type FundingRatePoint, type GetAggTrades, type GetClosedPnlParams, type GetFundingRateHistory, type GetOrderBookDepth, type GetTickers, type GetTopOfBookTicker, type GetTradingFeeRate, 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 OnChangeFilters, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, type RuntimeAiAnalysisSnapshot, type RuntimeDeployment, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, 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 StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, 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 StrategyManifest, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, 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 TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, type UIFilters, isMarketUniverse, resolveConnectorUniverse };
|
|
2702
|
+
export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, 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 ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorPluginDefinition, type ConnectorRegistryEntry, 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 Figure, 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 OnChangeFilters, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, type RuntimeAiAnalysisSnapshot, type RuntimeDeployment, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, 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 StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, 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 StrategyManifest, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, 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 TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, type UIFilters, isMarketUniverse, resolveConnectorUniverse };
|
package/dist/index.d.ts
CHANGED
|
@@ -392,6 +392,70 @@ type MarketTradeFlowRow = {
|
|
|
392
392
|
buyPressurePct?: number | null;
|
|
393
393
|
source?: string | null;
|
|
394
394
|
};
|
|
395
|
+
type HyperliquidWhaleTradeEventRow = {
|
|
396
|
+
symbol: string;
|
|
397
|
+
ts: Date;
|
|
398
|
+
tid: string;
|
|
399
|
+
price: number;
|
|
400
|
+
size: number;
|
|
401
|
+
notionalUsd: number;
|
|
402
|
+
buyerAddress?: string | null;
|
|
403
|
+
sellerAddress?: string | null;
|
|
404
|
+
buyerTracked: boolean;
|
|
405
|
+
sellerTracked: boolean;
|
|
406
|
+
buyerStartPosition?: number | null;
|
|
407
|
+
buyerEndPosition?: number | null;
|
|
408
|
+
buyerPositionAction?: HyperliquidPositionAction | null;
|
|
409
|
+
buyerClosedPnl?: number | null;
|
|
410
|
+
buyerLiquidation?: boolean | null;
|
|
411
|
+
sellerStartPosition?: number | null;
|
|
412
|
+
sellerEndPosition?: number | null;
|
|
413
|
+
sellerPositionAction?: HyperliquidPositionAction | null;
|
|
414
|
+
sellerClosedPnl?: number | null;
|
|
415
|
+
sellerLiquidation?: boolean | null;
|
|
416
|
+
universeFingerprint: string;
|
|
417
|
+
whaleRegistryFingerprint: string;
|
|
418
|
+
source?: string | null;
|
|
419
|
+
};
|
|
420
|
+
type HyperliquidPositionAction = 'open' | 'increase' | 'reduce' | 'close' | 'flip';
|
|
421
|
+
type HyperliquidWhaleFlowRow = {
|
|
422
|
+
symbol: string;
|
|
423
|
+
interval: '1m';
|
|
424
|
+
ts: Date;
|
|
425
|
+
trades: number;
|
|
426
|
+
whaleSides: number;
|
|
427
|
+
uniqueWhales: number;
|
|
428
|
+
whaleAddresses?: string[];
|
|
429
|
+
buyNotionalUsd: number;
|
|
430
|
+
sellNotionalUsd: number;
|
|
431
|
+
netNotionalUsd: number;
|
|
432
|
+
buySharePct?: number | null;
|
|
433
|
+
positionAwareWhaleSides: number;
|
|
434
|
+
longEntryWhaleAddresses?: string[];
|
|
435
|
+
shortEntryWhaleAddresses?: string[];
|
|
436
|
+
longExitWhaleAddresses?: string[];
|
|
437
|
+
shortExitWhaleAddresses?: string[];
|
|
438
|
+
longEntryNotionalUsd: number;
|
|
439
|
+
shortEntryNotionalUsd: number;
|
|
440
|
+
longExitNotionalUsd: number;
|
|
441
|
+
shortExitNotionalUsd: number;
|
|
442
|
+
entryNetNotionalUsd: number;
|
|
443
|
+
entryLongSharePct?: number | null;
|
|
444
|
+
universeFingerprint: string;
|
|
445
|
+
whaleRegistryFingerprint: string;
|
|
446
|
+
source?: string | null;
|
|
447
|
+
};
|
|
448
|
+
declare const HYPERLIQUID_WHALE_DATA_MODEL_VERSION = 3;
|
|
449
|
+
type HyperliquidWhaleCoverageRow = {
|
|
450
|
+
ts: Date;
|
|
451
|
+
coveredWhales: number;
|
|
452
|
+
expectedWhales: number;
|
|
453
|
+
coveragePct: number;
|
|
454
|
+
dataModelVersion?: number;
|
|
455
|
+
universeFingerprint: string;
|
|
456
|
+
whaleRegistryFingerprint: string;
|
|
457
|
+
source?: string | null;
|
|
458
|
+
};
|
|
395
459
|
interface Tp {
|
|
396
460
|
price: number;
|
|
397
461
|
rate: number;
|
|
@@ -799,6 +863,7 @@ interface RuntimeLineage {
|
|
|
799
863
|
gateFingerprint: string;
|
|
800
864
|
configFingerprint: string;
|
|
801
865
|
contextFingerprint: string;
|
|
866
|
+
maxLossValue?: number | null;
|
|
802
867
|
}
|
|
803
868
|
type RuntimeTradeStatus = 'active' | 'closed';
|
|
804
869
|
type RuntimeTradeExitType = 'exit' | 'tp' | 'sl' | 'unknown';
|
|
@@ -1622,6 +1687,40 @@ interface BaseMarketTradeFlowContext {
|
|
|
1622
1687
|
netBaseDelta: number | null;
|
|
1623
1688
|
netQuoteDelta: number | null;
|
|
1624
1689
|
}
|
|
1690
|
+
interface BaseHyperliquidWhaleFlowContext {
|
|
1691
|
+
source: 'hyperliquid_trades' | 'hyperliquid_user_fills';
|
|
1692
|
+
interval: MarketFeatureInterval;
|
|
1693
|
+
asOfTs: number | null;
|
|
1694
|
+
windowEndTs: number;
|
|
1695
|
+
ageMs: number | null;
|
|
1696
|
+
stale: boolean;
|
|
1697
|
+
symbol: string;
|
|
1698
|
+
trades: number;
|
|
1699
|
+
whaleSides: number;
|
|
1700
|
+
uniqueWhales: number;
|
|
1701
|
+
coveredWhales: number;
|
|
1702
|
+
expectedWhales: number;
|
|
1703
|
+
coveragePct: number;
|
|
1704
|
+
coverageSufficient: boolean;
|
|
1705
|
+
buyNotionalUsd: number;
|
|
1706
|
+
sellNotionalUsd: number;
|
|
1707
|
+
netNotionalUsd: number;
|
|
1708
|
+
buySharePct: number | null;
|
|
1709
|
+
positionAwareWhaleSides: number;
|
|
1710
|
+
positionAwarePct: number;
|
|
1711
|
+
longEntryWhales: number;
|
|
1712
|
+
shortEntryWhales: number;
|
|
1713
|
+
longExitWhales: number;
|
|
1714
|
+
shortExitWhales: number;
|
|
1715
|
+
longEntryNotionalUsd: number;
|
|
1716
|
+
shortEntryNotionalUsd: number;
|
|
1717
|
+
longExitNotionalUsd: number;
|
|
1718
|
+
shortExitNotionalUsd: number;
|
|
1719
|
+
entryNetNotionalUsd: number;
|
|
1720
|
+
entryLongSharePct: number | null;
|
|
1721
|
+
universeFingerprint: string;
|
|
1722
|
+
whaleRegistryFingerprint: string;
|
|
1723
|
+
}
|
|
1625
1724
|
interface BaseParticipationContext {
|
|
1626
1725
|
volume: {
|
|
1627
1726
|
volumeRel20: number | null;
|
|
@@ -1663,6 +1762,7 @@ interface BaseParticipationContext {
|
|
|
1663
1762
|
deltaDivergenceVsPrice: 'bullish' | 'bearish' | 'none' | 'unknown';
|
|
1664
1763
|
};
|
|
1665
1764
|
tradeFlow?: BaseMarketTradeFlowContext;
|
|
1765
|
+
hyperliquidWhales?: BaseHyperliquidWhaleFlowContext;
|
|
1666
1766
|
}
|
|
1667
1767
|
type BaseMarketBreadthContext = {
|
|
1668
1768
|
source: 'binance_klines';
|
|
@@ -1689,6 +1789,22 @@ type BaseMarketBreadthsContext = {
|
|
|
1689
1789
|
top50?: BaseMarketBreadthContext;
|
|
1690
1790
|
top100?: BaseMarketBreadthContext;
|
|
1691
1791
|
};
|
|
1792
|
+
interface BasePsychologicalLevelWindowContext {
|
|
1793
|
+
crossed: boolean | null;
|
|
1794
|
+
direction: 'up' | 'down' | 'none' | 'unknown';
|
|
1795
|
+
level: number | null;
|
|
1796
|
+
levelsCrossed: number | null;
|
|
1797
|
+
distanceBeyondLevelBps: number | null;
|
|
1798
|
+
}
|
|
1799
|
+
interface BasePsychologicalLevelAssetContext {
|
|
1800
|
+
source: 'aligned_15m_ohlcv';
|
|
1801
|
+
stepUsd: number;
|
|
1802
|
+
windows: {
|
|
1803
|
+
m15: BasePsychologicalLevelWindowContext;
|
|
1804
|
+
h1: BasePsychologicalLevelWindowContext;
|
|
1805
|
+
h4: BasePsychologicalLevelWindowContext;
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1692
1808
|
interface BaseRelativeContext {
|
|
1693
1809
|
benchmark: {
|
|
1694
1810
|
maFast: number | null;
|
|
@@ -1727,6 +1843,10 @@ interface BaseRelativeContext {
|
|
|
1727
1843
|
correlationToEth20: number | null;
|
|
1728
1844
|
ratioTrend: 'up' | 'down' | 'flat' | 'unknown';
|
|
1729
1845
|
};
|
|
1846
|
+
referencePsychologicalLevels?: {
|
|
1847
|
+
BTCUSDT?: BasePsychologicalLevelAssetContext;
|
|
1848
|
+
ETHUSDT?: BasePsychologicalLevelAssetContext;
|
|
1849
|
+
};
|
|
1730
1850
|
marketBreadth?: BaseMarketBreadthContext;
|
|
1731
1851
|
marketBreadths?: BaseMarketBreadthsContext;
|
|
1732
1852
|
btcAltRegime?: {
|
|
@@ -1868,8 +1988,8 @@ interface BaseMultiTimeframeContext {
|
|
|
1868
1988
|
}
|
|
1869
1989
|
type BaseGateFeatureEntryLocation = 'near_support' | 'near_resistance' | 'mid_range' | 'breakout' | 'breakdown' | 'unknown';
|
|
1870
1990
|
type BaseGateFeatureScoreKey = 'structure' | 'participation' | 'relative' | 'mtf' | 'execution' | 'derivatives' | 'totalContext';
|
|
1871
|
-
type BaseGateFeatureConfirmation = 'mtf_aligned' | 'volume_expansion' | 'delta_aligned' | 'trade_flow_aligned' | 'reference_trade_flow_aligned' | 'market_breadth_aligned' | 'cmc_alt_liquidity_aligned' | 'cmc_eth_btc_aligned' | 'cmc_exchange_liquidity_aligned' | 'cmc_fear_greed_aligned' | 'cmc_index_aligned' | 'target_vs_btc_aligned' | 'target_vs_eth_aligned' | 'btc_alt_regime_aligned' | 'benchmark_aligned' | 'breakout_confirmed' | 'liquidity_sweep_aligned' | 'derivatives_aligned';
|
|
1872
|
-
type BaseGateFeatureConflict = 'mtf_against' | 'mtf_mixed' | 'benchmark_against' | 'relative_strength_against' | 'market_breadth_against' | 'cmc_alt_liquidity_against' | 'cmc_eth_btc_against' | 'cmc_exchange_liquidity_against' | 'cmc_fear_greed_against' | 'cmc_index_against' | 'target_vs_btc_against' | 'target_vs_eth_against' | 'btc_alt_regime_against' | 'delta_against' | 'trade_flow_against' | 'reference_trade_flow_against' | 'failed_breakout' | 'extreme_volatility' | 'wide_spread' | 'derivatives_against' | 'derivatives_crowded';
|
|
1991
|
+
type BaseGateFeatureConfirmation = 'mtf_aligned' | 'volume_expansion' | 'delta_aligned' | 'trade_flow_aligned' | 'hyperliquid_whales_aligned' | 'reference_trade_flow_aligned' | 'market_breadth_aligned' | 'cmc_alt_liquidity_aligned' | 'cmc_eth_btc_aligned' | 'cmc_exchange_liquidity_aligned' | 'cmc_fear_greed_aligned' | 'cmc_index_aligned' | 'target_vs_btc_aligned' | 'target_vs_eth_aligned' | 'btc_alt_regime_aligned' | 'benchmark_aligned' | 'breakout_confirmed' | 'liquidity_sweep_aligned' | 'derivatives_aligned';
|
|
1992
|
+
type BaseGateFeatureConflict = 'mtf_against' | 'mtf_mixed' | 'benchmark_against' | 'relative_strength_against' | 'market_breadth_against' | 'cmc_alt_liquidity_against' | 'cmc_eth_btc_against' | 'cmc_exchange_liquidity_against' | 'cmc_fear_greed_against' | 'cmc_index_against' | 'target_vs_btc_against' | 'target_vs_eth_against' | 'btc_alt_regime_against' | 'delta_against' | 'trade_flow_against' | 'hyperliquid_whales_against' | 'reference_trade_flow_against' | 'failed_breakout' | 'extreme_volatility' | 'wide_spread' | 'derivatives_against' | 'derivatives_crowded';
|
|
1873
1993
|
type BaseGateFeatureRiskLevel = 'low' | 'medium' | 'high' | 'unknown';
|
|
1874
1994
|
type BaseGateFeatureApproveBias = 'support' | 'neutral' | 'reject';
|
|
1875
1995
|
type BaseGateFeaturePrimaryIssue = 'none' | 'mtf_conflict' | 'weak_structure' | 'weak_participation' | 'bad_execution' | 'market_context_against' | 'extreme_volatility' | 'crowded_derivatives';
|
|
@@ -1936,6 +2056,17 @@ interface BaseContextGateFeatures {
|
|
|
1936
2056
|
deltaAligned: boolean | null;
|
|
1937
2057
|
tradeFlowBuyPressurePct: number | null;
|
|
1938
2058
|
tradeFlowAligned: boolean | null;
|
|
2059
|
+
hyperliquidWhaleBuySharePct: number | null;
|
|
2060
|
+
hyperliquidWhaleNetNotionalUsd: number | null;
|
|
2061
|
+
hyperliquidWhaleUniqueCount: number | null;
|
|
2062
|
+
hyperliquidWhaleCoveredCount: number | null;
|
|
2063
|
+
hyperliquidWhaleExpectedCount: number | null;
|
|
2064
|
+
hyperliquidWhaleCoveragePct: number | null;
|
|
2065
|
+
hyperliquidWhaleCoverageSufficient: boolean | null;
|
|
2066
|
+
hyperliquidWhaleNotionalUsd: number | null;
|
|
2067
|
+
hyperliquidWhaleSufficientActivity: boolean | null;
|
|
2068
|
+
hyperliquidWhaleFlowAligned: boolean | null;
|
|
2069
|
+
hyperliquidWhaleFlowStale: boolean | null;
|
|
1939
2070
|
referenceTradeFlowBuyPressurePct: number | null;
|
|
1940
2071
|
referenceTradeFlowAligned: boolean | null;
|
|
1941
2072
|
volumeStructureAligned: boolean | null;
|
|
@@ -2120,6 +2251,7 @@ interface StrategyAPI<TIndicators = IndicatorsHistorySnapshot | Record<string, u
|
|
|
2120
2251
|
}>;
|
|
2121
2252
|
getCurrentIndicatorsContext: () => StrategyIndicatorsContext<TIndicators>;
|
|
2122
2253
|
getBaseContext: () => BaseStrategyContextSnapshot | undefined;
|
|
2254
|
+
getDecisionBaseContext: () => Promise<BaseStrategyContextSnapshot | undefined>;
|
|
2123
2255
|
getDecisionPriceContext: () => Promise<StrategyDecisionPriceContext>;
|
|
2124
2256
|
getCurrentPosition: () => ReturnType<Connector['getPosition']>;
|
|
2125
2257
|
getDirectionalTpSlPrices: (params: StrategyDirectionalTpSlParams) => StrategyDirectionalTpSlResult;
|
|
@@ -2145,6 +2277,7 @@ interface StrategyIndicatorsState<TNext = unknown, TSnapshot = Record<string, an
|
|
|
2145
2277
|
compact?: boolean;
|
|
2146
2278
|
limit?: number;
|
|
2147
2279
|
}) => TSnapshot;
|
|
2280
|
+
latestSnapshot?: () => TNext;
|
|
2148
2281
|
latestNumber: <K extends Extract<keyof NonNullable<TSnapshot>, string>>(key: K) => number | undefined;
|
|
2149
2282
|
}
|
|
2150
2283
|
interface StrategyRuntimeMlOptions {
|
|
@@ -2566,4 +2699,4 @@ interface StrategyChartsSnapshotResponse {
|
|
|
2566
2699
|
strategies: StrategyChartSnapshot[];
|
|
2567
2700
|
}
|
|
2568
2701
|
|
|
2569
|
-
export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, 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 BaseIndicatorsHistorySnapshot, type BaseMarketBreadthContext, type BaseMarketBreadthsContext, type BaseMarketTradeFlowContext, type BaseMultiTimeframeContext, type BaseParticipationContext, 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 ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorPluginDefinition, type ConnectorRegistryEntry, 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 Figure, type Filters, type FundingRateHistoryRequest, type FundingRatePoint, type GetAggTrades, type GetClosedPnlParams, type GetFundingRateHistory, type GetOrderBookDepth, type GetTickers, type GetTopOfBookTicker, type GetTradingFeeRate, 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 OnChangeFilters, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, type RuntimeAiAnalysisSnapshot, type RuntimeDeployment, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, 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 StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, 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 StrategyManifest, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, 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 TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, type UIFilters, isMarketUniverse, resolveConnectorUniverse };
|
|
2702
|
+
export { type AIChatHistory, type AIChatMessage, type AggTrade, type AggTradesRequest, type AiDatasetRow, type AiPayload, type AiPromptPair, type AssetClass, BACKTEST_WARNING_CODES, type BacktestDetectorOptimizedStrategy, 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 ConnectorCapabilities, type ConnectorConfig, type ConnectorCreator, type ConnectorPluginDefinition, type ConnectorRegistryEntry, 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 Figure, 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 OnChangeFilters, type Order, type OrderBookDepth, type OrderBookDepthRequest, type OrderLog, type OrderLogData, type OrderPositionIntent, type OrderType, type Position, type PositionLog, type PositionLogData, type PositionPnlSnapshot, type Provider, type RuntimeAiAnalysisSnapshot, type RuntimeDeployment, type RuntimeDeploymentHeartbeat, type RuntimeDeploymentStrategy, type RuntimeLineage, type RuntimeSignalEvaluationRecord, type RuntimeSignalEvaluationStatus, type RuntimeStrategyCloseNotification, type RuntimeStrategyConfigSnapshot, type RuntimeTradeExitType, type RuntimeTradeFillSource, type RuntimeTradeRecord, type RuntimeTradeStatus, type RuntimeTradeTelemetryQuality, 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 StrategyDirectionalTpSlParams, type StrategyDirectionalTpSlResult, type StrategyEntryBaseParams, type StrategyEntryModelFigures, type StrategyEntryOrderPlan, type StrategyEntryRuntimeBaseParams, type StrategyEntryRuntimeBuilderParams, type StrategyEntryRuntimeOptions, type StrategyEntrySignalContext, type StrategyEntrySignalDecisionBuilderParams, type StrategyEntryTakeProfitsParams, 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 StrategyManifest, type StrategyMlAdapter, type StrategyPluginDefinition, type StrategyPolicyProfile, type StrategyProtectPlan, type StrategyRegistryEntry, 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 TradingAccountRef, type TradingFeeRate, type Trend, type TrendLine, type TrendLineMode, type TrendLineOptions, type UIFilters, isMarketUniverse, resolveConnectorUniverse };
|
package/dist/index.js
CHANGED
|
@@ -22,11 +22,15 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
BACKTEST_WARNING_CODES: () => BACKTEST_WARNING_CODES,
|
|
24
24
|
DEFAULT_MARKET_UNIVERSE: () => DEFAULT_MARKET_UNIVERSE,
|
|
25
|
+
HYPERLIQUID_WHALE_DATA_MODEL_VERSION: () => HYPERLIQUID_WHALE_DATA_MODEL_VERSION,
|
|
25
26
|
isMarketUniverse: () => isMarketUniverse,
|
|
26
27
|
resolveConnectorUniverse: () => resolveConnectorUniverse
|
|
27
28
|
});
|
|
28
29
|
module.exports = __toCommonJS(index_exports);
|
|
29
30
|
|
|
31
|
+
// src/trade.ts
|
|
32
|
+
var HYPERLIQUID_WHALE_DATA_MODEL_VERSION = 3;
|
|
33
|
+
|
|
30
34
|
// src/backtest.ts
|
|
31
35
|
var BACKTEST_WARNING_CODES = {
|
|
32
36
|
TAKE_PROFIT_CROSSED_BEFORE_ENTRY: "TAKE_PROFIT_CROSSED_BEFORE_ENTRY"
|
|
@@ -51,6 +55,7 @@ var resolveConnectorUniverse = (capabilities, requested) => {
|
|
|
51
55
|
0 && (module.exports = {
|
|
52
56
|
BACKTEST_WARNING_CODES,
|
|
53
57
|
DEFAULT_MARKET_UNIVERSE,
|
|
58
|
+
HYPERLIQUID_WHALE_DATA_MODEL_VERSION,
|
|
54
59
|
isMarketUniverse,
|
|
55
60
|
resolveConnectorUniverse
|
|
56
61
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/trade.ts
|
|
2
|
+
var HYPERLIQUID_WHALE_DATA_MODEL_VERSION = 3;
|
|
3
|
+
|
|
1
4
|
// src/backtest.ts
|
|
2
5
|
var BACKTEST_WARNING_CODES = {
|
|
3
6
|
TAKE_PROFIT_CROSSED_BEFORE_ENTRY: "TAKE_PROFIT_CROSSED_BEFORE_ENTRY"
|
|
@@ -21,6 +24,7 @@ var resolveConnectorUniverse = (capabilities, requested) => {
|
|
|
21
24
|
export {
|
|
22
25
|
BACKTEST_WARNING_CODES,
|
|
23
26
|
DEFAULT_MARKET_UNIVERSE,
|
|
27
|
+
HYPERLIQUID_WHALE_DATA_MODEL_VERSION,
|
|
24
28
|
isMarketUniverse,
|
|
25
29
|
resolveConnectorUniverse
|
|
26
30
|
};
|