@tradejs/node 1.0.9 → 1.0.11
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/README.md +1 -1
- package/dist/ai.d.mts +4 -1
- package/dist/ai.d.ts +4 -1
- package/dist/ai.js +601 -93
- package/dist/ai.mjs +5 -3
- package/dist/backtest.d.mts +26 -2
- package/dist/backtest.d.ts +26 -2
- package/dist/backtest.js +3367 -481
- package/dist/backtest.mjs +1845 -269
- package/dist/chunk-37VNDZVX.mjs +1040 -0
- package/dist/chunk-IUZML4RK.mjs +1136 -0
- package/dist/{chunk-WGOYR6AB.mjs → chunk-QVSMINLG.mjs} +1 -1
- package/dist/{chunk-JMDYEKIO.mjs → chunk-V3YMKE4I.mjs} +1 -1
- package/dist/{chunk-JU77QVJ3.mjs → chunk-WS5DYEVZ.mjs} +59 -5
- package/dist/cli.d.mts +13 -3
- package/dist/cli.d.ts +13 -3
- package/dist/cli.js +1016 -234
- package/dist/cli.mjs +338 -65
- package/dist/connectors.js +59 -5
- package/dist/connectors.mjs +2 -2
- package/dist/registry.js +59 -5
- package/dist/registry.mjs +2 -2
- package/dist/strategies.d.mts +29 -8
- package/dist/strategies.d.ts +29 -8
- package/dist/strategies.js +3428 -1285
- package/dist/strategies.mjs +904 -112
- package/package.json +7 -7
- package/dist/chunk-2JKX3DM7.mjs +0 -619
- package/dist/chunk-JRRG3YQG.mjs +0 -154
package/dist/ai.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
buildAiPayload,
|
|
7
7
|
buildAiPrompts,
|
|
8
8
|
buildAiSystemPrompt,
|
|
9
|
+
buildCompactAiIndicatorsSnapshot,
|
|
9
10
|
ensureAiStrategyPluginsLoaded,
|
|
10
11
|
getDeterministicAiGateContext,
|
|
11
12
|
getOpenRouterModelKwargs,
|
|
@@ -13,9 +14,9 @@ import {
|
|
|
13
14
|
runAiPrompt,
|
|
14
15
|
runAiPromptLocal,
|
|
15
16
|
trimSeriesDeep
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-IUZML4RK.mjs";
|
|
18
|
+
import "./chunk-QVSMINLG.mjs";
|
|
19
|
+
import "./chunk-WS5DYEVZ.mjs";
|
|
19
20
|
import "./chunk-6DZX6EAA.mjs";
|
|
20
21
|
export {
|
|
21
22
|
DEFAULT_AI_MODEL,
|
|
@@ -25,6 +26,7 @@ export {
|
|
|
25
26
|
buildAiPayload,
|
|
26
27
|
buildAiPrompts,
|
|
27
28
|
buildAiSystemPrompt,
|
|
29
|
+
buildCompactAiIndicatorsSnapshot,
|
|
28
30
|
ensureAiStrategyPluginsLoaded,
|
|
29
31
|
getDeterministicAiGateContext,
|
|
30
32
|
getOpenRouterModelKwargs,
|
package/dist/backtest.d.mts
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
export * from '@tradejs/core/backtest';
|
|
2
|
-
import { TestingBox, TestConnectorCreator } from '@tradejs/types';
|
|
2
|
+
import { Test, TestingBox, TestingBoxResult, TestConnectorCreator, Connector, StrategyConfig, InstrumentDescriptor, ExecutionCostModel, FundingRatePoint } from '@tradejs/types';
|
|
3
3
|
|
|
4
|
+
type TestingGroupResult = {
|
|
5
|
+
test: Test;
|
|
6
|
+
result: TestingBoxResult;
|
|
7
|
+
};
|
|
4
8
|
declare const resetTestingKlineCache: (cwd?: string) => void;
|
|
9
|
+
declare const releaseTestingSymbolCache: (params: {
|
|
10
|
+
cwd?: string;
|
|
11
|
+
userName: string;
|
|
12
|
+
connectorName: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
declare const canRunTestsInSharedCandleLoop: (tests: Test[]) => boolean;
|
|
5
16
|
declare const testing: TestingBox;
|
|
17
|
+
declare const testingGroupInSharedCandleLoop: (tests: Test[]) => Promise<TestingGroupResult[]>;
|
|
6
18
|
|
|
7
19
|
declare const createTestConnector: TestConnectorCreator;
|
|
8
20
|
|
|
9
|
-
|
|
21
|
+
declare const resolveExecutionCosts: (params: {
|
|
22
|
+
connector: Connector;
|
|
23
|
+
symbol: string;
|
|
24
|
+
config: StrategyConfig;
|
|
25
|
+
startTime: number;
|
|
26
|
+
endTime: number;
|
|
27
|
+
instrument?: InstrumentDescriptor;
|
|
28
|
+
}) => Promise<{
|
|
29
|
+
model: ExecutionCostModel;
|
|
30
|
+
fundingRates: FundingRatePoint[];
|
|
31
|
+
}>;
|
|
32
|
+
|
|
33
|
+
export { canRunTestsInSharedCandleLoop, createTestConnector, releaseTestingSymbolCache, resetTestingKlineCache, resolveExecutionCosts, testing, testingGroupInSharedCandleLoop };
|
package/dist/backtest.d.ts
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
export * from '@tradejs/core/backtest';
|
|
2
|
-
import { TestingBox, TestConnectorCreator } from '@tradejs/types';
|
|
2
|
+
import { Test, TestingBox, TestingBoxResult, TestConnectorCreator, Connector, StrategyConfig, InstrumentDescriptor, ExecutionCostModel, FundingRatePoint } from '@tradejs/types';
|
|
3
3
|
|
|
4
|
+
type TestingGroupResult = {
|
|
5
|
+
test: Test;
|
|
6
|
+
result: TestingBoxResult;
|
|
7
|
+
};
|
|
4
8
|
declare const resetTestingKlineCache: (cwd?: string) => void;
|
|
9
|
+
declare const releaseTestingSymbolCache: (params: {
|
|
10
|
+
cwd?: string;
|
|
11
|
+
userName: string;
|
|
12
|
+
connectorName: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
declare const canRunTestsInSharedCandleLoop: (tests: Test[]) => boolean;
|
|
5
16
|
declare const testing: TestingBox;
|
|
17
|
+
declare const testingGroupInSharedCandleLoop: (tests: Test[]) => Promise<TestingGroupResult[]>;
|
|
6
18
|
|
|
7
19
|
declare const createTestConnector: TestConnectorCreator;
|
|
8
20
|
|
|
9
|
-
|
|
21
|
+
declare const resolveExecutionCosts: (params: {
|
|
22
|
+
connector: Connector;
|
|
23
|
+
symbol: string;
|
|
24
|
+
config: StrategyConfig;
|
|
25
|
+
startTime: number;
|
|
26
|
+
endTime: number;
|
|
27
|
+
instrument?: InstrumentDescriptor;
|
|
28
|
+
}) => Promise<{
|
|
29
|
+
model: ExecutionCostModel;
|
|
30
|
+
fundingRates: FundingRatePoint[];
|
|
31
|
+
}>;
|
|
32
|
+
|
|
33
|
+
export { canRunTestsInSharedCandleLoop, createTestConnector, releaseTestingSymbolCache, resetTestingKlineCache, resolveExecutionCosts, testing, testingGroupInSharedCandleLoop };
|