export * from '@tradejs/core/strategies'; export { AiChatMessage, DEFAULT_AI_MODEL, InvokeAiChatOptions, MAX_AI_SERIES_POINTS, askAI, buildAiHumanPrompt, buildAiPayload, buildAiPrompts, buildAiSystemPrompt, buildCompactAiIndicatorsSnapshot, getDeterministicAiGateContext, getOpenRouterModelKwargs, invokeAiChat, resetAiRuntimeCache, runAiPrompt, runAiPromptLocal, trimSeriesDeep } from './ai.js'; export { e as ensureIndicatorPluginsLoaded, a as ensureStrategyPluginsLoaded, g as getAvailableStrategyNames, b as getRegisteredManifests, c as getRegisteredStrategies, d as getStrategyCreator, f as getStrategyDefaults, h as getStrategyManifest, i as getStrategyPluginSource, j as isKnownStrategy, r as registerStrategyEntries, k as resetStrategyRegistryCache, s as strategies } from './registry-3TsO1Ff1.js'; import { StrategyConfig, CreateStrategyCore, StrategyManifest, StrategyCreator, RuntimeStrategyConfigSnapshot, Signal, Direction, StrategyRuntimeMlOptions, StrategyRuntimeAiOptions, Connector, Tp, MarketFeatureInterval, StrategyEntrySignalContext } from '@tradejs/types'; import { TradejsConfigOnBarHook, TradejsConfigBeforeSignalsHook } from '@tradejs/core/config'; interface CreateStrategyRuntimeParams { strategyName: string; defaults: TConfig; createCore: CreateStrategyCore; manifest?: StrategyManifest; detectorKey?: (config: TConfig) => string | undefined; detectorNoSignalSkipReason?: string; resolveRegisteredManifest?: (name: string) => StrategyManifest | undefined; } declare const createStrategyRuntime: ({ strategyName, defaults, createCore, manifest: staticManifest, detectorKey, detectorNoSignalSkipReason, resolveRegisteredManifest, }: CreateStrategyRuntimeParams) => StrategyCreator; interface ResolveStrategyConfigParams { strategyName: string; userName: string; symbol: string; baseConfig: Record; defaults: TConfig; runtimeConfigId?: string; runtimeConfigSnapshot?: RuntimeStrategyConfigSnapshot; } declare const resolveStrategyConfig: ({ strategyName, baseConfig, defaults, runtimeConfigSnapshot, }: ResolveStrategyConfigParams) => Promise<{ config: TConfig; isConfigFromBacktest: boolean; }>; interface EnrichSignalWithMlAiParams { signal: Signal; userName?: string; symbol: string; direction: Direction; env: string; ml?: StrategyRuntimeMlOptions; ai?: StrategyRuntimeAiOptions; } declare const enrichSignalWithMl: ({ signal, env, ml, }: Pick) => Promise; declare const enrichSignalWithAi: ({ signal, symbol, userName, direction, env, ai, }: Pick) => Promise; declare const enrichSignalWithMlAi: ({ signal, userName, symbol, direction, env, ml, ai, }: EnrichSignalWithMlAiParams) => Promise; interface ExecuteEntryOrderParams { connector: Connector; userName?: string; symbol: string; direction: Direction; qty: number; currentPrice: number; timestamp: number; takeProfits: Tp[]; stopLossPrice: number | null; positionIntent?: 'open' | 'increase'; leverage?: number; signal: Signal; beforePlaceOrder?: () => Promise; recordRuntimeTrade?: boolean; } declare const getOrderArrivalSnapshot: ({ connector, symbol, }: { connector: Connector; symbol: string; }) => Promise<{ arrivalSnapshotTime: number; arrivalSource: string; bid: number | null; ask: number | null; arrivalMid: number | null; spreadBps: number | null; }>; declare const validateEntryProtectionAtArrival: ({ direction, signalPrice, bid, ask, arrivalMid, takeProfits, stopLossPrice, }: { direction: Direction; signalPrice: number; bid: number | null; ask: number | null; arrivalMid: number | null; takeProfits: Tp[]; stopLossPrice: number | null; }) => void; declare const executeEntryOrder: ({ connector, userName, symbol, direction, qty, currentPrice, timestamp, takeProfits, stopLossPrice, positionIntent, signal, beforePlaceOrder, recordRuntimeTrade, leverage, }: ExecuteEntryOrderParams) => Promise; declare const preloadBinanceMarketContextForWindow: (params: { startMs: number; endMs: number; interval: MarketFeatureInterval; maxAgeMs?: number; timeoutMs?: number; chunkMs?: number; abortSignal?: AbortSignal; }) => Promise<{ tradeFlowRows: number; breadthRows: number; }>; declare const enrichSignalWithBinanceMarketContext: (params: { signal: Signal; env: string; enabled?: boolean; interval?: MarketFeatureInterval; breadthUniverse?: string; maxAgeMs?: number; abortSignal?: AbortSignal; }) => Promise; declare const BINANCE_BREADTH_UNIVERSE_KEYS: readonly ["top5", "top10", "top30", "top50", "top100"]; type BinanceBreadthUniverseKey = (typeof BINANCE_BREADTH_UNIVERSE_KEYS)[number]; type BinanceBreadthUniverseDefinition = { key: BinanceBreadthUniverseKey; size: number; fingerprint: string; universe: string; symbols: string[]; }; type BinanceBreadthUniverseSnapshot = { schemaVersion: 1; updatedAt: string; source: 'binance_spot_usdt_turnover24h'; fingerprint: string; universes: Record; }; declare const buildBinanceBreadthUniverseSnapshot: ({ rankedSymbols, updatedAt, }: { rankedSymbols: string[]; updatedAt?: string; }) => BinanceBreadthUniverseSnapshot; declare const getBinanceBreadthUniverseSnapshot: () => BinanceBreadthUniverseSnapshot; declare const getBinanceBreadthUniverses: () => BinanceBreadthUniverseDefinition[]; declare const getPrimaryBinanceBreadthUniverse: () => BinanceBreadthUniverseDefinition; type HyperliquidPerpUniverseSnapshot = { schemaVersion: 1; updatedAt: string; source: 'hyperliquid_main_perp_day_notional_volume'; fingerprint: string; size: 30; symbols: string[]; }; type HyperliquidWhaleRegistrySnapshot = { schemaVersion: 2; updatedAt: string; source: 'hyperliquid_structural_fills_snapshot'; selection: { calibrationFrom: string; calibrationTo: string; effectiveFrom: string; candidateLimit: number; minimumAccountValueUsd: number; minimumActiveDays: number; maximumRawFillsPerDay: number; maximumDirectionalExecutionsPerDay: number; minimumMedianNotionalUsd: number; minimumMedianInterExecutionMinutes: number; minimumTop30NotionalShare: number; minimumTurnoverToEquity: number; maximumTurnoverToEquity: number; score: string; forbiddenSelectionMetrics: readonly string[]; }; fingerprint: string; size: 100; addresses: string[]; }; declare const getHyperliquidPerpUniverseSnapshot: () => HyperliquidPerpUniverseSnapshot; declare const getHyperliquidWhaleRegistrySnapshot: () => HyperliquidWhaleRegistrySnapshot; declare const getHyperliquidPerpSymbols: () => string[]; declare const getHyperliquidWhaleAddresses: () => string[]; declare const isTrackedHyperliquidPerp: (symbol: string) => boolean; declare const isTrackedHyperliquidWhale: (address: string) => boolean; declare const resolveHyperliquidPerpFromSignalSymbol: (symbol: string) => string | null; declare const enrichSignalWithCoinMarketCapContext: (params: { signal: Signal; env: string; enabled?: boolean; maxAgeMs?: number; abortSignal?: AbortSignal; }) => Promise; declare const enrichSignalWithHyperliquidWhaleContext: (params: { signal: Signal; env: string; enabled?: boolean; interval?: MarketFeatureInterval; maxAgeMs?: number; abortSignal?: AbortSignal; }) => Promise; type CloseOppositePositionsBeforeOpenOptions = { connector: Connector; entryContext: StrategyEntrySignalContext; }; type BeforePlaceOrderHook = NonNullable['beforePlaceOrder']>; interface CreateCloseOppositeBeforePlaceOrderHookParams { isEnabled: (config: StrategyConfig) => boolean; } declare const closeOppositePositionsBeforeOpen: ({ connector, entryContext, }: CloseOppositePositionsBeforeOpenOptions) => Promise; declare const createCloseOppositeBeforePlaceOrderHook: ({ isEnabled, }: CreateCloseOppositeBeforePlaceOrderHookParams) => BeforePlaceOrderHook; interface CreateMoveStopToBreakEvenOnBarHookParams { isEnabled?: (config: StrategyConfig) => boolean; triggerRiskMultiplier?: number; stopProfitMultiplier?: number; } declare const createMoveStopToBreakEvenOnBarHook: ({ isEnabled, triggerRiskMultiplier, stopProfitMultiplier, }?: CreateMoveStopToBreakEvenOnBarHookParams) => TradejsConfigOnBarHook; declare const createMoveStopToBreakEvenAfterCoreDecisionHook: ({ isEnabled, triggerRiskMultiplier, stopProfitMultiplier, }?: CreateMoveStopToBreakEvenOnBarHookParams) => TradejsConfigOnBarHook; interface CreateCloseAllOnGlobalProfitBeforeSignalsHookParams { getStrategyDefaultConfig?: (strategyName: string) => StrategyConfig | undefined; profitRiskMultiplier?: number; } declare const createCloseAllOnGlobalProfitBeforeSignalsHook: ({ getStrategyDefaultConfig, profitRiskMultiplier, }?: CreateCloseAllOnGlobalProfitBeforeSignalsHookParams) => TradejsConfigBeforeSignalsHook; export { BINANCE_BREADTH_UNIVERSE_KEYS, type BinanceBreadthUniverseDefinition, type BinanceBreadthUniverseKey, type BinanceBreadthUniverseSnapshot, type HyperliquidPerpUniverseSnapshot, type HyperliquidWhaleRegistrySnapshot, buildBinanceBreadthUniverseSnapshot, closeOppositePositionsBeforeOpen, createCloseAllOnGlobalProfitBeforeSignalsHook, createCloseOppositeBeforePlaceOrderHook, createMoveStopToBreakEvenAfterCoreDecisionHook, createMoveStopToBreakEvenOnBarHook, createStrategyRuntime, enrichSignalWithAi, enrichSignalWithBinanceMarketContext, enrichSignalWithCoinMarketCapContext, enrichSignalWithHyperliquidWhaleContext, enrichSignalWithMl, enrichSignalWithMlAi, executeEntryOrder, getBinanceBreadthUniverseSnapshot, getBinanceBreadthUniverses, getHyperliquidPerpSymbols, getHyperliquidPerpUniverseSnapshot, getHyperliquidWhaleAddresses, getHyperliquidWhaleRegistrySnapshot, getOrderArrivalSnapshot, getPrimaryBinanceBreadthUniverse, isTrackedHyperliquidPerp, isTrackedHyperliquidWhale, preloadBinanceMarketContextForWindow, resolveHyperliquidPerpFromSignalSymbol, resolveStrategyConfig, validateEntryProtectionAtArrival };